#6 All available memory is consumed when viewing corrupt CBRs


This is a highly critical bug. When viewing cbr/rar
archives that are incomplete (say if you're still
downloading it), Comical enters an infinite loop where
it displays two error dialogs over and over:
"Failed to extract page 1."
"Error processing xyz.jpg: CRC error"

During this phase, the Comical process begins to
rapidly increase in size until all memory is consumned
(I have 1GB and it used it all). Naturally, the system
becomes unresponsive during this time due to this, so
if you don't close Comical soon enough (a feat only
possible through the task manager since the error
dialogs don't let you click the close button), your
system locks up.

I uploaded a cbr that you can use to test:

On the other hand, if you attempt to open a cbz/zip
archive that is incomplete, Comical crashes with this

terminate called after throwing an instance of

Program received signal SIGABRT, Aborted.
[Switching to Thread 1083197792 (LWP 23868)]
0x00002aaaac09913d in raise () from /lib/libc.so.6
(gdb) bt

0 0x00002aaaac09913d in raise () from /lib/libc.so.6

1 0x00002aaaac09a86e in abort () from /lib/libc.so.6

2 0x00002aaaabb7f7d7 in

gnu_cxx::verbose_terminate_handler ()
from /usr/lib/libstdc++.so.6

3 0x00002aaaabb7d866 in __gxx_personality_v0 () from


4 0x00002aaaabb7d893 in std::terminate () from


5 0x00002aaaabb7d97a in __cxa_throw () from


6 0x00000000004353ad in ComicBookZIP::ExtractStream

pageindex=8989840) at ComicBookZIP.cpp:119

7 0x000000000042f426 in ComicBook::Entry

(this=0x889ce0) at ComicBook.cpp:549

8 0x00002aaaab94a942 in wxThreadInternal::PthreadStart ()

from /usr/lib/libwx_baseu-2.6.so.0

9 0x00002aaaabf5b12a in start_thread () from


10 0x00002aaaac1313c3 in clone () from /lib/libc.so.6

11 0x0000000000000000 in ?? ()

12 0x0000000000000000 in ?? ()

Linux amd64
Comical 0.8

P.S. I've enabled debugging on my build, let me know if
you want the patch that does that.

  • Steven Sheehy


  • Dennis Lim

    Dennis Lim - 2006-04-28

    Logged In: YES

    This problem happens on Windows XP with similar error
    messages and symptoms. I get the same error messages and
    they do keep on repeating. The memory doesn't look like
    it's always increasing though. It did get up to 300MB and
    then drop down to about 200MB. I didn't wait too long and
    just terminated the process.

  • Nobody/Anonymous

    Logged In: NO

    Ok, I fixed the crashing with zips. But now zips just do the
    same that rars do. :D

    This is because the void * ComicBook::Entry() thread never
    hops out of the while (!TestDestroy()) loop on errors.

  • Nobody/Anonymous

    Logged In: NO

    void * ComicBook::Entry() is one nasty function. It's
    extremely hard to follow what with the use of gotos,
    continues, and breaks. There's also way too many loops which
    could probably be combined to speed processing up. Splitting
    it into smaller functions may also help readability. Also,
    it is of my opinion that goto statements should never be
    used in programming. I think this func needs some real
    cleanup in order to fix this bug, but only Lightstruk has
    enough knowledge of it to do that.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks