Bug 170 - PulseView crashs on protocol decoder delete and recreate
Summary: PulseView crashs on protocol decoder delete and recreate
Status: RESOLVED FIXED
Alias: None
Product: libsigrokdecode
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal critical
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
: 174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-15 05:36 CEST by Matt Ranostay
Modified: 2014-04-22 21:25 CEST (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Ranostay 2013-10-15 05:36:36 CEST
Delete a decoder trace marker and add a new one results in a segfault.
Comment 1 Joel Holdsworth 2013-10-16 15:22:00 CEST
*** Bug 174 has been marked as a duplicate of this bug. ***
Comment 2 Bert Vermeulen 2013-10-16 16:38:20 CEST
Commit 7fc7bde666b3c1234e3d9612caa0388381881059 properly returns an error, allowing Pulseview to detect something went wrong.

The problem happens in srd_inst_option_set(), which is called by srd_inst_new() with the passed-in GHashTable *options.
Comment 3 Bert Vermeulen 2013-10-17 16:29:58 CEST
Fixed in 119d62586036f4436de8e11824e388c3f0a882c4
Comment 4 Joel Holdsworth 2013-10-17 16:51:25 CEST
Testing PulseView with the latest Git version of PulseView and libsigrokdecode, I get the following error when I add a second decoder:

----------------- >8 --------------------
Fatal Python error: GC object already tracked

Current thread 0x00007f06775217c0:
srd: Aborted
----------------- 8< --------------------
Comment 5 Joel Holdsworth 2013-10-17 16:53:24 CEST
On a second run it gave me this error:

----------------- >8 --------------------
Fatal Python error: GC object already tracked

Current thread 0xsrd: Protocol decoder instance uart: TypeError: ((((<NULL>,),),),)00007f1b276e87c0
:
  File "/home/joel/share/libsigrokdecode/decoders/uart/pd.py", line 301 in decode
Aborted
----------------- 8< --------------------
Comment 6 Uwe Hermann 2013-10-18 02:13:10 CEST
I can reproduce the "Fatal Python error: GC object already tracked" and other errors mentioned by Joel below, but those only happen when two PDs run at the same time. That issue should be tracked in a separate bug, I guess.

The one mentioned in this bug (add PD in PulseView, remove it, then re-add another one (or the same one)) works fine for me now with libsigrokdecode git HEAD.

It also works fine to add two PDs in PulseView now, as long as the second one is only added after the first one has finished decoding (i.e. they don't run at the same time).
Comment 7 Uwe Hermann 2013-10-18 14:52:07 CEST
This is fixed in git HEAD, via one of (or both of):

119d62586036f4436de8e11824e388c3f0a882c4
308d9958c9b4ca8f7126d7e8c81be3b93749a2b1
Comment 8 Uwe Hermann 2014-04-22 21:25:38 CEST
Moving to libsigrokdecode, this was not a PulseView bug.