eraj007 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

With new preferences created for version 0017 version 0016 fails to start #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Version 0016 must be installed 
2.Install version 0017
3.Remove the preferences.txt file created by 0016
4.Start 0017
5.Stop 0017
6.Start old version 0016 

What is the expected output? 
Both version should work in parallel 
What do you see instead?
0016 fails to start, because the "last.window.x" item is not created by
0017. And the code at processing.app.Preferences.getInteger() does not
handle the NumberFormatException raised for the empty item.

Output:
Exception in thread "main" java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:417)
        at java.lang.Integer.parseInt(Integer.java:499)
        at processing.app.Preferences.getInteger(Preferences.java:750)
        at processing.app.Editor.restorePreferences(Editor.java:420)
        at processing.app.Base.<init>(Base.java:156)
        at processing.app.Base.main(Base.java:105)

You get 

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?

Please provide any additional information below.

Original issue reported on code.google.com by e.fa...@wayoda.org on 12 Aug 2009 at 8:34

GoogleCodeExporter commented 9 years ago
The workaround is to delete your preferences file.  Then run 0016 before 0017.  
I don't expect many people will 
install 0017 first and then go back and install an older version.  If they do, 
this fix is relatively straightforward.

Original comment by dmel...@gmail.com on 14 Aug 2009 at 11:32

GoogleCodeExporter commented 9 years ago
This is a bug, not a wontfix. Else preferences.txt would work across different 
versions.

It would be simple when the preferences.txt file name would contain a version 
number. 

Original comment by pow...@gmx.de on 11 Dec 2012 at 6:23