New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault when starting opencpn on wayland #1166
Comments
The segfault is related to a wxWidgets bug with Wayland: We've the same problem in Fedora since they have switched by default to Wayland. You can run opencpn on Wayland like this: |
Thanks for great feedback (I'm actually mostly on fedora myself...). We should see that opencpn on linux is launched using a wrapper script to create some flexibility to handle things like this. |
Did you try the code changes suggested in https://trac.wxwidgets.org/ticket/17702#comment:12 and following comments? They seem harmless enough if they work... |
No, but I certainly will. Stay tuned. |
Attached patch "works for me" on 4.8.6 and debian-9. It applies cleanly also to master, but is not tested in that context (I'm currently focused on getting the 4.8.6 package in shape). EDIT: Remove bad patch |
No, patch is broken... stay tuned, again. |
But this seems ok: EDIT: Remove bad patch. |
Dammit. The patch works, but each and every line is wrong. Attaching a better attempt 0018-Patch-Initialize-display-to-x11-on-wayland-hosts-116.patch.gz |
leamas... How did you install Debian9 so that it defaulted to a wayland backend for gdk? Real hardware, or vbox? I installed deb9/Gnome in a virtualbox, which seems only to produce an X11 backend. Dave |
Thinking further... This would prevent the calls to X11 library, probably. And thus avoid the fault... A gdb stack trace would also be informative. |
I probably need som kind of care. I'm actually on sid (i. e. upcoming D10), but it prints D9 on the welcome screen. In the end, it's all about gnome which has changed default to wayland since long.
Interesting, will do.
Yes. I'm a lazy human being... stay tuned. |
BTW: This was reported already on fedora 25: https://opencpn.org/flyspray/index.php?do=details&task_id=2198 EDIT: I have not always been that lazy! The flyspray bug contains a stacktrace. |
Now, despite crashes reported by others, I cannot reproduce the crash at all. It might be that debian is updated (sid is a sort of rolling release) and/or the fact that I nowadays uses gtk2-based builds instead of gtk3. I have also rebased my current work, so I don't have a clear point in history to walk back to gtk3 :(. Leaving bug open, hopefully more things should happen with this while doing other work. |
Looking at stack trace, seems clear that this is truly a wxGLCanvas bug. Has nothing to do with our OCPN_HAVE_X11flag. A red herring. Sorry. Anyway, I expect that OCPN will not be the only wxGL app affected. We shall see this again, I expect. But the fix will not be a part of OCPN488 Dave |
The good news seems to be that my current sid is OK, it works even when rebuilding the current ubuntu 4.8.6 sources. It uses:
...and what not |
Still crash on fedora 29, despite gnome 3.30 also here. However, the gtk2 build on f29 seems broken, so testing using gtk3.
|
Upstream wxWidgets bug: http://trac.wxwidgets.org/ticket/17702 |
Debian packaging of gtk3 is on it: https://lists.debian.org/debian-devel/2018/11/msg00551.html |
I had OpenCPN running on my Debian Sid for a long time now but after the last For the record, it crashes for me in
|
Are you sure you havn't updated sid in the same windpw? If so, it it might be possible to to make a git bisect to find the culprit.
I have had similar problems on Fedora, which basically is further down the same road as Debian. The only remedy here is to login with a X11 backend instead of Wayland. Using the standard login screen, there is an options button just before you login. |
See also crash report in #1167 |
If I'm reading this right, there's a fix on it's way for Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900678#67 Right now, Buster has 3.0.4+dfsg-8 |
This is basically the patch in #1166 (comment) which was rejected at the time, but perhaps looks better now? |
The patch does not apply cleanly, but does the job after being applied manually (Fedora 30). |
This patch is applied to the new Debian package at https://packages.debian.org/sid/opencpn |
The Debian package is accepted. |
Fixed in Debian Sid/bullseye; opencpn without this patch starts just fine here. |
- Carrying patchs 0001-* and 0003-* yet to be merged upstream from 4.8.8. - Move location of added help_web.html, the original destination dir is gone. - Fix some broken include paths, to be upstreamed. - Relicense appstream metadata to overall GPL-2+ license. - Move opencpn.appdata.xml to new location metainfo - Clean up rules after upstream fixes and patches Bug: #1166 testing overrides more testing
As heading says: on a pristine debian 9 installation, logged in with default options starting opencpn gives a segfault errror.
The culprit seems to be the fact that Debian has moved away from using X11 in the default setup. Logging out, and logging in again with the option "Debian on Xorg" (out of the top of my head) makes opencpn start as expected.
Patching opencpn not to use X11-specific functions might be to a too big job to be feasible in the 5.0.0 cycle. However, ocpn should write a sensible error message with a hint about the walk-around instead of segfaulting.
The text was updated successfully, but these errors were encountered: