delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2018/10/25/16:43:07

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=date:from:to:subject:message-id:in-reply-to:references:mime-version
:content-transfer-encoding;
bh=SVSh9vY9t0A2wDtPrAl6zs6X7sgUrADmFLuCaXXPlTw=;
b=nmSYDP7WpqVo1GIRMwY3xEhpPR1VU6upeBCE03+HU4ZguZgtmc+dGVH+TnxmSGDC4u
fkF+CWMpKBo4J0RRDUmIekUtZnZdX4DHTIL4UdgncsfhjC8W9Dm5r51RgiGzz+oQ/OlU
/HMixuqROBrwYNtpuhXBSr687dxSsdqAl2hRxilK6JQvhe9832c97VxtAsTK3NNmmJ/f
D14gjb6CZOUEUB/QxcDVzzMYimDvfKvJh3xtlgypeNMWUYFYUvtd6Dninm6QwnRJUPMU
tKqESJjeRLYwSxz1MEKWEWEzOB0ksY4Sf1ZfM+ZKVj0MkjC1zO7z8biDjPafl6YD7aOM
tduA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-transfer-encoding;
bh=SVSh9vY9t0A2wDtPrAl6zs6X7sgUrADmFLuCaXXPlTw=;
b=ThkUH7irWPQ6HMa14QzI3Gn5qMpdcZEKoTZLPCSyBpVMBfylu3DENJlwurtHCJro++
PkorHeTAWZ27xmTqNLC+rJFwSBBOyUMitl0d2W8RHx9r9iCUNvg247d2lZx/TfzmVooy
OGlQ9eZm4UzO5+qpEcoAgHCKI1YXHRvyBUIv+lbp4EWat6k1z22p8TQTmzYxNGCixLKF
wxC2f/BZn5j59/l02DL0h9Z5mRqZopkQk3fTTmOe/L/o280Lb+U5yD/cjrxy/Qaq47CB
6XbSzN4wQ3kloFM7SegA2LCMXOwK7TdvOJqEdtosMz8qzTBBokLtRsVt63ZotN/5EsOO
h74w==
X-Gm-Message-State: AGRZ1gKRAhIKCo6E2tYHwVU+QzRJ1SEs61mg9uZxR7dJiHZ7JDTGrugA
xc+0p5JCJ7wQuyFXMj41ESiUaxbj
X-Google-Smtp-Source: AJdET5eUDtkjT89tlcmvDZJM+f21E5X0cqeJl3kwURAgiuKHYcl9aGMa1jf/cluKiuzGDgCQYp0rBQ==
X-Received: by 2002:a19:d04f:: with SMTP id h76mr456857lfg.52.1540500074219;
Thu, 25 Oct 2018 13:41:14 -0700 (PDT)
Date: Thu, 25 Oct 2018 23:41:04 +0300
From: "(graahnul DOT grom AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] gschem error
Message-ID: <20181025234104.3aafb50b@demon>
In-Reply-To: <CAKuoF2_BYtK5ZMaG4OyPgvtSb_5sDP6h6AvqjnQQ4OffBhv0uQ@mail.gmail.com>
References: <CAKuoF2_BYtK5ZMaG4OyPgvtSb_5sDP6h6AvqjnQQ4OffBhv0uQ AT mail DOT gmail DOT com>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd11.2)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 22 Oct 2018 09:39:39 -0400
"Edward Comer (ecomer AT yahoo DOT com) [via
geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> wrote:

> *FYI:*
> I have used gschem for years and I encountered a bug that
> cost me an embarrassing amount of time to resolve.
> After a schematic editing session I closed the schematic.
> When I next tried to reopen it, it failed to open with an
> error of "failed: Tried to attach a non-text item as an
> attribute."
> 
> The error was hard to catch in the 27 part schematic. The
> problem is the "2" in the last character of the last "T"
> line of the part. The "2" means that the next "2" lines
> are text - except that that is wrong. There is only one
> text line and gschem failed when it encountered the "}".
> 
> It would certainly have been nice if gschem had displayed
> the offending line, part or a useful error. Also what
> would have been nice, but is absent, would be a --verbose
> option that printed each part just before it was parsed.
> 

Good point. Certainly, we need such a feature.
Just imagine if that happens not with 27 part schematic,
but with, say, 270 parts one. 8-[]
I'm going to implement this. So far [1], with --verbose
command line option, the input file is printed line by line
as it is parsed (along with line numbers). That way, if
there is a parsing error, it can be identified by checking
last lines of the output against the "gEDA/gaf File Format
Document" [2].


[1]
https://github.com/graahnul-grom/lepton-eda/tree/tb_083_parse_verb
[2]
http://wiki.geda-project.org/geda:file_format_spec

> 
> *BAD part:*
> 
> C 52700 49100 1 90 0 resistor_generic.sym
> {
> T 52780 49580 5 8 1 1 180 4 1
> refdes=R5
> T 51500 49200 5 8 0 1 90 1 1
> device=RESISTOR
> T 52500 49400 5 8 1 1 180 1 1
> value=1k/2W
> T 51200 49200 5 8 0 1 90 1 1
> footprint=2512.fp
> T 50800 49200 5 8 0 1 90 1 1
> symversion=1.1
> T 52700 49100 5 8 0 0 0 0 1
> vendor=mouser
> T 52700 49100 5 8 0 0 0 0 1
> vendor_part_number=279-CRGH2512J1K0
> T 52700 49100 5 8 0 0 0 0 1
> manufacturer=TE
> T 52700 49100 5 8 0 0 0 0 *2*
> manufacturer_part_number=CRGH2512J1K0
> }
> 
> *GOOD part:*
> 
> C 52700 49100 1 90 0 resistor_generic.sym
> {
> T 52780 49380 5 8 1 1 180 4 1
> refdes=R5
> T 51500 49200 5 8 0 1 90 1 1
> device=RESISTOR
> T 52500 49300 5 8 1 1 180 1 1
> value=1k/2w
> T 51200 49200 5 8 0 1 90 1 1
> footprint=2512.fp
> T 50800 49200 5 8 0 1 90 1 1
> symversion=1.1
> T 52700 49100 5 8 0 0 0 0 1
> vendor=mouser
> T 52700 49100 5 8 0 0 0 0 1
> vendor_part_number=279-CRGH2512J1K0
> T 52700 49100 5 8 0 0 0 0 1
> manufacturer=te
> T 52700 49100 5 8 0 0 0 0 1
> manufacturer_part_number=CRGH2512J1K0
> }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019