http://www.perlmonks.org?node_id=1026800

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Try it out if you can, report if you get segfault like me (I got itrusperl-standard-51601-msw-x86-017.zip with latest dev bundle), program is translation of http://wiki.wxwidgets.org/WxAUI

Faulting application perl.exe, version 0.0.0.0, faulting module wxbase294u_gcc_citrusperl.dll, version 2.9.4.0, fault address 0x001d52da.

#!/usr/bin/perl -- use strict; use warnings; use Wx; use Wx::AUI; ### http://wiki.wxwidgets.org/WxAUI #~ Faulting application perl.exe, version 0.0.0.0, faulting module wxb +ase294u_gcc_citrusperl.dll, version 2.9.4.0, fault address 0x001d52da +. sub wxT { join'', @_ } sub _ { join'', @_ } my $app = Wx::SimpleApp->new; my $pops= Wx::Frame->new( undef, -1, "pops", [55,55], [55,55], ); $pops->Show; my $this = Wx::Frame->new( $pops, -1, "myframe3", [ -1, -1 ], [ -1, -1 ], Wx::wxDEFAULT_FRAME_STYLE() | Wx::wxTAB_TRAVERSAL() ); { my $m_mgr = Wx::AuiManager->new(); ## // notify wxAUI which frame to use $m_mgr->SetManagedWindow($this); ## // create several text controls my $text1 = Wx::TextCtrl->new( $this, -1, _("Pane 1 - sample text"), Wx::wxDefaultPosition(), Wx::Size->new( ( 200, 150 ) ), Wx::wxNO_BORDER() | Wx::wxTE_MULTILINE() ); my $text2 = Wx::TextCtrl->new( $this, -1, _("Pane 2 - sample text"), Wx::wxDefaultPosition(), Wx::Size->new( ( 200, 150 ) ), Wx::wxNO_BORDER() | Wx::wxTE_MULTILINE() ); my $text3 = Wx::TextCtrl->new( $this, -1, _("Main content window"), Wx::wxDefaultPosition(), Wx::Size->new( ( 200, 150 ) ), Wx::wxNO_BORDER() | Wx::wxTE_MULTILINE() ); ## // add the panes to the manager $m_mgr->AddPane( $text1, Wx::wxLEFT(), wxT("Pane Number One") ); $m_mgr->AddPane( $text2, Wx::wxBOTTOM(), wxT("Pane Number Two") ); $m_mgr->AddPane( $text3, Wx::wxCENTER(), "" ); #~ $m_mgr->AddPane( $text1, Wx::AuiPaneInfo->new->Name( "Pane Numb +er One" )->Left->Position( 1 )->Resizable ); #~ $m_mgr->AddPane( $text2, Wx::AuiPaneInfo->new->Name( "Pane Numb +er Two" )->Bottom->Position( 1 )->Resizable ); #~ $m_mgr->AddPane( $text3, Wx::AuiPaneInfo->new->Name( "Pane Numb +er Three" )->CenterPane->Position( 1 )->Resizable ); ## // tell the manager to "commit" all the changes just made $m_mgr->Update(); } $this->Show; ## memory access violation here $app->MainLoop;