Oxygem/Kanmail

Segfault when issuing multiple window commands [GTK]

PannenetsF opened this issue · 12 comments

Iust got the newest release.
When a imported my new account and "Save all settings" it crashed.
OS: Ubuntu 18.04.04
WM: i3
Here is the last lines output.

[INFO] 127.0.0.1 - - [06/May/2020 14:25:36] "PUT /api/settings HTTP/1.1" 200 -
[INFO] 127.0.0.1 - - [06/May/2020 14:25:36] "GET /?window_id=fa52675f-e2c0-4551-a19e-9cf77e992e1f HTTP/1.1" 200 -
[INFO] 127.0.0.1 - - [06/May/2020 14:25:36] "GET /close-window?window_id=33fa7290-2d1c-416e-aaf1-17c40b69027e HTTP/1.1" 204 -
[INFO] 127.0.0.1 - - [06/May/2020 14:25:36] "GET /static/dist/1.2005020754/main.js HTTP/1.1" 200 -
[INFO] Logged in as my@mail.com
[INFO] 127.0.0.1 - - [06/May/2020 14:25:36] "GET /api/settings HTTP/1.1" 200 -
[1]    9840 abort (core dumped)  Kanmail

@PannenetsF do the settings get updated when this happens?

@PannenetsF do the settings get updated when this happens?

Well, it remains the same as before.

And after some attempts, I found there are about a 70% chance of that happening.

Have replicated this on Ubuntu 20 test machine; seems like calling JS reload on the main window is prone to crashes. Unfortunately no logs or anything indicating why even in dev mode.

Going to try to identify if it's just injecting reload into the main window or reloads in general.

Update: my theory is that calling reload from the server crashes because the page reloads before the return value can be passed @ https://github.com/Oxygem/Kanmail/blob/master/kanmail/window.py#L67. Seems specifically to affect GTK but makes sense.

Part of this bug has been fixed in the newest version!

But there's something left: If you keep the original setting and save it, the bug is going on. But if any changes are made, it turns to ok!

Thank you!

Interesting! Sadly in my Ubuntu 20 VM it still happens whether changing or not.

But I'm beginning to think this is an issue resetting the account instances on the server side, rather than anything related to GTK/reloading. Continuing investigation!

More info - can be replicated consistently by opening the settings/license/contacts windows over and over, will segfault after a a few in a row. Running with gdb points towards something in libwebkit2gtk.

Next up I need to get into the pywebview code and see if a GTK call there is causing this somehow.

Good news is this confirms it's nothing to do with settings/account resetting :)

Finally managed to replicate this using just pywebview! I've added this issue: r0x0r/pywebview#543

Investigation continues into why.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Replaced by #140.