babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.34k stars 102 forks source link

Bookworm crashing on touchscreen with page change when title contains ü #129

Open detached opened 7 years ago

detached commented 7 years ago

Bookworm is crashing when switching sites of a book back and forth by using a touchscreen.

dbus[3920]: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file ../../dbus/dbus-message.c line 2754.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace
[1]    3920 abort (core dumped)  bookworm --debug

Compiled from source on Fedora 26 with dbus version 1.11.18

Thank you for this cool software!

babluboy commented 7 years ago

@detached Thanks for your interest in Bookworm. I had never really tested Bookworm on a touch screen nor on Fedora. I am currently building this for Elementary OS although I'm pretty interested in making it distro agnostic when the software is mature... With that said, I'm not sure why this error was caused, on a quick check I see a similar issue for VLC player here

Are you able to run bookworm --debug and provide the complete error message so I know what point exactly it is crashing. A screen shot just before the error happens will be great if possible.

detached commented 7 years ago

Hey @babluboy,

I admit this is a rather exotic case 😄

Here is a screencast from the crash: screencast

And just a screenshot: screenshot

I am just tapping two times on next.

And here is the output of bookworm --debug debug.log

detached commented 7 years ago

Oh and here is the core dump from journalctl:

Oct 13 23:35:19 localhost.localdomain systemd-coredump[10274]: Process 10224 (bookworm) of user 1000 dumped core.

                                                               Stack trace of thread 10224:
                                                               #0  0x00007f2a94f5a69b raise (libc.so.6)
                                                               #1  0x00007f2a94f5c4a0 abort (libc.so.6)
                                                               #2  0x00007f2a875a9ac4 _dbus_abort (libdbus-1.so.3)
                                                               #3  0x00007f2a875a0350 _dbus_warn_check_failed (libdbus-1.so.3)
                                                               #4  0x00007f2a87591b71 dbus_message_iter_append_basic (libdbus-1.so.3)
                                                               #5  0x00007f2a8c43c084 append_cache_item (libatk-bridge-2.0.so.0)
                                                               #6  0x00007f2a9b7e1560 g_hash_table_foreach (libglib-2.0.so.0)
                                                               #7  0x00007f2a8c43c4c0 impl_GetItems (libatk-bridge-2.0.so.0)
                                                               #8  0x00007f2a8c43972d handle_message (libatk-bridge-2.0.so.0)
                                                               #9  0x00007f2a87596580 _dbus_object_tree_dispatch_and_unlock (libdbus-1.so.3)
                                                               #10 0x00007f2a875873aa dbus_connection_dispatch (libdbus-1.so.3)
                                                               #11 0x00007f2a877d1605 message_queue_dispatch (libatspi.so.0)
                                                               #12 0x00007f2a9b7f2247 g_main_context_dispatch (libglib-2.0.so.0)
                                                               #13 0x00007f2a9b7f25e8 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #14 0x00007f2a9b7f267c g_main_context_iteration (libglib-2.0.so.0)
                                                               #15 0x00007f2a95c23ebd g_application_run (libgio-2.0.so.0)
                                                               #16 0x00007f2a9bfa8360 granite_application_run (libgranite.so.3)
                                                               #17 0x00000000004135a1 _vala_main (bookworm)
                                                               #18 0x00000000004135d5 main (bookworm)
                                                               #19 0x00007f2a94f4450a __libc_start_main (libc.so.6)
                                                               #20 0x000000000041316a _start (bookworm)

                                                               Stack trace of thread 10225:
                                                               #0  0x00007f2a94a9f90b pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                                                               #1  0x00007f2a8cd39cdc _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE (libstdc++.so.6)
                                                               #2  0x00007f2a97236fa6 _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE13threadRunLoopEv (libjavascriptcoregtk-4.0.so.18)
                                                               #3  0x00007f2a972372d9 _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE16threadEntryPointEPS4_ (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a8cd4001f n/a (libstdc++.so.6)
                                                               #5  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #6  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10226:
                                                               #0  0x00007f2a94a9f90b pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                                                               #1  0x00007f2a8cd39cdc _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE (libstdc++.so.6)
                                                               #2  0x00007f2a97236fa6 _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE13threadRunLoopEv (libjavascriptcoregtk-4.0.so.18)
                                                               #3  0x00007f2a972372d9 _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE16threadEntryPointEPS4_ (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a8cd4001f n/a (libstdc++.so.6)
                                                               #5  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #6  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10229:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f2902 g_main_loop_run (libglib-2.0.so.0)
                                                               #3  0x00007f2a95c4fcb6 gdbus_shared_thread_func (libgio-2.0.so.0)
                                                               #4  0x00007f2a9b819536 g_thread_proxy (libglib-2.0.so.0)
                                                               #5  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #6  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10227:
                                                               #0  0x00007f2a94a9feb6 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0)
                                                               #1  0x00007f2a972370d8 _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE13threadRunLoopEv (libjavascriptcoregtk-4.0.so.18)
                                                               #2  0x00007f2a972372d9 _ZN7bmalloc9AsyncTaskINS_4HeapEMS1_FvvEE16threadEntryPointEPS4_ (libjavascriptcoregtk-4.0.so.18)
                                                               #3  0x00007f2a8cd4001f n/a (libstdc++.so.6)
                                                               #4  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #5  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10228:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f267c g_main_context_iteration (libglib-2.0.so.0)
                                                               #3  0x00007f2a9b7f26c1 glib_worker_main (libglib-2.0.so.0)
                                                               #4  0x00007f2a9b819536 g_thread_proxy (libglib-2.0.so.0)
                                                               #5  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #6  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10230:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f267c g_main_context_iteration (libglib-2.0.so.0)
                                                               #3  0x00007f2a78e9ff3d dconf_gdbus_worker_thread (libdconfsettings.so)
                                                               #4  0x00007f2a9b819536 g_thread_proxy (libglib-2.0.so.0)
                                                               #5  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #6  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10231:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f2902 g_main_loop_run (libglib-2.0.so.0)
                                                               #3  0x00007f2a9722e360 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a9722d222 _ZN3WTF8FunctionIFvvEE15CallableWrapperIZNS_9WorkQueue18platformInitializeEPKcNS4_4TypeENS4_3QOSEEUlvE_E4callEv (libjavascriptcoregtk-4.0.so.18)
                                                               #5  0x00007f2a9720605b _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18)
                                                               #6  0x00007f2a9722c419 _ZN3WTFL19wtfThreadEntryPointEPv (libjavascriptcoregtk-4.0.so.18)
                                                               #7  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #8  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10232:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f2902 g_main_loop_run (libglib-2.0.so.0)
                                                               #3  0x00007f2a9722e360 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a9722d222 _ZN3WTF8FunctionIFvvEE15CallableWrapperIZNS_9WorkQueue18platformInitializeEPKcNS4_4TypeENS4_3QOSEEUlvE_E4callEv (libjavascriptcoregtk-4.0.so.18)
                                                               #5  0x00007f2a9720605b _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18)
                                                               #6  0x00007f2a9722c419 _ZN3WTFL19wtfThreadEntryPointEPv (libjavascriptcoregtk-4.0.so.18)
                                                               #7  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #8  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10233:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f2902 g_main_loop_run (libglib-2.0.so.0)
                                                               #3  0x00007f2a9722e360 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a9722d222 _ZN3WTF8FunctionIFvvEE15CallableWrapperIZNS_9WorkQueue18platformInitializeEPKcNS4_4TypeENS4_3QOSEEUlvE_E4callEv (libjavascriptcoregtk-4.0.so.18)
                                                               #5  0x00007f2a9720605b _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18)
                                                               #6  0x00007f2a9722c419 _ZN3WTFL19wtfThreadEntryPointEPv (libjavascriptcoregtk-4.0.so.18)
                                                               #7  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #8  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10234:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f2902 g_main_loop_run (libglib-2.0.so.0)
                                                               #3  0x00007f2a9722e360 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a9722d222 _ZN3WTF8FunctionIFvvEE15CallableWrapperIZNS_9WorkQueue18platformInitializeEPKcNS4_4TypeENS4_3QOSEEUlvE_E4callEv (libjavascriptcoregtk-4.0.so.18)
                                                               #5  0x00007f2a9720605b _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18)
                                                               #6  0x00007f2a9722c419 _ZN3WTFL19wtfThreadEntryPointEPv (libjavascriptcoregtk-4.0.so.18)
                                                               #7  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #8  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10237:
                                                               #0  0x00007f2a94a9feb6 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0)
                                                               #1  0x00007f2a9722cf5a _ZN3WTF15ThreadCondition9timedWaitERNS_5MutexEd (libjavascriptcoregtk-4.0.so.18)
                                                               #2  0x00007f2a97202543 _ZN3WTF10ParkingLot21parkConditionallyImplEPKvRKNS_12ScopedLambdaIFbvEEERKNS3_IFvvEEERKNS_24TimeWithDynamicClockTypeE (libjavascriptcoregtk-4.0.so.18)
                                                               #3  0x00007f2a971f3d5a _ZN3WTF5sleepEd (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a9965f57d _ZN3WTF8FunctionIFvvEE15CallableWrapperIZN6WebKit21MemoryPressureMonitorC4EvEUlvE_E4callEv (libwebkit2gtk-4.0.so.37)
                                                               #5  0x00007f2a9720605b _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18)
                                                               #6  0x00007f2a9722c419 _ZN3WTFL19wtfThreadEntryPointEPv (libjavascriptcoregtk-4.0.so.18)
                                                               #7  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #8  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10252:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f2902 g_main_loop_run (libglib-2.0.so.0)
                                                               #3  0x00007f2a9722e360 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a9722d222 _ZN3WTF8FunctionIFvvEE15CallableWrapperIZNS_9WorkQueue18platformInitializeEPKcNS4_4TypeENS4_3QOSEEUlvE_E4callEv (libjavascriptcoregtk-4.0.so.18)
                                                               #5  0x00007f2a9720605b _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18)
                                                               #6  0x00007f2a9722c419 _ZN3WTFL19wtfThreadEntryPointEPv (libjavascriptcoregtk-4.0.so.18)
                                                               #7  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #8  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10249:
                                                               #0  0x00007f2a9502f559 syscall (libc.so.6)
                                                               #1  0x00007f2a9b8376fa g_cond_wait_until (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7c6b31 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
                                                               #3  0x00007f2a9b7c70ec g_async_queue_timeout_pop (libglib-2.0.so.0)
                                                               #4  0x00007f2a9b819fde g_thread_pool_thread_proxy (libglib-2.0.so.0)
                                                               #5  0x00007f2a9b819536 g_thread_proxy (libglib-2.0.so.0)
                                                               #6  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #7  0x00007f2a95034bbf __clone (libc.so.6)

                                                               Stack trace of thread 10253:
                                                               #0  0x00007f2a95028acd poll (libc.so.6)
                                                               #1  0x00007f2a9b7f2569 g_main_context_iterate.isra.25 (libglib-2.0.so.0)
                                                               #2  0x00007f2a9b7f2902 g_main_loop_run (libglib-2.0.so.0)
                                                               #3  0x00007f2a9722e360 _ZN3WTF7RunLoop3runEv (libjavascriptcoregtk-4.0.so.18)
                                                               #4  0x00007f2a9722d222 _ZN3WTF8FunctionIFvvEE15CallableWrapperIZNS_9WorkQueue18platformInitializeEPKcNS4_4TypeENS4_3QOSEEUlvE_E4callEv (libjavascriptcoregtk-4.0.so.18)
                                                               #5  0x00007f2a9720605b _ZN3WTF6Thread10entryPointEPNS0_16NewThreadContextE (libjavascriptcoregtk-4.0.so.18)
                                                               #6  0x00007f2a9722c419 _ZN3WTFL19wtfThreadEntryPointEPv (libjavascriptcoregtk-4.0.so.18)
                                                               #7  0x00007f2a94a9936d start_thread (libpthread.so.0)
                                                               #8  0x00007f2a95034bbf __clone (libc.so.6)
