[wxperl-users] Can't build wxperl 0.23 applications under PerlApp 5.8.3

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCB72CE089F2ABD02B61A490D
Content-Type: multipart/mixed;
 boundary="------------090808020409020606020000"

This is a multi-part message in MIME format.
--------------090808020409020606020000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Heyas,

Not sure if this is a problem with the wxPerl module or PerlApp, so I'm
going to send this message to both lists.

When I try to build the attached wxPerl program I get the following error:

"""
The instruction at "0x01217093" referenced memory at "0x01a73038". The
memory could not be "read".

Click on OK to terminate the program.
"""

This happens with my main application that I've been writing for over a
year, but it also happens with the "simple" case program which was
created using wxglade and with only a static text on the frame.

One thing I find really strange is that both of the memory locations
given remain the same even across a reboot and compiling different programs.

The output I get from PerlApp is:

"""
C:\Temp>perlapp helloworld.pl
PerlApp 5.3.0 build 530
Copyright (C) 1998-2003 ActiveState Corp.  All rights reserved.
ActiveState is a division of Sophos Plc.
Commercial license for Mike O'Connor <mike@oeg.com.au>

-e syntax OK
'helloworld.pl' had compilation errors.
"""

Platform is WinXP-SP2.

Any ideas?

Regards
Darryl


--------------090808020409020606020000
Content-Type: application/x-perl;
 name="helloworld.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="helloworld.pl"

#!/usr/bin/perl -w -- 
# generated by wxGlade 0.3.5.1 on Mon Jul 04 10:32:17 2005
# To get wxPerl visit http://wxPerl.sourceforge.net/

use Wx 0.15 qw[:allclasses];
use strict;

package MyFrame;

use Wx qw[:everything];
use base qw(Wx::Frame);
use strict;

sub new {
	my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_;
	$parent = undef              unless defined $parent;
	$id     = -1                 unless defined $id;
	$title  = ""                 unless defined $title;
	$pos    = wxDefaultPosition  unless defined $pos;
	$size   = wxDefaultSize      unless defined $size;
	$name   = ""                 unless defined $name;

# begin wxGlade: MyFrame::new

	$style = wxDEFAULT_FRAME_STYLE 
		unless defined $style;

	$self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style, $name );
	$self->{label_1} = Wx::StaticText->new($self, -1, "Hello World", wxDefaultPosition, wxDefaultSize, );

	$self->__set_properties();
	$self->__do_layout();

# end wxGlade
	return $self;

}


sub __set_properties {
	my $self = shift;

# begin wxGlade: MyFrame::__set_properties

	$self->SetTitle("frame_1");

# end wxGlade
}

sub __do_layout {
	my $self = shift;

# begin wxGlade: MyFrame::__do_layout

	$self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL);
	$self->{sizer_1}->Add($self->{label_1}, 0, wxFIXED_MINSIZE, 0);
	$self->SetAutoLayout(1);
	$self->SetSizer($self->{sizer_1});
	$self->{sizer_1}->Fit($self);
	$self->{sizer_1}->SetSizeHints($self);
	$self->Layout();

# end wxGlade
}

# end of class MyFrame

1;

package MyApp;

use base qw(Wx::App);
use strict;

sub OnInit {
	my( $self ) = shift;

	Wx::InitAllImageHandlers();

	my $frame_1 = MyFrame->new();

	$self->SetTopWindow($frame_1);
	$frame_1->Show(1);

	return 1;
}
# end of class MyApp

package main;

unless(caller){
	my $app = MyApp->new();
	$app->MainLoop();
}

--------------090808020409020606020000--

--------------enigCB72CE089F2ABD02B61A490D
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCyIy5/XQ6DbmPjokRAuLRAJsEFbHjvpUSNOaGNIKEqGM4u3oMAwCfcdFB
dc5ECL/kXxSa/8n0mUmcfrc=
=0fcS
-----END PGP SIGNATURE-----

--------------enigCB72CE089F2ABD02B61A490D--

