master: random crash on theme selection
Summary:
I just built Inkscape master for the first time in a long time, as I've finally had time to update to Linux Mint 22.
With old preferences
When 'updating', i.e. using my old preferences that I had from when 'master' referred to 1.4.x, it starts up with buttons in the top bar being centered, and all inactive buttons being red (honestly, I thought that was a result of some experimenting with themes I did a long time ago, but I could not find any modified theme / css files in the 'master' configuration directory or in the theme directory (which didn't even exist)).
The theme chooser offers all available themes. Choosing one leads to a crash.
Without preferences
When then deleting (renaming) the preferences directory, to let it create a new one instead, what I get after a restart is no more red buttons, but a huge status bar:
There is no crash trying to change the theme now, though.
Steps to reproduce:
Old prefs
- open Inkscape
- use this prefs file: preferences.xml
- try to switch theme
What happened?
Old prefs
Terminal:
hundreds of lines like this:
(org.inkscape.Inkscape:73072): Gtk-CRITICAL **: 01:30:27.319: gtk_css_value_equal: assertion 'value1 != ((void *)0)' failed
or this:
(org.inkscape.Inkscape:73072): Gtk-WARNING **: 01:32:42.631: Widget reports min width of 299 for height of 30, but overall min width of 327
and finally, this:
** (org.inkscape.Inkscape:73072): ERROR **: 01:32:44.149:
unhandled exception (type std::exception) in signal handler:
what: basic_string: construction from null is not valid
** (org.inkscape.Inkscape:73072): ERROR **: 01:32:44.149:
unhandled exception (type std::exception) in signal handler:
what: basic_string: construction from null is not valid
Crash: inkscape_debug_trace_2024.12.13.01.30.21.txt
No prefs
See screenshot above. Status line is very high, theme switching works, though. The gtk warning messages about missing values are gone, too. The widget height messages are still there.
What should have happened?
When a user updates their Inkscape installation to the new version, with a theme already set, they should:
- not get red buttons (in case this is reproducible... those might be caused by some test edit on my system, but I really cannot find it... - it really seems to be caused by themes being selected in the old preferences. Which are installed (Adwaita, Mint-L), by the way.)
- definitely not get a crash when choosing a theme
When a user installs the new version for the first time (new prefs),
- the status bar should be of a reasonable height
Further investigation
Preferences contain theme information in toolbox section. Removing that does not change anything from red to normal, so it seems to have been ignored anyway, and it was in the wrong location. No idea how it got there.
Theme section in preferences contains 3 themes, all with different keys, and two prefs for dark theme, too:

Emptying the whole section fixes things, except for the center aligned commands bar. Even the status bar has a normal height now.
Renaming the contrast section fixes it! Changing contrast from 10 to something else then causes a crash, though.
Version info
Inkscape 1.5-dev (0be98cd820, 2024-12-11)
Compile (Run)
GLib version: 2.80.0
GTK version: 4.17.2 (4.17.2)
glibmm version: 2.78.1
gtkmm version: 4.14.0
libxml2 version: 2.9.14
libxslt version: 1.1.39
Cairo version: 1.18.0 (1.18.0)
Pango version: 1.52.1 (1.52.1)
HarfBuzz version: 8.3.0 (8.3.0)
Poppler version: 24.02.0
OS version: Linux Mint 21.3