babluboy commented 7 years ago

Many thanks for the detailed description and screencast ...I should get a ubuntu tablet 😀....here is something I saw not sure if it will work: try this command - LC_ALL=C bookworm

Saw this here: https://bbs.archlinux.org/viewtopic.php?id=183853

detached commented 7 years ago

I tried to set the LC_ALL but it doesn't help. Sorry.

detached commented 7 years ago

I can narrow the problem down to one particular comic in my library: Daredevil 01 - Die Rückkehr (Panini) (2012).cbr

When I change the german ü to u the app doesn't crash any more.

The strange thing here is that bookworm has no problem with other ebooks with umlauts in the filename. For example "Lucky Luke - 15 - Die Prärie-Piraten.cbr" works just fine.

babluboy commented 7 years ago

@detached thanks for narrowing it down to the ü. So it indeed looks like a locale issue. Since its a comic that is crashing, the ü is only appearing on the title and not on the content (as comics will only have pictures). Some other things to try: 1- Can arrow keys be used instead of the navigation buttons to see if that helps 2- Is this comic particularly large Lastly can you share the cbr file via email for me to check?

detached commented 7 years ago

Sry for not writing back this long time. 1 - Using the arrow keys doesn't crash the application 2 - The comic is 312M in size, which is not that big I guess I will send you the book.

babluboy commented 7 years ago

Thanks for the update. The arrow keys and the prev/next-page-arraw-images click call the same code, so strange that this happens on click of the prev/next-page-arraw-images.

Could you also try single click rather than double click on the prev/next-page-arraw-images