Hi Mattia, hi all,
I'm trying to debug occosional crashes (seg. faults) from Wx+threads,
but I haven't even gotten close to tracking down the problem yet. My
clueless idea was to build a debugging perl, debugging Alien::wxWidgets,
debugging Wx.pm, and then have fun (or not) with gdb.
I get as far as compiling Wx. Here's what I do:
- Check out the current 5.10 maint branch of perl.
--> ./Configure -DDEBUGGING -Dusethreads -Duse64bitall -Dusedevel
-DDEBUG_LEAKING_SCALARS -DPERL_USE_SAFE_PUTENV -de
The leaking scalars thing is to get more information about a memory leak
from threads+Wx. The PERL_USE_SAFE_PUTENV is because an old thread
suggested that the free-from-wrong-pool crashes are because of direct
ENV manipulation from perl. Search this group for the subject of this
mail for details.
Then, I run a look Alien::wxWidgets in the cpan shell and build it with:
perl Build.PL --debug --unicode
I need the --unicode. wxWidgets compiles, tests and installs okay. Next
up, I build Wx.pm with:
perl Makefile.PL --wx-debug --wx-unicode
make goes well, but whenever I use this Wx, I get
perl -Iblib/lib -Iblib/arch -MWx -e1
panic: free from wrong pool during global destruction.
The same happens for make test, of course.
Now, I'm entirely stuck here. I have no idea how to debug this issue, my
C debugging skills are sub-par. I'd love to hear how to get around this
initial obstacle, but I'd even prefer to learn how to debug these issues
myself. Any ideas how?
Best regards,
Steffen