Tue 02 May 2017 09:51:14 PM UTC, comment #14:
Verified the fix works for this bug and #50396. Closing reports.
|
Tue 02 May 2017 09:26:56 PM UTC, comment #13:
I pushed this changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/b605146ed2ed
Does it fix the problem for you? The change is to initialize the global variables in the application object instead of the interpreter object. That way, Voct_etc_dir is available for the GUI resource manager initialization.
There are about 50 global variables like Voct_etc_dir. Many are given default values by the call to install_defaults. Eventually, I'd like to move variables like this to be members of the application or interpreter object, whichever is more appropriate for each of them.
|
Thu 27 Apr 2017 04:52:48 PM UTC, comment #12:
Yeah that makes sense.
I managed to bisect this specific error to one of the following two related changes (the first one doesn't compile for me):
https://hg.savannah.gnu.org/hgweb/octave/rev/af48d8be62b3
https://hg.savannah.gnu.org/hgweb/octave/rev/252975fdc444
The second of these changesets moved the call to install_defaults from octave::application::init() octave::interpreter::interpreter(). So it occurs later in the startup sequence now, after the application object has been initialized but before the interpreter is started. Meanwhile the GUI application is setting itself up and accessing some of these global parameters that haven't been initialized yet.
|
Thu 27 Apr 2017 03:31:36 PM UTC, comment #11:
This could be because of a race issue between the GUI thread and the Octave interpreter thread. The interpreter has not yet initialized Voct_etc_dir before the GUI requests it.
See bug #50396 where a similar situation prevents the documentation from being loaded in the GUI.
|
Thu 27 Apr 2017 03:25:57 PM UTC, comment #10:
What I have found so far is, that the resource_manager seems not be able to create the settings file because
default_qt_settings_file (void)
returns "/default-qt-settings", i.e. the variable Voct_etc_dir is empty.
|
Thu 27 Apr 2017 03:03:25 PM UTC, comment #9:
Thanks Rik, I can confirm the crash when the environment variable is not set. I'm going to give bisecting another shot with a modified run-octave script.
|
Wed 26 Apr 2017 05:57:40 PM UTC, comment #8:
It's different from the build tree because the run-octave script establishes a fallback in case the file qt-settings does not exist. In run-octave,
If I comment this out, and run from the build tree, then I get a segfault.
|
Wed 26 Apr 2017 05:45:04 PM UTC, comment #7:
Why is it different if you run it from build tree or from installed location?
Dmitri.
--
|
Wed 26 Apr 2017 05:31:28 PM UTC, comment #6:
Confirmed for me as well with an installed version of the development branch. I changed my HOME variable to point to somewhere innocuous and I get the segfault as soon as the welcome wizard finishes.
This might be related to threading. Currently any code in the GUI which calls error() leads to an unhandled exception which then goes to std::terminate. There is already a bug report about that.
|
Wed 26 Apr 2017 04:49:40 PM UTC, comment #5:
Sure it's possible. I know why bug #50396 occurs only when Octave is installed and not in the build tree, but I don't know why this one would behave that way. Besides I was seeing it in my build directory originally, but after deleting and building again that was not reproducible.
I now only see this when running the installed octave binary, not using run-octave. Adding all of the command-line arguments that run-octave inserts does not change anything.
I can try to bisect but that might take a long time, can't devote time to that for now.
|
Wed 26 Apr 2017 09:14:26 AM UTC, comment #4:
could this be related to https://savannah.gnu.org/bugs/?50396
Both reports are linked to starting the GUI and only occur on the installed version.
|
Wed 26 Apr 2017 01:37:46 AM UTC, comment #3:
Same. I started bisecting but that makes it a lot more tedious.
|
Tue 25 Apr 2017 11:44:42 PM UTC, comment #2:
I cannot reproduce the error if I run ./run-octave from
the build tree, but I can reproduce it if I install it proper
(to /usr/local ) and run then...
Dmitri.
--
|
Tue 25 Apr 2017 10:13:11 PM UTC, comment #1:
I just run 1fadf480a63b
and it was fine.
Cannot reproduce the problem (Fedora 25 Qt 5.7.1)
Dmitri.
--
|
Tue 25 Apr 2017 09:17:34 PM UTC, original submission:
Octave's GUI crashes immediately after completion of the welcome wizard dialog. This is 100% reproducible for me on the default branch. The released 4.2.1 and the stable branch do not have this problem.
To reproduce this you will need to move or delete the ~/.config/octave directory, run Octave as a different user, or with a different temporary HOME directory.
Creating an empty file ~/.config/octave/qt-settings is enough to bypass the welcome wizard and avoid this error. I have built Octave with both Qt 4 and 5 and both exhibit the same behavior.
Stack trace:
I don't mind debugging if someone more familiar with GUI startup can help point me in the right direction.
|