GnuCash
Contact   Instructions
Bug 796979 - GnuCash segfaults on first startup when run from remote X session
Summary: GnuCash segfaults on first startup when run from remote X session
Status: NEW
Alias: None
Product: GnuCash
Classification: Unclassified
Component: User Interface General (show other bugs)
Version: 3.3
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: ui
QA Contact: ui
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-15 17:15 EST by Jesse H
Modified: 2018-12-16 18:21 EST (History)
5 users (show)

See Also:


Attachments
Ubuntu crash log from segfault, including backtrace and core dump. (18.94 MB, text/plain)
2018-12-15 17:15 EST, Jesse H
no flags Details

Description Jesse H 2018-12-15 17:15:30 EST
Created attachment 373074 [details]
Ubuntu crash log from segfault, including backtrace and core dump.

GnuCash is installed on a Ubuntu 18.04 machine from the sicklylife/gnucash ppa. It start and runs normally from the local machine. However, when accessing the machine from a windows machine using a ssh client with X forwarding (MobaXterm), GnuCash will segfault upon startup.

SegvAnalysis:
 Segfault happened at: 0x7f9821a0a9ce <g_type_check_instance_is_a+62>:  testb  $0x4,0x16(%rdx)
 PC (0x7f9821a0a9ce) ok
 source "$0x4" ok
 destination "0x16(%rdx)" (0x5441554156415756) not located in a known VMA region (needed writable region)!

The second attempt will start and work correctly.

A workaround is to start a alternate X program (such as evince), then start gnucash.

Attaching the Ubuntu crash log for backtrace and core dump.
Comment 1 John Ralls 2018-12-16 11:25:48 EST
Try starting GnuCash like this from your ssh session:
  GDK_BACKEND=X11 /path/to/gnucash
Comment 2 Jesse H 2018-12-16 17:10:47 EST
(In reply to John Ralls from comment #1)
> Try starting GnuCash like this from your ssh session:
>   GDK_BACKEND=X11 /path/to/gnucash


As requested:
-----------------------------------------
jesse@jesse-desktop:~$ GDK_BACKEND=X11 /usr/bin/gnucash
Error: could not initialize graphical user interface and option add-price-quotes was not set.
       Perhaps you need to set the $DISPLAY environment variable ?
Run '/usr/bin/gnucash --help' to see a full list of available command line options.


Adding a semi-colon after setting the shell variable (this may be what was requested?) give the same behavior (starts correctly on second try).
--------------------------------
jesse@jesse-desktop:~$ echo $GDK_BACKEND

jesse@jesse-desktop:~$ GDK_BACKEND=X11; /usr/bin/gnucash
Segmentation fault (core dumped)
jesse@jesse-desktop:~$ echo $GDK_BACKEND
X11
jesse@jesse-desktop:~$ GDK_BACKEND=X11; /usr/bin/gnucash
Found Finance::Quote version 1.47
Comment 3 John Ralls 2018-12-16 18:21:31 EST
No, I meant without a semicolon. That adds the environment variable to to the subsequent command. With the semicolon it becomes a separate command and without exporting it it becomes a no-op. I.e., either
  GDK_BACKEND=X11 /usr/bin/gnucash
or
  export GDK_BACKEND=X11; /usr/bin/gnucash

The error about $DISPLAY not being set is significant. It means that you don't have an X11 forwarding session established. I'm not finding anything helpful in a web search, perhaps you can ask Ubuntu support about how to get XWayland started and configured before trying to start your remote GnuCash session.

Note You need to log in before you can comment on or make changes to this bug.