kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #39014
Re: SIGTRAP crash with ngspice
-
To:
"Steven A. Falco" <stevenfalco@xxxxxxxxx>, kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Mon, 14 Jan 2019 18:21:44 -0500
-
Autocrypt:
addr=stambaughw@xxxxxxxxx; prefer-encrypt=mutual; keydata= mQGiBEM0hxQRBAC2fNh3YOVLu1d5GZ0SbrTNldGiGnCJPLqzEnqFX9v6jmf33TMt6EmSLkl6 Wtfkoj0nVwKxcYmJkA8DX0QAokBkwNIzhSsBzQvthBLIk/5LnPVVKrEXOcL4mUyH1doKlkaE slgJozNa6Av+oavcvD02o1zJOloBbaHlNlyRt7fKswCgtIFlVjWggVH/15KfWk+Qo5JVPbME AIUBAQyL2OAx0n60AWec2WHnO9buHuG0ibtICgUMkE+2MRmYyKwYRdyVwGoIUemFuOyHp0AJ InX4T+vy2E7vkwODqjtMLfIoRkokW74Fi4nrvjlhOAw/vdq/twLbAmR9MOfPTpR4y7kQy1O2 /n+RkkRvh26vTzfbQmrH7cBJhk6aA/9Uwvu3E4zNJgHVZeS0HyWtmR1eOPPRbnkPgJTToX5O KMKzTJI/FX6kT7cFoCamitHrW3BJP4Dx+cMMsa47EGxqVTdbVJ4LjogsXTXxb+0Fn1u4zBdx x3Cer6O7+hqWy7zvpzeC6nSREjqDKa5CgHtv/GLm5uFPOmsjAsnHj2tlBrQmV2F5bmUgU3Rh bWJhdWdoIDxzdGFtYmF1Z2h3QGdtYWlsLmNvbT6IeAQTEQIAOBYhBOffs6CbblRzBkv33BtR cWlZ+CReBQJbFBS2AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEBtRcWlZ+CReMI8A nRbrLkzp7+c2f0vX7sfg4ICX8LAKAJ9uClo4uJajmZa5zZrL2nKdZlUwIrkCDQRDNIcxEAgA gCru+3/aOC6RCjpvYC72wY+d5SmHphC6yeiV2/mOumyt5MLo/Ps2GznZr11JspqFk5K/Zpvp MMLqqjDZ39+50a2iKRQFJ6NlK+hJWMmj6eJygQrCwYo3Gjc6CqfrqUv+8VSnf/i5sIZmtOVA 4ZjML18MuBvMSsNdVLFJd5HNnYb1iOECpvqdPVh/21LLCEw7MUUGGnHBhCrmk2aJe5hFmcSN g4ldBcXrgMQBwf7aMVoobXBMFDb/IENByXn0llB7Gr2IFMRmNS9/p8s/II1Yl2bTqyX4FSz8 cfn7C9KEz7faZ7wzAcpwHFC/zs3JoAjJ0IEKdNUpIwAlKMzT3CzctwADBQf/cxpG28MKyrqk nNmq/8LQLy+x6FSYXBLjxQz9BiBNYeesDZQ6J5UbL1mjpJzMa5tLZypPYo4bbGyR22hrbyDF K7m6AcVaMIJKl98g4ukMutFfAJyRDaREH5Zl/X1P4u1Z/yaAIy9mKaNbaK1/5djNJ5wCTFen TUgAp9xdc30kGkFDdLJFp5uxDY4P0vaZiZdjUCvDM3Zjv5IzpNOfxVqTUBQNUP/BnnKhkk0p DTD6s3X8S+D0rOtEBQ8K0cwERI/E8EFa8nj0TNw4e2MYGR8wg+SxqJ7z5f0zPY0bO6G9DDFB wYCqzzPWGqdAh9vA5971TAbPERtdFybhkurozp2SfYhJBBgRAgAJBQJDNIcxAhsMAAoJEBtR cWlZ+CResHUAniULLCWiT26ieRTl7N2vS6vBo/DuAJ4m7Ss/gyiW6ybTn1ctDXAUgm2QVQ==
-
In-reply-to:
<f3a3424f-29c4-ccc2-da56-0cd543122f15@gmail.com>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1
On 1/14/19 1:06 PM, Steven A. Falco wrote:
> The issue was discussed here:
>
> https://forum.kicad.info/t/trying-to-get-ngspice-working-on-fedora/14628
>
> If you tell me what my "coding policy errors" are, or point me to something I should read, then I can do better next time.
http://docs.kicad-pcb.org/doxygen/md_Documentation_development_coding-style-policy.html
>
> I've attached a new copy of the patch - the code change is identical, the only difference is that it has the commit message prepended.
>
> Steve
>
> On 1/14/19 12:50 PM, Wayne Stambaugh wrote:
>> Steve,
>>
>> Please include the bug report link so I can link the patch to the bug
>> report. I'll fix the coding policy errors since I'm assuming this is as
>> one a done patch for you.
>>
>> Tom or Orson,
>>
>> Any objections to this patch. I didn't test it but on the surface it
>> appears to resolve the issue.
>>
>> Cheers,
>>
>> Wayne
>>
>> On 1/14/2019 10:30 AM, Steven A. Falco wrote:
>>> I wanted to close the loop on the SIGTRAP crash that I reported a few days ago.
>>>
>>> The issue is probably unique to Fedora, and stems from a huge quantity of "percent complete" messages that the ngspice library passes back to KiCad. I'm not kidding when I say huge - it amounts to over 1 megabyte of text, including many backspace characters. When I try to select the text, it probably blows up the clipboard and causes the crash.
>>>
>>> The ideal fix will be to have the Fedora ngspice maintainer remove a flag, which in turn will disable the "percent complete" messages.
>>>
>>> In the interim, I have a patch that filters out any line containing a string of backspaces. I don't know if there is any interest in applying this patch to the official KiCad sources, but I've attached it here in case there is interest. I see it as defensive programming. :-)
>>>
>>> I'll wait a bit to see what happens with the ngspice library. If it looks like there will be a substantial delay in having the flag removed, I can always apply my patch and push that as the next official Fedora build.
>>>
>>> Steve
>>>
>>> On 1/11/19 2:25 PM, Steven A. Falco wrote:
>>>> On 1/11/19 1:51 PM, Steven A. Falco wrote:
>>>>> On 1/11/19 1:21 PM, Seth Hillbrand wrote:
>>>>>> Am 2019-01-11 12:18, schrieb Steven A. Falco:
>>>>>>> I tried another ngspice experiment. I ran a simulation, and it
>>>>>>> worked, albeit with the data size warning I asked about earlier. So
>>>>>>> far so good.
>>>>>>
>>>>>> That warning was saying that it ran out of memory and had overwritten unplanned space. I would expect a crash after that. I'm not sure that KiCad can trap that kind of error as it occurred inside the library.
>>>>>
>>>>> Ok, but I'm concerned about the bug reports I'll get if I were to enable ngspice and push the build to the Fedora community.
>>>>>
>>>>> I'll wait to see if the forum has any thoughts on the warning. I'll only enable ngspice in the official Fedora builds if I can get to where the examples run cleanly.
>>>>
>>>> I saved the netlist from the simple example I've been running:
>>>>
>>>> .title KiCad schematic
>>>> V101 in 0 PULSE (0 5 1u 1u 1u 1 1)
>>>> C101 Net-_C101-Pad1_ 0 1u
>>>> C102 out 0 100n
>>>> R101 Net-_C101-Pad1_ in 10k
>>>> R102 out Net-_C101-Pad1_ 1k
>>>> .save @v101[i]
>>>> .save @c101[i]
>>>> .save @c102[i]
>>>> .save @r101[i]
>>>> .save @r102[i]
>>>> .save V(0)
>>>> .save V(GND)
>>>> .save V(Net-_C101-Pad1_)
>>>> .save V(in)
>>>> .save V(out)
>>>> .tran 1u 100m
>>>> .end
>>>>
>>>> When I run this circuit in stand-alone ngspice, it does a lot of overprinting, apparently to indicate the run-time of the job. Here is a small example of the character stream, where there are tons of backspaces as part of the overprinting:
>>>>
>>>> saf$ od -c foo
>>>> 0000000 % 0 . 0 0 \b \b \b \b \b % 0 . 0 0 \b
>>>> 0000020 \b \b \b \b % 0 . 0 0 \b \b \b \b \b % 0
>>>> 0000040 . 0 0 \b \b \b \n
>>>> 0000047
>>>>
>>>> The stand-alone captured output from this simple circuit is around 1 Mbyte! I'm guessing that this huge amount of data is blowing up the window and showing all of the strange characters.
>>>>
>>>> I'm not sure of the division of labor here. Is that something that a KiCad developer should address, or is it a library issue? Hopefully there is a flag that can be passed to the library to suppress the overprinted text.
>>>>
>>>> Steve
>>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
>>
>
Follow ups
References