Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the Tk CPAN distribution.

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

Owner: Nobody in particular
Requestors: duckseazon [...]
Cc: CAC [...]

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

Subject: Tk with LibXML crash
From: duckseazon [...]
Download (untitled) / with headers
text/plain 1.9k
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/ my $w = shift; >> C:/Strawberry/perl/site/lib/Tk/ $w->configure('-state =>'normal') if ($w->cget('-state') ne 'disabled'); >> C:/Strawberry/perl/site/lib/Tk/ if (exists $w->{__relief__}) >> C:/Strawberry/perl/site/lib/Tk/ if (exists $w->{__prelief__} && >> C:/Strawberry/perl/site/lib/Tk/ delete $w->{__relief__}; >> C:/Strawberry/perl/site/lib/Tk/ delete $w->{__prelief__}; >> C:/Strawberry/perl/site/lib/Tk/ undef $Tk::window; >> C:/Strawberry/perl/site/lib/ DoOneEvent(0); >> C:/Strawberry/perl/site/lib/ DoOneEvent(0);
Free to wrong pool 369f80 not 29dd8a50 at C:/Strawberry/perl/site/lib/ line 424.
Is there a recipe for creating a large XML file that this crashes with? Using Strawberry Perl 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>
Repeated line
Repeated line
Repeated line
Repeated line

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to