Skip Menu |

This queue is for tickets about the Wx CPAN distribution.

Report information
The Basics
Id: 59916
Status: open
Priority: 0/
Queue: Wx

People
Owner: Nobody in particular
Requestors: REHSACK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.9701
  • 0.9702
Fixed in: (no value)



Subject: Wx makes perl dumping core when no DISPLAY set
Hi Mattia, I've seen RT#41716 - and this RT is more or less the same report with another background. We (pkgsrc) package some perl modules using Wx - at least Padre and some plugins. All these package fail the bulk builds with perl core dumps, because of the Wx requirement. I used the severity "Critical", because this bug prevents creating of binary packages for those modules. A backtrace of the dump is included. You can reproduce it simply by doing "env DISPLAY= prove t". Best regards, Jens
Subject: bt.txt
Program terminated with signal 11, Segmentation fault. #0 0x00007f7ffc2dc4f8 in wxPli_match_arguments_offset (my_perl=0x7f7ffd703000, prototype=@0x0, required=1, allow_more=true, offset=<value optimized out>) at cpp/overload.cpp:76 76 size_t max = wxMin( prototype.count, size_t(argc) ) + offset; (gdb) bt #0 0x00007f7ffc2dc4f8 in wxPli_match_arguments_offset (my_perl=0x7f7ffd703000, prototype=@0x0, required=1, allow_more=true, offset=<value optimized out>) at cpp/overload.cpp:76 #1 0x00007f7ffc2dc7de in wxPli_match_arguments (my_perl=0x7f7ffd703000, prototype=@0x0, required=-42901372, allow_more=7) at cpp/overload.cpp:54 #2 0x00007f7ffc2dcdd6 in XS_Wx__xsmatch (my_perl=0x7f7ffd703000, cv=<value optimized out>) at Wx.c:560 #3 0x00007f7ffd89d403 in Perl_pp_entersub () from /usr/pkg/lib/perl5/5.10.0/x86_64-netbsd-thread-multi/CORE/libperl.so #4 0x00007f7ffd89bf0a in Perl_runops_standard () from /usr/pkg/lib/perl5/5.10.0/x86_64-netbsd-thread-multi/CORE/libperl.so #5 0x00007f7ffd846a50 in Perl_call_sv () from /usr/pkg/lib/perl5/5.10.0/x86_64-netbsd-thread-multi/CORE/libperl.so #6 0x00007f7ffc2c5cbe in XS_Wx___App_Start (my_perl=0x7f7ffd703000, cv=<value optimized out>) at Wx.c:129 #7 0x00007f7ffd89d403 in Perl_pp_entersub () from /usr/pkg/lib/perl5/5.10.0/x86_64-netbsd-thread-multi/CORE/libperl.so #8 0x00007f7ffd89bf0a in Perl_runops_standard () from /usr/pkg/lib/perl5/5.10.0/x86_64-netbsd-thread-multi/CORE/libperl.so #9 0x00007f7ffd847446 in perl_run () from /usr/pkg/lib/perl5/5.10.0/x86_64-netbsd-thread-multi/CORE/libperl.so #10 0x0000000000400e71 in main () Current language: auto; currently c++ (gdb)
Subject: Re: [rt.cpan.org #59916] Wx makes perl dumping core when no DISPLAY set
Date: Sun, 01 Aug 2010 12:34:31 +0200
To: bug-Wx [...] rt.cpan.org
From: Mattia Barbon <mattia.barbon [...] libero.it>
Jens Rehsack via RT wrote: Hi, Show quoted text
> I've seen RT#41716 - and this RT is more or less the same report with > another background. > > We (pkgsrc) package some perl modules using Wx - at least Padre and some > plugins. All these package fail the bulk builds with perl core dumps, > because of the Wx requirement.
If you do a simple 'use Wx', does it crash that way? Is there a simple test case for the bug? Show quoted text
> I used the severity "Critical", because this bug prevents creating of > binary packages for those modules. > > A backtrace of the dump is included. > > You can reproduce it simply by doing "env DISPLAY= prove t".
Regards, Mattia
On Sun Aug 01 06:35:07 2010, mattia.barbon@libero.it wrote: Show quoted text
> Jens Rehsack via RT wrote: > > Hi, >
> > I've seen RT#41716 - and this RT is more or less the same report with > > another background. > > > > We (pkgsrc) package some perl modules using Wx - at least Padre and some > > plugins. All these package fail the bulk builds with perl core dumps, > > because of the Wx requirement.
> > If you do a simple 'use Wx', does it crash that way? Is there a > simple test case for the bug?
$ env DISPLAY= perl -e 'use Wx qw(:allclasses); print wxYES, "\n";'; Error: Unable to initialize gtk, is DISPLAY set properly? Segmentation fault (core dumped) $ env DISPLAY= perl -e 'use Wx qw(wxYES); print wxYES, "\n";';Error: Unable to initialize gtk, is DISPLAY set properly? 2 $ env DISPLAY= perl -Mblib t/01_load.t 1..6 Error: Unable to initialize gtk, is DISPLAY set properly? Use of uninitialized value $Wx::_universal in concatenation (.) or string at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 160. Use of uninitialized value $Wx::_static in concatenation (.) or string at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 161. ok 1 - use Wx; Segmentation fault (core dumped) How much simpler should the test case be? I'm sorry, I'm no GUI developer, neither using Wx nor any other graphics library. I can't do more than showing you with your own code, where it fails. Show quoted text
> > I used the severity "Critical", because this bug prevents creating of > > binary packages for those modules. > > > > A backtrace of the dump is included. > > > > You can reproduce it simply by doing "env DISPLAY= prove t".
Best regards, Jens
CC: wxperl-users [...] perl.org
Subject: Re: [rt.cpan.org #59916] Wx makes perl dumping core when no DISPLAY set
Date: Thu, 12 Aug 2010 22:52:42 +0200
To: bug-Wx [...] rt.cpan.org
From: Mattia Barbon <mattia.barbon [...] libero.it>
Jens Rehsack via RT wrote: Hi, Show quoted text
> On Sun Aug 01 06:35:07 2010, mattia.barbon@libero.it wrote:
>> Jens Rehsack via RT wrote: >> >> Hi, >>
>>> I've seen RT#41716 - and this RT is more or less the same report with >>> another background. >>> >>> We (pkgsrc) package some perl modules using Wx - at least Padre and some >>> plugins. All these package fail the bulk builds with perl core dumps, >>> because of the Wx requirement.
>> If you do a simple 'use Wx', does it crash that way? Is there a >> simple test case for the bug?
> > $ env DISPLAY= perl -e 'use Wx qw(:allclasses); print wxYES, "\n";'; > Error: Unable to initialize gtk, is DISPLAY set properly? > Segmentation fault (core dumped) > > $ env DISPLAY= perl -e 'use Wx qw(wxYES); print wxYES, "\n";';Error: > Unable to initialize gtk, is DISPLAY set properly? > 2 > > $ env DISPLAY= perl -Mblib t/01_load.t > 1..6 > Error: Unable to initialize gtk, is DISPLAY set properly? > Use of uninitialized value $Wx::_universal in concatenation (.) or > string at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 160. > Use of uninitialized value $Wx::_static in concatenation (.) or string > at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 161. > ok 1 - use Wx; > Segmentation fault (core dumped) > > How much simpler should the test case be?
This simple... from the first bug report I got the impression that the problem occurred in the Padre test suite. Show quoted text
> I'm sorry, I'm no GUI developer, neither using Wx nor any other graphics > library. I can't do more than showing you with your own code, where it > fails.
I am not using NetBSD either, and I might say the same thing :-) anyway, I'm currently installing NetBSD in a VM. I'm not sure when I will be able to look into the crash; keep in mind thath Wx is never going to pass any tests with display unset, the best I can do is to make it fail without a crash. Regarda, Mattia Show quoted text
>>> I used the severity "Critical", because this bug prevents creating of >>> binary packages for those modules. >>> >>> A backtrace of the dump is included. >>> >>> You can reproduce it simply by doing "env DISPLAY= prove t".
> > Best regards, > Jens
On Thu Aug 12 16:53:02 2010, mattia.barbon@libero.it wrote: Show quoted text
> Jens Rehsack via RT wrote: > > Hi, >
> > On Sun Aug 01 06:35:07 2010, mattia.barbon@libero.it wrote:
> >> Jens Rehsack via RT wrote: > >> > >> Hi, > >>
> >>> I've seen RT#41716 - and this RT is more or less the same report with > >>> another background. > >>> > >>> We (pkgsrc) package some perl modules using Wx - at least Padre
and some Show quoted text
> >>> plugins. All these package fail the bulk builds with perl core dumps, > >>> because of the Wx requirement.
> >> If you do a simple 'use Wx', does it crash that way? Is there a > >> simple test case for the bug?
> > > > $ env DISPLAY= perl -e 'use Wx qw(:allclasses); print wxYES, "\n";'; > > Error: Unable to initialize gtk, is DISPLAY set properly? > > Segmentation fault (core dumped) > > > > $ env DISPLAY= perl -e 'use Wx qw(wxYES); print wxYES, "\n";';Error: > > Unable to initialize gtk, is DISPLAY set properly? > > 2 > > > > $ env DISPLAY= perl -Mblib t/01_load.t > > 1..6 > > Error: Unable to initialize gtk, is DISPLAY set properly? > > Use of uninitialized value $Wx::_universal in concatenation (.) or > > string at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 160. > > Use of uninitialized value $Wx::_static in concatenation (.) or string > > at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 161. > > ok 1 - use Wx; > > Segmentation fault (core dumped) > > > > How much simpler should the test case be?
> > This simple... from the first bug report I got the impression that > the problem occurred in the Padre test suite.
My fault - there I detected it first time. I'm a bit EHEADEVERYWHERE at the moment, sorry. Show quoted text
> > I'm sorry, I'm no GUI developer, neither using Wx nor any other graphics > > library. I can't do more than showing you with your own code, where it > > fails.
> > I am not using NetBSD either, and I might say the same thing :-)
Again my fault. It crashes on MacOS X (X11 environment), Ubuntu and Solaris, too. It's not related to NetBSD. Show quoted text
> anyway, I'm currently installing NetBSD in a VM. I'm not sure when I > will be able to look into the crash; keep in mind thath Wx is never > going to pass any tests with display unset, the best I can do is to make > it fail without a crash.
If it wouldn't dump core on 'use Wx qw(:allclasses);', would be enough. I don't want request a magical fix what might bring Wx working without an output device, but a core dump leads me to the assumption, that something is going heavily wrong. Cheers, Jens
CC: wxperl-users [...] perl.org
Subject: Re: [rt.cpan.org #59916] Wx makes perl dumping core when no DISPLAY set
Date: Sun, 15 Aug 2010 19:15:09 +0200
To: bug-Wx [...] rt.cpan.org
From: Mattia Barbon <mattia.barbon [...] libero.it>
Jens Rehsack via RT wrote: Hi, Show quoted text
> On Thu Aug 12 16:53:02 2010, mattia.barbon@libero.it wrote:
>> Jens Rehsack via RT wrote: >> >> Hi, >>
>>> On Sun Aug 01 06:35:07 2010, mattia.barbon@libero.it wrote:
>>>> Jens Rehsack via RT wrote: >>>> >>>> Hi, >>>>
>>>>> I've seen RT#41716 - and this RT is more or less the same report with >>>>> another background. >>>>> >>>>> We (pkgsrc) package some perl modules using Wx - at least Padre
> and some
>>>>> plugins. All these package fail the bulk builds with perl core dumps, >>>>> because of the Wx requirement.
>>>> If you do a simple 'use Wx', does it crash that way? Is there a >>>> simple test case for the bug?
>>> $ env DISPLAY= perl -e 'use Wx qw(:allclasses); print wxYES, "\n";'; >>> Error: Unable to initialize gtk, is DISPLAY set properly? >>> Segmentation fault (core dumped) >>> >>> $ env DISPLAY= perl -e 'use Wx qw(wxYES); print wxYES, "\n";';Error: >>> Unable to initialize gtk, is DISPLAY set properly? >>> 2 >>> >>> $ env DISPLAY= perl -Mblib t/01_load.t >>> 1..6 >>> Error: Unable to initialize gtk, is DISPLAY set properly? >>> Use of uninitialized value $Wx::_universal in concatenation (.) or >>> string at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 160. >>> Use of uninitialized value $Wx::_static in concatenation (.) or string >>> at /usr/pkgsrc/x11/p5-Wx/work/Wx-0.9702/blib/lib/Wx.pm line 161. >>> ok 1 - use Wx; >>> Segmentation fault (core dumped) >>> >>> How much simpler should the test case be?
>> This simple... from the first bug report I got the impression that >> the problem occurred in the Padre test suite.
> > My fault - there I detected it first time. I'm a bit EHEADEVERYWHERE at > the moment, sorry. >
>>> I'm sorry, I'm no GUI developer, neither using Wx nor any other graphics >>> library. I can't do more than showing you with your own code, where it >>> fails.
>> I am not using NetBSD either, and I might say the same thing :-)
> > Again my fault. It crashes on MacOS X (X11 environment), Ubuntu and > Solaris, too. > It's not related to NetBSD.
Actually, I did try under Linux and it did not crash; I tried now and I can reproduce it; no idea what I did wrong the first time... Show quoted text
>> anyway, I'm currently installing NetBSD in a VM. I'm not sure when I >> will be able to look into the crash; keep in mind thath Wx is never >> going to pass any tests with display unset, the best I can do is to make >> it fail without a crash.
> > If it wouldn't dump core on 'use Wx qw(:allclasses);', would be enough. > I don't want request a magical fix what might bring Wx working without > an output device, but a core dump leads me to the assumption, that > something is going heavily wrong.
Agreed. Debugging it further, the failure is inside wxWidgets and is not fixable: if the wxWidgets initialization fails, using it to load libraries (as done by :allclasses) is always going to crash (because some needed non-GUI components are not initialized). I added some code that die()s if the wxWidgets initialization fails: $ perl -Mblib -MWx=:allclasses -e 42 Error: Unable to initialize gtk, is DISPLAY set properly? Failed to initialize wxWidgets at -e line 0 Compilation failed in require. BEGIN failed--compilation aborted. $ HTH, Mattia
On Sun Aug 15 13:15:30 2010, mattia.barbon@libero.it wrote: Show quoted text
> Jens Rehsack via RT wrote:
[...] Show quoted text
> Actually, I did try under Linux and it did not crash; I tried now and > I can reproduce it; no idea what I did wrong the first time...
EHEADELSEWHERE - good that you now can reproduce it. Show quoted text
> >> anyway, I'm currently installing NetBSD in a VM. I'm not sure when I > >> will be able to look into the crash; keep in mind thath Wx is never > >> going to pass any tests with display unset, the best I can do is to
make Show quoted text
> >> it fail without a crash.
> > > > If it wouldn't dump core on 'use Wx qw(:allclasses);', would be enough. > > I don't want request a magical fix what might bring Wx working without > > an output device, but a core dump leads me to the assumption, that > > something is going heavily wrong.
> > Agreed. Debugging it further, the failure is inside wxWidgets and is > not fixable: if the wxWidgets initialization fails, using it to load > libraries (as done by :allclasses) is always going to crash (because > some needed non-GUI components are not initialized). I added some code > that die()s if the wxWidgets initialization fails: > > $ perl -Mblib -MWx=:allclasses -e 42 > Error: Unable to initialize gtk, is DISPLAY set properly? > Failed to initialize wxWidgets at -e line 0 > Compilation failed in require. > BEGIN failed--compilation aborted. > $
This is a good step - with this it's possible to debug which library is buggy and open RT's there. Thanks, Jens