0
bofh
7/4/2005 1:46:07 AM
perl.wxperl.users 3070 articles. 0 followers. Follow

2 Replies
547 Views

Similar Articles

[PageSpeed] 5

Hello

I also noticed a strange behaviour, though I am running against the 
previous release of wxperl. I'm compiling my program with par's pp and 
when I launch the program and I set the focus elswhere while the program 
is loading it crashes very badly with no error message but the microsoft 
window asking me to report the bug.

I'm also using xp sp2.

Thanks

Eriam Schaffter

Darryl Ross a �crit :

>Heyas,
>
>Not sure if this is a problem with the wxPerl module or PerlApp, so I'm
>going to send this message to both lists.
>
>When I try to build the attached wxPerl program I get the following error:
>
>"""
>The instruction at "0x01217093" referenced memory at "0x01a73038". The
>memory could not be "read".
>
>Click on OK to terminate the program.
>"""
>
>This happens with my main application that I've been writing for over a
>year, but it also happens with the "simple" case program which was
>created using wxglade and with only a static text on the frame.
>
>One thing I find really strange is that both of the memory locations
>given remain the same even across a reboot and compiling different programs.
>
>The output I get from PerlApp is:
>
>"""
>C:\Temp>perlapp helloworld.pl
>PerlApp 5.3.0 build 530
>Copyright (C) 1998-2003 ActiveState Corp.  All rights reserved.
>ActiveState is a division of Sophos Plc.
>Commercial license for Mike O'Connor <mike@oeg.com.au>
>
>-e syntax OK
>'helloworld.pl' had compilation errors.
>"""
>
>Platform is WinXP-SP2.
>
>Any ideas?
>
>Regards
>Darryl
>
>  
>

0
eriamschaffter
7/4/2005 8:33:19 AM
Hi.  The culprit is on line 5 of your test script:

use Wx 0.15 qw[:allclasses];

PerlApp chokes on the ":allclasses" parameter.  You can
probably just get rid of it like this

use Wx 0.15;

or explicitly name whatever classes you really need to use.


 >
 > Not sure if this is a problem with the wxPerl module or PerlApp, so I'm
 > going to send this message to both lists.
 >

Perhaps you might forward the following info to the other
list if you think it could help...

The real problem here is that, when it scans for dependencies
to package up, PerlApp can't deal with the "eval _get_packages()"
in the Wx::import sub of the Wx.pm module on line 63:

Wx.pm (wxPerl 0.23)
-------------------
56: # handle :allclasses specially
57: sub import {
58:   my $package = shift;
59:   my $count = 0;
60:   foreach ( @_ ) {
61:     m/^:/ or last;
62:     m/^:allclasses$/ and do {
63:       eval _get_packages();    ### <--- PerlApp crash!
64:
65:       die $@ if $@;
66:
67:       splice @_, $count, 1;
68:     };
69:
60:     ++$count;
61:   }
62:
63:   $package->export_to_level( 1, $package, @_ );
64: }

The _get_packages() sub is an XS function (which is loaded
from Wx.dll) that simply returns a static const string
containing the classes available in the particular wxPerl
build.

I found it is defined in Constant.xs in the wxPerl source,
and it uses the preprocessor to build up the static return
string based on the build parameters defined at the build
time of wxPerl itself:

