When enabling boost::stacktrace on linux via -DENABLE_STACKTRACE=y, running a PD and closing PV results in a segfault:
--- stop_srd_session() called for 0xadc005b8 with session ID -1379921704
srd: Invalid session.
*** Error in `build/bin/pulseview': free(): invalid pointer: 0x0a5bfa48 ***
======= Backtrace: =========
Without boost::stacktrace, the session ID for the PD is always 1 and there's no issue when closing PV. With it, the session ID is consistently -1379921704 (at least on my machine), causing the error above.
Can't reproduce with today's build (1db57c03). I loaded the SR-file 'st_m24c02_powerup_and_reset.sr' from the dumps-repo and attached the I2C decoder to it, then closed PulseView -> no crash. Stacktraces are enabled ('Stack trace file is "/tmp/pv_stacktrace.dmp"'). Anything else I could try?
Thanks for revisiting this bug but I don't think boost::stacktrace is enabled in any of the public builds at the moment because boost::stacktrace can't resolve the symbol names, which needs solving before we can roll out this feature.
It's enabled by cmake -DENABLE_STACKTRACE.
Created attachment 622 [details]
Patch to enable stacktrace completely
I enabled stacktrace with the attached patch (which is under discussion on the mailing list), but I still can't reproduce the above error. I took a larger file from the dumps repo and closed pv when the decoder was still decoding, but all went fine for me.
Merged in b409dfdc01ed36b54f5b8a70b3738146a26bf37e, thanks!
I can confirm that it builds fine with cmake 3.16.3 and Boost 1.71 on Debian (which does ship a libbacktrace).
No segfaults or corrupted session IDs in a few quick tests for me, either.