mcomix3 icon indicating copy to clipboard operation
mcomix3 copied to clipboard

library instability

Open pirate486743186 opened this issue 5 years ago • 16 comments

It's even worse now. It crashes now with:

**
Gtk:ERROR:../../../../gtk/gtkicontheme.c:4026:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Aborted (core dumped)

pirate486743186 avatar Apr 20 '19 19:04 pirate486743186

it doesn't happen all the time... A yea, it just now crashed with "Segmentation fault (core dumped)" And once it froze with CPU going to 100%..... And one time out of two, all the books disappear.... (all this by switching tabs in the library)

This is objectively... not good. :D Maybe if you reverted that commit and put it in a branch for now?

pirate486743186 avatar Apr 21 '19 18:04 pirate486743186

https://github.com/multiSnow/mcomix3/commit/0405a2304c123da5d60c0df7751fbbc9ca8cb169 tried to fix this issue.

multiSnow avatar Jun 16 '19 14:06 multiSnow

after a bit of testing.

This is definitely an improvement. Thumbnails don't vanish anymore. This was the worse problem.

I got just one crash so far. Same error message as the first message here. (low probability)

Gtk:ERROR:../../../../gtk/gtkicontheme.c:4026:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Aborted (core dumped)

and got some of these errors, with no visible practical problem.

(mcomixstarter.py:6823): Gtk-CRITICAL **: 18:08:37.206: gtk_list_store_set_value: assertion 'iter_is_valid (iter, list_store)' failed (they could be GTK bugs)

pirate486743186 avatar Jun 16 '19 16:06 pirate486743186

Confirming, this is happening on my Gentoo machine as well. error log:

/usr/lib/python3.7/site-packages/mcomix/library/book_area.py:469: Warning: g_object_ref: assertion 'old_val > 0' failed
  book_pixbuf = self.render_icon(Gtk.STOCK_APPLY, Gtk.IconSize.LARGE_TOOLBAR)

(mcomix:21404): Gtk-WARNING **: 19:04:00.751: Error loading theme icon 'gtk-apply' for stock: 
**
Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Bail out! Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
[1]    21404 IOT instruction  mcomix

epsilon-0 avatar Nov 27 '20 00:11 epsilon-0

Some more error logs

(mcomix:28798): Gdk-CRITICAL **: 19:11:17.369: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed
Gdk-Message: 19:11:23.798: Window 0x556f3ffb6200 is a temporary window without parent, application will not be able to position it on screen.

(mcomix:28798): Gdk-CRITICAL **: 19:11:23.801: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed
19:12:48 [Thread-30] ERROR: ! Extraction error: Bad magic number for file header
**
Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Bail out! Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
[1]    28798 IOT instruction  mcomix

epsilon-0 avatar Nov 27 '20 00:11 epsilon-0

This still happens with the arch linux build, usually from scrolling through library too fast

** Gtk:ERROR:../gtk/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL) Bail out! Gtk:ERROR:../gtk/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL) Aborted (core dumped)

cdglitch avatar Feb 02 '21 08:02 cdglitch

Yes, same error when scrolling fast through the library.

epsilon-0 avatar Feb 02 '21 21:02 epsilon-0

Interesting development - I found a solution to the instability: Put everything in the library on an SSD. It seems that theres a relation between how long the spinup on my old mechanical drive takes to start feeding data and crashes in the library view.

Since moving everything to an SSD, not only do I not get random hangs in library view but I have been completely crash free. Even when scrolling very fast which used to be a guaranteed crash.

cdglitch avatar Feb 25 '21 00:02 cdglitch

@cdglitch Can't confirm the solution, I'm on an SSD and still getting crashes.

epsilon-0 avatar Feb 25 '21 01:02 epsilon-0

@epsilon-0 right you are, I had a crash earlier today. It has however gone from happening like 95% I used the library view to like 5% for me though

cdglitch avatar Feb 27 '21 12:02 cdglitch

@multiSnow And now, it's reproducible... Put the library on a hard drive. Old hardware or a VM might trigger it too.

The bug is in the multi-threaded code that handles the library. There's indeed some race condition going on.

pirate486743186 avatar Feb 27 '21 16:02 pirate486743186

Found in the preferences one option relating to threads: "Maximum number of concurrent extraction threads". Setting this to 1 (or zero, it sets itself back to 1) does not fix things.

I also found a way of reproducing the issue very quickly: Make a few collections with maybe 5-10 archives each and then rapidly click between them. On my old SATA SSD I can make it like 10 clicks tops before it locks up for a second and dies.

cdglitch avatar Mar 06 '21 16:03 cdglitch

Please try https://github.com/multiSnow/mcomix3/tree/slowdown and see whether everything goes well.

multiSnow avatar Mar 08 '21 14:03 multiSnow

I just tested and I am still getting crashes

**
Gtk:ERROR:../../gtk+-3.24.26/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Bail out! Gtk:ERROR:../../gtk+-3.24.26/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Aborted

epsilon-0 avatar Mar 08 '21 18:03 epsilon-0

branch https://github.com/multiSnow/mcomix3/tree/slowdown try to fix this issue. Since I still could not reproduce such Gtk error, I guess it appeared when pixbuf set after widget destroy, and will try to do somthing with such thought.

You can also subscribe https://github.com/multiSnow/mcomix3/commits/slowdown.atom to see new commit.

multiSnow avatar Mar 09 '21 12:03 multiSnow

Ive been getting it happening more frequently again for some reason so loaded up the python fault handler. The only thing that seems to be consistently doing anything with pixbufs is this

Thread 0x00007f2830ff9640 (most recent call first):
  File "/usr/lib/python3.9/site-packages/PIL/ImageFile.py", line 265 in load
  File "/usr/share/mcomix/mcomix/image_tools.py", line 434 in load_pixbuf
  File "/usr/share/mcomix/mcomix/thumbnail_tools.py", line 85 in thumbnail
  File "/usr/share/mcomix/mcomix/library/backend.py", line 168 in get_book_thumbnail
  File "/usr/share/mcomix/mcomix/library/book_area.py", line 439 in _get_pixbuf
  File "/usr/share/mcomix/mcomix/thumbnail_view.py", line 97 in _pixbuf_worker
  File "/usr/share/mcomix/mcomix/lib/mt.py", line 137 in _caller
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 125 in worker
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

cdglitch avatar Apr 04 '21 06:04 cdglitch