Constant.xs (wxPerl 0.23)
-------------------------
2225: char*
2226: _get_packages()
2227:   CODE:
2228:     static const char packages[] = ""
2229: #if wxPERL_USE_DND && !defined(__WXMAC__) && !defined(__WXMOTIF__)
2230:     "use Wx::DND;"
2231: #endif
2232: #if wxPERL_USE_DOCVIEW && !defined(__WXMAC__)
2233:     "use Wx::DocView;"
2234: #endif
2235: #if wxPERL_USE_FILESYS
2236:     "use Wx::FS;"
2237: #endif
2238: #if wxPERL_USE_GRID
2239:     "use Wx::Grid;"
2240: #endif
2241: #if wxPERL_USE_HELP
2242:     "use Wx::Help;"
2243: #endif
2244: #if wxPERL_USE_HTML
2245:     "use Wx::Html;"
2246: #endif
2247: #if wxPERL_USE_MDI
2248:     "use Wx::MDI;"
2249: #endif
2250: #if wxPERL_USE_PRINTING_ARCHITECTURE
2251:     "use Wx::Print;"
2252: #endif
2253: #if wxPERL_USE_SOCKET
2254:     "use Wx::Socket;"
2255: #endif
2256: #if wxPERL_USE_CALENDAR
2257:     "use Wx::Calendar;"
2258: #endif
2259: #if wxPERL_USE_DATETIME
2260:     "use Wx::DateTime;"
2261: #endif
2262:     ;
2263:
2264:     RETVAL = (char*)packages;
2265:   OUTPUT:
2266:     RETVAL

For example, when I call it on WinXP, I get the following
return value from the function as output:

E:\Temp>perl -e "use Wx; print Wx::_get_packages();"
use Wx::DND;use Wx::DocView;use Wx::FS;use Wx::Grid;use
Wx::Help;use Wx::Html;use Wx::MDI;use Wx::Print;use
Wx::Socket;use Wx::Calendar;use Wx::DateTime;


Anyway, it's clear that "eval _get_packages();" is a fairly
straightforward *runtime* operation. I don't know if PerlApp
has any fancy techniques to handle even simple situations
like this in its dependency checking, before run-time.

If PerlApp merely does Perl-code-only source-level scanning,
it can never see static const strings containing the names
of class dependencies in autoloaded DLL functions. If it is
trying to do something more sophisticated with the eval,
maybe that's where the memory access crash is occurring...?


Best Regards,
-PWR



Darryl Ross wrote:
> Heyas,
> 
> Not sure if this is a problem with the wxPerl module or PerlApp, so I'm
> going to send this message to both lists.
> 
> When I try to build the attached wxPerl program I get the following error:
> 
> """
> The instruction at "0x01217093" referenced memory at "0x01a73038". The
> memory could not be "read".
> 
> Click on OK to terminate the program.
> """
> 
> This happens with my main application that I've been writing for over a
> year, but it also happens with the "simple" case program which was
> created using wxglade and with only a static text on the frame.
> 
> One thing I find really strange is that both of the memory locations
> given remain the same even across a reboot and compiling different programs.
> 
> The output I get from PerlApp is:
> 
> """
> C:\Temp>perlapp helloworld.pl
> PerlApp 5.3.0 build 530
> Copyright (C) 1998-2003 ActiveState Corp.  All rights reserved.
> ActiveState is a division of Sophos Plc.
> Commercial license for Mike O'Connor <mike@oeg.com.au>
> 
> -e syntax OK
> 'helloworld.pl' had compilation errors.
> """
> 
> Platform is WinXP-SP2.
> 
> Any ideas?
> 
> Regards
> Darryl
> 

0
Peter
7/6/2005 2:17:30 PM
Reply:

Similar Artilces:

[wxperl-users] wxPerl-0.20 Source Build on OSX.3.5/wxPython 2.5.2.7
I've just built wxPerl 0.20 as indicated in the subject, and I had a few issues: First, the syntax for wx-config used in Any_wx_config.pm::get_core_libs_25 seems to have changed: Instead of "--libs=list" it's now "--libs list". Next, Makemaker is building the root Makefile with both blibdirs: and blibdirs::. That produces an error. Changing the single colon to a double colon fixes the problem, but it has to be done every time one runs Makefile.PL. I couldn't figure out where to fix it in the MakeMaker files. Last, could you take out the...

