Discussion:
[rt.cpan.org #100686] Window executable crashes when including Wx::Html in PAR::PACKER build
(too old to reply)
David Wong via RT
2014-12-03 10:10:59 UTC
Permalink
Wed Dec 03 05:10:58 2014: Request 100686 was acted upon.
Transaction: Ticket created by ***@cisco.com
Queue: PAR-Packer
Subject: Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >


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



[Loading Image...]

David Wong
ENGINEER.HARDWARE ENGINEERING
Small Cell Technology Group (SCTG)
***@cisco.com<mailto:***@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
David Wong via RT
2014-12-03 10:13:43 UTC
Permalink
Wed Dec 03 05:13:43 2014: Request 100686 was acted upon.
Transaction: Correspondence added by ***@cisco.com
Queue: PAR-Packer
Subject: RE: [rt.cpan.org #100686] AutoReply: Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >


Hi

The Par::Packer command I use:

pp -v 3 -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\libgcc_s_sjlj-1.dll -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\libstdc++-6.dll -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\wxbase28u_gcc_wxPerl.dll -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\wxmsw28u_adv_gcc_wxPerl.dll -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\wxmsw28u_core_gcc_wxPerl.dll -o DispHTML.exe -r DispHTML.pl -L DispHTML.log


David Wong
ENGINEER.HARDWARE ENGINEERING
Small Cell Technology Group (SCTG)
***@cisco.com
WebEx Social profile
Phone: +44 1793 755126

Cisco.com



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




-----Original Message-----
From: Bugs in PAR-Packer via RT [mailto:bug-PAR-***@rt.cpan.org]
Sent: Wednesday, December 03, 2014 10:11 AM
To: David Wong (davwong3)
Subject: [rt.cpan.org #100686] AutoReply: Window executable crashes when including Wx::Html in PAR::PACKER build


Greetings,

This message has been automatically generated in response to the creation of a trouble ticket regarding:
"Window executable crashes when including Wx::Html in PAR::PACKER build", a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been assigned an ID of [rt.cpan.org #100686]. Your ticket is accessible on the web at:

https://rt.cpan.org/Ticket/Display.html?id=100686

Please include the string:

[rt.cpan.org #100686]

in the subject line of all future correspondence about this issue. To do so, you may reply to this message.

Thank you,
bug-PAR-***@rt.cpan.org

-------------------------------------------------------------------------
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)
***@cisco.com<mailto:***@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
Roderich Schupp via RT
2014-12-03 12:18:01 UTC
Permalink
Wed Dec 03 07:17:59 2014: Request 100686 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >


Sorry, there's not much I can do to help you here -
wxperl/wxwidgets has always been problematic with PAR::Packer.

The problem might be caused by some Wx::* glue DLL [1] that references
another Wx::* glue DLL [2]. This gets broken by PAR::Packer as it
extracts glue DLLs with mangled names.

In that case, sometimes it seems to help to add the referenced glue DLL also as an -l option.

You may search the par mailing list (***@perl.org),
e.g. via http://www.mail-archive.com/***@perl.org/info.html
or on Google Groups, for similar problems.
pp -v 3 -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\libgcc_s_sjlj-1.dll -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\libstdc++-6.dll ...
These two -l options shouldn't be necessary.

Cheers, Roderich

[1] The "glue DLLs" are the files Wx\Wx.dll and Wx\Foo\Foo.dll located
somewhere below your C:\Perl\site\lib.

[2] If you have the objdump program from the Mingw32 toolchain
you can check which DLLs foo.dll references with

objdump -a -x foo.dll | grep "DLL Name"
Roderich Schupp via RT
2014-12-03 12:37:50 UTC
Permalink
Wed Dec 03 07:37:49 2014: Request 100686 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >
By the way, your comment " These two -l options shouldn't be
necessary." Is not true. See the attached screenshot.
What Perl distribution are you using?

Cheers, Roderich
David Wong via RT
2014-12-03 12:26:15 UTC
Permalink
Wed Dec 03 07:26:13 2014: Request 100686 was acted upon.
Transaction: Correspondence added by ***@cisco.com
Queue: PAR-Packer
Subject: RE: [rt.cpan.org #100686] Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >


Hi Roderich

Many thanks for the quick reply.

I will have try to search the net and see if I can find any solution.

By the way, your comment " These two -l options shouldn't be necessary." Is not true. See the attached screenshot.


David Wong
ENGINEER.HARDWARE ENGINEERING
Small Cell Technology Group (SCTG)
***@cisco.com
WebEx Social profile
Phone: +44 1793 755126

Cisco.com



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





-----Original Message-----
From: Roderich Schupp via RT [mailto:bug-PAR-***@rt.cpan.org]
Sent: Wednesday, December 03, 2014 12:18 PM
To: David Wong (davwong3)
Subject: [rt.cpan.org #100686] Window executable crashes when including Wx::Html in PAR::PACKER build

<URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >

Sorry, there's not much I can do to help you here - wxperl/wxwidgets has always been problematic with PAR::Packer.

The problem might be caused by some Wx::* glue DLL [1] that references another Wx::* glue DLL [2]. This gets broken by PAR::Packer as it extracts glue DLLs with mangled names.

In that case, sometimes it seems to help to add the referenced glue DLL also as an -l option.

You may search the par mailing list (***@perl.org), e.g. via http://www.mail-archive.com/***@perl.org/info.html
or on Google Groups, for similar problems.
pp -v 3 -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\libgcc_s_sjlj-1.dll -l C:\Perl\site\lib\Alien\wxWidgets\msw_2_8_12_uni_gcc_3_4\lib\libstdc++-6.dll ...
These two -l options shouldn't be necessary.

Cheers, Roderich

[1] The "glue DLLs" are the files Wx\Wx.dll and Wx\Foo\Foo.dll located somewhere below your C:\Perl\site\lib.

[2] If you have the objdump program from the Mingw32 toolchain you can check which DLLs foo.dll references with

objdump -a -x foo.dll | grep "DLL Name"
David Wong via RT
2014-12-03 13:31:56 UTC
Permalink
Wed Dec 03 08:31:55 2014: Request 100686 was acted upon.
Transaction: Correspondence added by ***@cisco.com
Queue: PAR-Packer
Subject: RE: [rt.cpan.org #100686] Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >


I am using Perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread


David Wong
ENGINEER.HARDWARE ENGINEERING
Small Cell Technology Group (SCTG)
***@cisco.com
WebEx Social profile
Phone: +44 1793 755126

Cisco.com



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





-----Original Message-----
From: Roderich Schupp via RT [mailto:bug-PAR-***@rt.cpan.org]
Sent: Wednesday, December 03, 2014 12:38 PM
To: David Wong (davwong3)
Subject: [rt.cpan.org #100686] Window executable crashes when including Wx::Html in PAR::PACKER build

<URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >
By the way, your comment " These two -l options shouldn't be
necessary." Is not true. See the attached screenshot.
What Perl distribution are you using?

Cheers, Roderich
Roderich Schupp via RT
2014-12-03 14:08:31 UTC
Permalink
Wed Dec 03 09:08:29 2014: Request 100686 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >
Post by David Wong via RT
I am using Perl 5, version 16, subversion 3 (v5.16.3) built for
MSWin32-x86-multi-thread
That's the version (and platform) of Perl, but not where you got it from -
ActiveState, Strawberry, ...

Cheers, Roderich
David Wong via RT
2014-12-03 14:11:01 UTC
Permalink
Wed Dec 03 09:11:01 2014: Request 100686 was acted upon.
Transaction: Correspondence added by ***@cisco.com
Queue: PAR-Packer
Subject: RE: [rt.cpan.org #100686] Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >


From ActiveState.

Thanks

David Wong
ENGINEER.HARDWARE ENGINEERING
Small Cell Technology Group (SCTG)
***@cisco.com
WebEx Social profile
Phone: +44 1793 755126

Cisco.com



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





-----Original Message-----
From: Roderich Schupp via RT [mailto:bug-PAR-***@rt.cpan.org]
Sent: Wednesday, December 03, 2014 2:09 PM
To: David Wong (davwong3)
Subject: [rt.cpan.org #100686] Window executable crashes when including Wx::Html in PAR::PACKER build

<URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >
Post by David Wong via RT
I am using Perl 5, version 16, subversion 3 (v5.16.3) built for
MSWin32-x86-multi-thread
That's the version (and platform) of Perl, but not where you got it from - ActiveState, Strawberry, ...

Cheers, Roderich
Roderich Schupp via RT
2014-12-03 14:50:29 UTC
Permalink
Wed Dec 03 09:50:27 2014: Request 100686 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Window executable crashes when including Wx::Html in PAR::PACKER build
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cisco.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100686 >
Post by David Wong via RT
From ActiveState.
OK, that explains
Post by David Wong via RT
By the way, your comment " These two -l options shouldn't be necessary." Is not true. See the attached screenshot.
because your wx stuff looks like it's built using the Mingw32 toolchain
(ActiveState build their stuff with Microsoft VisualStudio).
But this shouldn't be relevant for your problem.

It would be interesting to know what "real" name of the DLL that's mentioned
in your screenshot (3cbfbb3e.dll) is - PAR::Packer extracts (glue) DLLs
from the packed executable not with their original names, but with
a mangled one (IIRC the CRC32 checksum of the file).

Try to find this DLL on your disk, it should be located below a directory
named par-XXXXXXX in the "temp" directory of your Windows environment
(e.g check environment variables TEMP or TMP).

Then run

objdump -ax your.dll | grep Name (or Windows equivalent of grep)

Should print something like:

Table Stamp Chain Name Thunk
DLL Name: cygwin1.dll <---
vma: Hint/Ord Member-Name Bound-To
DLL Name: KERNEL32.dll <---
vma: Hint/Ord Member-Name Bound-To
DLL Name: cygperl5_14.dll <---
vma: Hint/Ord Member-Name Bound-To
Name 000000000000803c Clone.dll <===
[Name Pointer/Ordinal] Table 00000002
Name Pointer Table 0000000000008030

where <=== marks the "real" name and the <--- mark the DLLs referenced
(linked) from this DLL.


Cheers, Roderich

Loading...