[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#28321: Out of memory abort when opening large file
From:       Espen Sand <espensa () online ! no>
Date:       2001-07-07 8:28:43
[Download RAW message or body]

On Sat, 07 Jul 2001, you wrote:
> Package: khexedit
> Version: KDE 2.2.0 CVS/CVSup/Snapshot
> Severity: normal
> Installed from:    Compiled sources
> Compiler:          Not Specified
> OS:                Not Specified
> OS/Compiler notes: Not Specified
> 
> This seems to be actually a Qt bug (I have 2.3.0), but I report this in the hope that you can work around it.

No, this is not really a Qt bug. khexedit will always (try to) allocate a buffer
that is large enough for the entire file. The only scalable solution is to load 
a part of the file (using memory mapping perhaps). I have postponed this 
capability way too long. 


> 
> When I open a large (500 MB) file in khexedit, it aborts with a qFatal:
> 
> In file tools/qgarray.cpp, line 229: Out of memory 
> 
> [New Thread 1024 (runnable)]
> 0x40db8ad9 in wait4 () from /lib/libc.so.6
> #0  0x40db8ad9 in wait4 () from /lib/libc.so.6
> #1  0x40e109b4 in h_nerr () from /lib/libc.so.6
> #2  0x40eced69 in waitpid (pid=4987, stat_loc=0x0, options=0)
>     at wrapsyscall.c:134
> #3  0x405d61b5 in KCrash::defaultCrashHandler ()
>    from /opt/kde22/lib/libkdecore.so.3
> #4  0x40d4a3d8 in sigaction () from /lib/libc.so.6
> #5  0x40d4b6ff in abort () from /lib/libc.so.6
> #6  0x407ccaad in qFatal () from /opt/qt/lib/libqt.so.2
> #7  0x407ccb73 in qt_check_pointer () from /opt/qt/lib/libqt.so.2
> #8  0x407c5ca5 in QGArray::resize () from /opt/qt/lib/libqt.so.2
> #9  0x808ac9f in CHexBuffer::readFile ()
> #10 0x807f1a2 in CHexViewWidget::readFile ()
> #11 0x8076253 in CHexEditorWidget::readFile ()
> #12 0x80753bd in CHexEditorWidget::readURL ()
> #13 0x8071d67 in CHexEditorWidget::open ()
> #14 0x8064558 in KHexEdit::open ()
> #15 0x80640c3 in KHexEdit::delayedStartupOpen ()
> #16 0x4088143e in QObject::activate_signal () from /opt/qt/lib/libqt.so.2
> #17 0x408b26d2 in QSignal::activate () from /opt/qt/lib/libqt.so.2
> #18 0x408b82ef in QSingleShotTimer::event () from /opt/qt/lib/libqt.so.2
> #19 0x4082fbcb in QApplication::notify () from /opt/qt/lib/libqt.so.2
> #20 0x40546534 in KApplication::notify () from /opt/kde22/lib/libkdecore.so.3
> #21 0x407feedd in qt_activate_timers () from /opt/qt/lib/libqt.so.2
> 
> #22 0x407fce16 in QApplication::processNextEvent () from /opt/qt/lib/libqt.so.2
> 
> #23 0x40831934 in QApplication::enter_loop () from /opt/qt/lib/libqt.so.2
> #24 0x407fc73e in QApplication::exec () from /opt/qt/lib/libqt.so.2
> #25 0x805ec00 in main ()
> #26 0x40d44577 in __libc_start_main () from /lib/libc.so.6
> 
> 
> (Submitted via bugs.kde.org)


-- 
Espen Sand - Linux developer
espen@opera.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic