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

Bug 608

Summary: GUI crashes due to JavaSoft Prefs failure
Product: UPPAAL Stratego Reporter: Marius Mikučionis <marius>
Component: EngineAssignee: Marius Mikučionis <marius>
Status: ASSIGNED ---    
Severity: blocker    
Priority: P5    
Version: 4.1.20-2   
Hardware: PC   
OS: Windows 10   
Architecture:

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]