<@U01819B63HP>: Quick heads-up on a crash conditi...
# xschem
t
@Stefan Schippers: Quick heads-up on a crash condition in xschem if a pin has a garbled pin direction.
netlist.c
line 1753, I added (everything in the
if(!pin_dir)
block plus the following
else
):
Copy code
if( pin_name && !strcmp(pin_name, lab)) {
                    if(!pin_dir) {
                      char str[2048];
                      my_snprintf(str, S(str), "Error: Symbol %s: No direction given for pin %s",
                                xctx->sym[i].name, lab);
                      statusmsg(str,2);
                      my_snprintf(str, S(str), "    %s <--> ???", type);
                      statusmsg(str,2);
                      err |= 1;
                    }
                    else if(!(
                          ( !strcmp(type, "ipin") && !strcmp(pin_dir, "in") ) ||
                          ( !strcmp(type, "opin") && !strcmp(pin_dir, "out") ) ||
                          ( !strcmp(type, "iopin") && !strcmp(pin_dir, "inout") )
                        )
                      ) {
With the fix, xschem didn't crash and I was able to track the problem down to what was probably my own stupid typo when manually editing the schematic file:x
Copy code
B 5 147.5 -62.5 152.5 -57.5 {name=pcasc dirout}
B 5 147.5 -82.5 152.5 -77.5 {name=pbias dirout}
(
dir=out
ended up as
dirout
). I can make a pull request if you like.
s
Thank you!!! I have applied your fix!
👍 1