This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 608 - GUI crashes due to JavaSoft Prefs failure
Summary: GUI crashes due to JavaSoft Prefs failure
Status: ASSIGNED
Alias: None
Product: UPPAAL Stratego
Classification: Unclassified
Component: Engine (show other bugs)
Version: 4.1.20-2
Hardware: PC Windows 10
: P5 blocker
Assignee: Marius Mikučionis
URL:
Depends on:
Blocks:
 
Reported: 2016-08-12 13:27 CEST by Marius Mikučionis
Modified: 2016-10-18 13:06 CEST (History)
0 users

See Also:
Architecture:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Mikučionis 2016-08-12 13:27:54 CEST
Here are symptoms on command line:
Aug 12, 2016 11:54:38 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Exception in thread "main" java.lang.NullPointerException
        at com.sun.java.swing.plaf.windows.WindowsIconFactory$FrameButtonIcon.paintIcon(Unknown Source)
        at on.v.a(Unknown Source)
        at on.v.a(Unknown Source)
        at com.uppaal.gui.Main.main(Unknown Source)

The issue is somewhere between JRE and Windows:
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6790382

The problem is most probably triggered on other Uppaal branches too, but it is not fatal and does not manifest always (probably depends on race conditions during JRE initialization), but once it happens it is quite consistent and probably looses all previously saved preferences, like paths and colors.
It becomes fatal starting with HiDPI support from 4.1.20-beta4 where the scaling factor is read from Prefs.

A workaround is to create the following registry key using regedit.exe:
[HKEY_LOCAL_MACHINE\Software\JavaSoft\Prefs]

And one more key for 64bit windows:
[HKEY_LOCAL_MACHINE\Software\WOW6432Node\JavaSoft\Prefs]