Hello Perl Monks, I'm trying to load a 290MB XML file using Tk and LibXML. 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'
This is the stripped down version of the script that's been crashing:
use strict; use XML::LibXML; use Tk; my $filename; my $xpc; my $mw = MainWindow->new( -title => 'GUI' ); $mw->Button( -text => 'Load XML', -command => \&tk_Load_Export )->grid +(-column => '0', -row => '0', -sticky => 'e'); MainLoop; sub tk_Load_Export { $filename = $mw->getOpenFile( -title => 'Load XML', -defaultextensio +n => '.xml', -initialdir => '.' ) or return; import_XML($filename); } sub import_XML { print "Reading the XML file $filename\n\n"; my $dom = XML::LibXML->load_xml(location => $filename, huge => 1); $xpc = XML::LibXML::XPathContext->new($dom); print "XML imported\n"; }
After I get 'XML imported' output the script crashes with these 'Perl interpreter stopped working' Windows messages
Problem signature: Problem Event Name: APPCRASH Application Name: perl.exe Application Version: 5.30.0.1 Application Timestamp: 5ce675b5 Fault Module Name: Tk.xs.dll Fault Module Version: 8.4.2.5 Fault Module Timestamp: 5d48325f Exception Code: c0000005 Exception Offset: 000000000006b197 OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 0922 Additional Information 2: 09222532a50de2713b0e459db9ce5206 Additional Information 3: 1a6d Additional Information 4: 1a6d675851be0305a03f72c1d1fc7bfd -- Problem signature: Problem Event Name: APPCRASH Application Name: perl.exe Application Version: 5.30.0.1 Application Timestamp: 5ce675b5 Fault Module Name: Tk.xs.dll Fault Module Version: 8.4.2.5 Fault Module Timestamp: 5d48325f Exception Code: c000041d Exception Offset: 000000000006b197 OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 0561 Additional Information 2: 056116c4c04c02ca22cbeb428d55467a Additional Information 3: dab2 Additional Information 4: dab22cdd161f9720b851e7ce36d909c8
Sometimes but not always I also get this message after 'XML imported' output:
Free to wrong pool 46af30 not 645b4f4a at C:/Strawberry/perl/site/lib/ +Tk.pm line 424.
Is this because of the file size? The script doesn't crash on smaller XML files (~200MB).
Can someone help me understand why this is happening and how do I mitigate this?
In reply to Script using Tk and LibXML crashing by misczol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |