[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnucap] Another gnucap segfault
From: |
Al Davis |
Subject: |
Re: [Help-gnucap] Another gnucap segfault |
Date: |
Sun, 11 Jan 2004 19:07:33 -0500 |
User-agent: |
KMail/1.5.4 |
On Sunday 11 January 2004 02:59 pm, Karel Kulhavý wrote:
> Now I have found a segfault caused by two voltage sources with the
> same name:
> V92 24 0 ERROR_INVALID_PIN ERROR_INVALID_PIN 9.2V
same bug as the other one.
That line is not syntactically correct. It looks for a model with the
name ERROR_INVALID_PIN, fails.
Voltage sources always use a hidden conditional. The DC and AC values
are different. In this case, it uses the model for DC, but the AC
value is 0.
===================
(response to the other one...)
But, the program should never crash even with incorrect input. The line
is incorrect in any case, but after some warnings eventually was
interpreted as :
rprint ac zr(rprobe) zp(15)
which reorders to
rprint 0 0 zp(15) ac zr(rprobe)
which is syntactically correct. The correct response was:
Rprint: can't find model: zr
since you didn't supply a model card for zr.
This line asks for a semiconductor resistor model, with "zr" as the
model for AC analysis and "zp" for all others.
The problem is the conditional (ac) did not properly call the "expand"
function for all of its attachments, therefore the model call was never
expanded, leaving the null pointer, which caused the crash.
This slipped by because I never used the conditional and model together
like this. Since Spice doesn't have this feature, and it is a rather
exotic side effect of other features, probably nobody else used it
deliberately either.