Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 130268
Status: open
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: duckseazon [...] gmail.com
Cc: CAC [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Tk with LibXML crash
From: duckseazon [...] gmail.com
Hello, whenever I'm trying to load a 290MB XML file using Tk and LibXML the script crashes. I'm on Windows 7 64bit with 8GB of RAM using strawberry 'perl 5, version 30, subversion 0 (v5.30.0) built for MSWin32-x64-multi-thread'. Tk and LibXML were downloaded from CPAN 3 days ago Here's the script. It doesn't crash on smaller XML files (~200MB), just crashes on the big ones. XML loads fine when I remove Tk from the script. use strict; use warnings; use XML::LibXML; use Tk; my $xpc; my $mw = MainWindow->new( -title => 'GUI' ); $mw->Button( -text => 'Load XML', -command => [ \&tk_Load_Export , \$xpc ], )->grid(-column => '0', -row => '0', -sticky => 'e'); MainLoop; sub tk_Load_Export { my( $ref_xpc ) = @_; #~ my $filename = $mw->getOpenFile( -title => 'Load XML', -default+extension => '.xml', -initialdir => '.' ) or return; my $filename = 'big.xml'; import_XML( $filename , $ref_xpc ); } sub import_XML { my( $filename , $ref_xpc ) = @_; print "Reading the XML file $filename\n\n"; undef $$xpc; # free previous $dom my $dom = XML::LibXML->load_xml(location => $filename, huge => 1); $$xpc = XML::LibXML::XPathContext->new($dom); print "XML imported\n"; } The script crashes with: Show quoted text
>> C:/Strawberry/perl/site/lib/Tk/Button.pm:86: my $w = shift; >> C:/Strawberry/perl/site/lib/Tk/Button.pm:87: $w->configure('-state =>'normal') if ($w->cget('-state') ne 'disabled'); >> C:/Strawberry/perl/site/lib/Tk/Button.pm:90: if (exists $w->{__relief__}) >> C:/Strawberry/perl/site/lib/Tk/Button.pm:92: if (exists $w->{__prelief__} && >> C:/Strawberry/perl/site/lib/Tk/Button.pm:97: delete $w->{__relief__}; >> C:/Strawberry/perl/site/lib/Tk/Button.pm:98: delete $w->{__prelief__}; >> C:/Strawberry/perl/site/lib/Tk/Button.pm:100: undef $Tk::window; >> C:/Strawberry/perl/site/lib/Tk.pm:424: DoOneEvent(0); >> C:/Strawberry/perl/site/lib/Tk.pm:424: DoOneEvent(0);
Free to wrong pool 369f80 not 29dd8a50 at C:/Strawberry/perl/site/lib/Tk.pm line 424.
Is there a recipe for creating a large XML file that this crashes with? Using Strawberry Perl 5.30.2.1 64-bit, XML::LibXML 2.0203, and Tk 804.035, I tried a simple but large XML file (~290MB) like the following, but did not observe a crash:

<!DOCTYPE html>
<html>
<body>
<p>
Repeated line
Repeated line
Repeated line
Repeated line
</p>
</body>
</html>