Subject: | Window executable crashes when including Wx::Html in PAR::PACKER build |
Date: | Wed, 3 Dec 2014 10:10:35 +0000 |
To: | "bug-PAR-Packer [...] rt.cpan.org" <bug-PAR-Packer [...] rt.cpan.org> |
From: | "David Wong (davwong3)" <davwong3 [...] cisco.com> |
Hi
The problem occurs using the following versions:
* Window 7 32-bit
* Perl v 5.16.3
* wxPerl v 0.9921
* wxWidgets v 2.8.12
* Par::Packer v 1.023
The DispHTML.pl works very well on its own. However when I try to build a standalone executable using Par::Packer (DispHTML.bat enclosed), it then crashes. See attached par_packer_prob.jpg screenshot.
I also notice the problem is not confined to this module, basically whenever I include "Use Wx::Html" in a module (whether it is used in the module or not), the same problem arises.
Is it a bug or do I need to include some other libraries when running Par::Packer?
Just in case DispHTML.pl got blocked, here is the code:
#!c:/perl/bin/perl
use strict;
use warnings;
package MyApp;
use strict;
use warnings;
use base 'Wx::App';
sub OnInit {
my $frame = MyFrame->new;
$frame->Show(1); # modeless dialog
return 1;
}
package MyFrame;
use strict;
use warnings;
use Wx qw(:everything);
use base 'Wx::Frame';
use Wx::Event qw(EVT_PAINT);
use Wx::Html; # Html package not loaded by "use Wxqw(:everything)"
# Html pulls in all of the HTML modules
sub new {
my ($class) = @_;
my $self = Wx::Dialog->new(
undef, -1,
'CppTrial-pg340.pl',
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
&myStdDialogs($self);
return $self;
}
sub myStdDialogs {
my ( $self ) = @_;
my $topSizer = Wx::BoxSizer->new(wxVERTICAL);
my $html = Wx::HtmlWindow->new($self, wxID_ANY, wxDefaultPosition,
+
Wx::Size->new(600,400), wxHW_SCROLLBAR_NEVER);
$html->SetBorders(5);
$html->LoadPage("pg342.html");
$topSizer->Add($html, 1, wxALL, 10);
my $staticLine = Wx::StaticLine->new($self, wxID_ANY);
$topSizer->Add($staticLine, 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
my $button = Wx::Button->new($self, wxID_OK, "Ok");
$button->SetDefault();
$topSizer->Add($button, 0, wxALL | wxALIGN_RIGHT, 15);
$self->SetSizer($topSizer);
$topSizer->Fit($self);
$self->ShowModal(); # to show a modal dialog
}
##############################################################################
# Create the application object and pass control to it. This will call OnInit
#
package main;
#
###############################################################################
my $app = MyApp->new;
$app->MainLoop;
Thanks and regards
[http://www.cisco.com/web/europe/images/email/signature/logo01.jpg]
David Wong
ENGINEER.HARDWARE ENGINEERING
Small Cell Technology Group (SCTG)
davwong3@cisco.com<mailto:davwong3@cisco.com>
WebEx Social profile<http://iwe.cisco.com/web/davwong3>
Phone: +44 1793 755126
Cisco.com<http://www.cisco.com/>
[Think before you print.]Think before you print.
This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
Message body is not shown because it is too large.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.