wxPGProp crash fix

Discussion about CodeLite development process and patches
petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

wxPGProp crash fix

Post by petah »

Hi Eran,

CL crashes on opening a project pref whose debugger entry can't be found, f.ex. when prefs had lldb stored, then are opened on a different PC where lldb isn't installed, wx ends up indexing an array with -1.

I'm pretty sure I saw similar crashes before when build configs across machines used different compiler names like "gcc49" vs "gcc-4.9" so I ended up patching wx, but recommend you use a wxProperty wrapper with an exception handler for release builds because wxproperty accessors return references.

Code: Select all

#0  0x00007ff976ae7199 in __libc_waitpid (pid=22644, 
    stat_loc=stat_loc@entry=0x7fff0c244520, options=options@entry=0)
    at ../sysdeps/unix/sysv/linux/waitpid.c:40
#1  0x00007ff976a7118b in do_system (line=<optimized out>)
    at ../sysdeps/posix/system.c:148
#2  0x0000000000817921 in WaitForDebugger (signo=11)
    at /home/plaufenb/development/git/codelite/LiteEditor/app.cpp:232
#3  <signal handler called>
#4  0x00007ff979aa2a55 in CrashRecoverySignalHandler(int) ()
   from /home/plaufenb/development/build/clD_bin/lib/codelite/libclang.so
#5  <signal handler called>
#6  0x00007ff97c41b5f0 in wxPGChoiceEntry::GetValue (this=0x180243ffe8)
    at /home/plaufenb/development/git/wxTrunk/include/wx/propgrid/property.h:757
#7  0x00007ff97c41b7c6 in wxPGChoices::GetValue (this=0x23b5b88, 
    ind=4294967295)
    at /home/plaufenb/development/git/wxTrunk/include/wx/propgrid/property.h:992
#8  0x00007ff97c441c66 in wxPGProperty::SetChoiceSelection (this=0x23b5a40, 
    newValue=-1)
    at /home/plaufenb/development/git/wxTrunk/src/propgrid/property.cpp:2014
#9  0x0000000000782fc4 in PSGeneralPage::Load (this=0x23ab280, buildConf=...)
    at /home/plaufenb/development/git/codelite/LiteEditor/ps_general_page.cpp:90
thx & cheers,

-- p
You do not have the required permissions to view the files attached to this post.
main: Debian Jessie x64 + custom wxTrunk
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxPGProp crash fix

Post by eranif »

Thanks, I already fixed this in git master, simply by making sure that the correct index is passed to SetChoiceSelection
Make sure you have read the HOW TO POST thread
Post Reply