Re:[wxperl-users] wxPerl-0.20 Source Build on OSX.3.5/wxPython 2.5.2.7
> I've just built wxPerl 0.20 as indicated in the subject, and I had a =0D = > few issues: > > First, the syntax for wx-config used in > Any_wx_c= onfig.pm::get_core_libs_25 seems to have changed: Instead of > "--libs=3D= list" it's now "--libs list". yes, it was changes in wxWidgets CVS l= ast week. > Next, Makemaker is building the root Makefile with both b= libdirs: and Which MakeMaker version? If 6.22, downgrade to 6.17 or= use the snapshot at makemaker.org. > blibdirs::. That produces an = error. Cha...

Re: [wxperl-users] wxPerl-0.20 Source Build on OSX.3.5/wxPython 2.5.2.7
> MakeMaker 6.21. Sorry. Below I meant to write: "If 6.21, downgrad= e to 6.17 or use the snapshot at makemaker.org." ^^^^ Regards=0D = Mattia > On Aug 18, 2004, at 11:56 PM, mattia.barbon@libero.it wrote:=0D = > ''' > >> Next, Makemaker is building the root Makefile with both blibd= irs: and > > > > Which MakeMaker version? If 6.22, downgrade to 6.17 = or > > use the snapshot at makemaker.org. > > > ... > > Thanks! > > = Mattia > > > > > > > > > &g...

[wxperl-users] [ANNOUNCE] wxPerl 0.23
A new version of wxPerl, the Perl bindings to wxWidgets, is out! You can download the sources from CPAN. Screenshots: http://wxperl.sourceforge.net/sshot01.html Binary packages for ActivePerl/Win32 8xx builds, Red Hat Linux and Mac OS X are available along with documentation in HTML and MS HTML Help format from http://wxperl.sourceforge.net/download.html Changes since the last release: - Added wxArtProvider and Wx::PlArtProvider (thanks to Matthew "Cheetah" Gabeler-Lee). - Compatibility with wxWidgets 2.5.4, 2.6.0 and 2.6.1. - Added Wx::PlPreviewFrame, W...

[wxperl-users] wxPerl 0.23 release
Hello, I have yet to update the site and send out the official anno= unce. You can get it from http://sourceforge.net/project/showfiles.ph= p?group_id=3D15655 The wxWidgets RPMs this release depends on can= be fond at: http://www.barbon.org/wxperl/0.23/wxWidgets/ (please n= ote that they are not from the wxWidgets team). Regards Mattia =0D = P.S.: phew... done, finally... =0A=0A=0A=0A____________________________= ________________________________=0ANavighi a 4 MEGA e i primi 3 mesi sono= GRATIS. =0AScegli Libero Adsl Flat senza limiti su http://www.li...

[wxperl-users] [ wxperl-Bugs-935780 ] WxPerl 0.18 fails to compile with wxGTK 2.5.1
Bugs item #935780, was opened at 2004-04-15 19:21 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115655&aid=935780&group_id=15655 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Philipp Thomas (psmt) Assigned to: Nobody/Anonymous (nobody) Summary: WxPerl 0.18 fails to compile with wxGTK 2.5.1 Initial Comment: When trying to compile WxPerl against wxGTK 2.5.1, g++ stops with an error because in 2.5.1 void wxLogTrace...

[wxperl-users] [ wxperl-Bugs-1237847 ] wxPerl does not build with wxUniversal
Bugs item #1237847, was opened at 2005-07-13 23:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115655&aid=1237847&group_id=15655 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Mattia Barbon (mbarbon) Assigned to: Nobody/Anonymous (nobody) Summary: wxPerl does...

[wxperl-users] Plans for wxPerl 0.23, wxWidgets 2.6.0
Hello, as some of you might already know, wxWidgets 2.6.0, the next stable wxWidgets release, has just been ...err... released. I would like to release wxPerl 0.23 as soon as RPMs become available, but I am definitely not going to provide binaries for all combinations of Perl 5.6.x/5.8.x, wxWidgets 2.4.2/2.6.0, Unicode/non Unicode, for Windows, GTK2, Mac OS X. I am going to provide only wxWidgets 2.6.x releases from now on, and I will consider if I will keep distributing Perl 5.6.x-enabled binaries. If anybody is willing to take the time to compile and relase wxWidgets 2.4....

[wxperl-users] Ubuntu wxPerl 0.65 with wxWidgets 2.8.0
I managed to get wxPerl 0.65 to build against the new wxWidgets 2.8.0. I used the Ubuntu wxWidgets binaries for 2.8.0 (http://www.wxwidgets.org/downloads/), but had a few problems with Alien::WxWidgets: mike@mbs:~/downloads/Alien-wxWidgets-0.25$ perl Build 'animate' library not found at inc/My/Build/Any_wx_config.pm line 141. 'deprecated' library not found at inc/My/Build/Any_wx_config.pm line 141. So I added this line to inc/My/Build/Any_wx_config.pm: next if $k =~ m/^animate|deprecated$/; just to see if things would build, etc. After that everything ...

[wxperl-users] Make Test failures on wxPerl 0.21 & wxPython 2.5.3.1 GTK
I've installed 0.21 on my laptop (Mandrake 10.0) and built it against a custom build of wxWidgets 2.5.3 from the wxPython 2.5.3.1 distro. Seems to work OK, except that tests 1 and 2 hang after completing the last test and test 8 segfaults at test 121. Oh, and the NotebookSizer thing kills the demo program... Regards, John Ralls ...

Re: [wxperl-users] compiling wxPerl 0.53 without 'Alien'
Hi, > is there a way to compile wxPerl 0.53 without 'Alien' ? No. Regards Mattia ...

Re: [wxperl-users] Plans for wxPerl 0.23, wxWidgets 2.6.0
Hello, > Mattia Barbon wrote: > > > I am going to provide only w= xWidgets 2.6.x releases from now on, > >and I will consider if I will ke= ep distributing Perl 5.6.x-enabled > >binaries. If anybody is willing to= take the time to compile and relase > >wxWidgets 2.4.x binaries, I will= most gratefully grant him/her the > >appropriate permissions, otherwise= I will just drop those combination from > >binary releases (I will keep= support in the sources). > > > > > If there is anyone who would sti= ll like sup...

Re: [wxperl-users] Ubuntu wxPerl 0.65 with wxWidgets 2.8.0
> I managed to get wxPerl 0.65 to build against the new wxWidgets 2.8.0. > > I used the Ubuntu wxWidgets binaries for 2.8.0 > (http://www.wxwidgets.org/downloads/), but had a few problems with > Alien::WxWidgets: > > mike@mbs:~/downloads/Alien-wxWidgets-0.25$ perl Build > 'animate' library not found at inc/My/Build/Any_wx_config.pm line 141. > 'deprecated' library not found at inc/My/Build/Any_wx_config.pm line 14= 1. > > So I added this line to inc/My/Build/Any_wx_config.pm: > > next if $k =3D~ m/^animate|deprecated...

[wxperl-users] problem building wxperl 0.20
Hello, I am trying to build WxPerl 0.20 and having a problem. I have Arch Linux installed with WxWidgets (WxGTK) 2.4.2 and Perl 5.8.5. Running "perl Makefile.PL" works fine. Here's the output from running "make". Any help you can provide would be much appreciated. Thanks, Scott Weisman sweisman@lexicon Wx-0.20]$ make /usr/bin/perl script/copy_files.pl files.lst cp cpp/overload.h blib/lib/Wx/cpp/overload.h cp cpp/wxapi.h blib/lib/Wx/cpp/wxapi.h cp cpp/constants.h blib/lib/Wx/cpp/constants.h cp cpp/helpers.h blib/lib/Wx/cpp/helpers.h cp cpp/setup.h...

Web resources about - [wxperl-users] Can't build wxperl 0.23 applications under PerlApp 5.8.3 - perl.wxperl.users

O'Reilly Open Source Convention 2007 • July 23-27, 2007 • Portland, Oregon
O'Reilly Open Source Convention 2007 - July 23-27, 2007 - Portland, Oregon

Resources last updated: 12/19/2015 7:29:49 PM