This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 186867 - 6.9RC1 crashes when trying to import settings from 6.8
Summary: 6.9RC1 crashes when trying to import settings from 6.8
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 188042 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-28 07:33 UTC by fabriziogiudici
Modified: 2010-06-24 11:44 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fabriziogiudici 2010-05-28 07:33:06 UTC
If I run 6.9RC1 on my laptop where 6.8 is installed, as expected NetBeans asks whether I want to import my 6.8 settings. If I accept, 6.9RC1 unexpectedly quit; looking at the var/log/messages.log I see:

INFO [org.netbeans.upgrade.AutoUpgrade]: Importing from /Users/fritz/.netbeans/6.8 to /Users/fritz/.netbeans/6.9rc1
WARNING [org.netbeans.core.startup.Main]
java.lang.NullPointerException
        at org.netbeans.upgrade.CopyFiles.copyFolder(CopyFiles.java:102)
        at org.netbeans.upgrade.CopyFiles.copyFolder(CopyFiles.java:104)
        at org.netbeans.upgrade.CopyFiles.copyFolder(CopyFiles.java:104)
        at org.netbeans.upgrade.CopyFiles.copyDeep(CopyFiles.java:97)
        at org.netbeans.upgrade.AutoUpgrade.copyToUserdir(AutoUpgrade.java:258)
        at org.netbeans.upgrade.AutoUpgrade.main(AutoUpgrade.java:97)
Caused: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.netbeans.core.startup.Main$1ImportHandler.run(Main.java:384)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



Answering "no", that is not importing settings, the IDE starts fine.
Comment 1 Marian Mirilovic 2010-05-28 08:46:11 UTC
Tried on Ubuntu with 6.9 Rc2 and haven't been able to reproduce
Comment 2 fabriziogiudici 2010-05-28 09:04:37 UTC
Some points:

1. I think that some defensive code could be implemented in any case. For instance, rather than failing the launch without any diagnostic, we could raise "Sorry, I couldn't import your previous settings; starting with a fresh installation" and run.

2. Is it possible to configure my copy to have more logs and perhaps seeing what's the offending folder?
Comment 3 Jiri Rechtacek 2010-05-28 11:44:35 UTC
Is it reproducible? If yes, could you run your NetBeans with a switch -J-Dorg.netbeans.upgrade.level=-1 and add your output log there? Thank you
Comment 4 Jiri Rechtacek 2010-05-28 13:50:11 UTC
I'm not able to reproduce it either. A changeset core-main/rev/c47987d7bc21 (in trunk) made importer more robust.
Comment 5 fabriziogiudici 2010-05-28 19:18:43 UTC
Until yesterday it was perfectly reproducible, but unfortunately this evening the problem doesn't reproduce any longer (I've used NB 6.8 this afternoon and it probably changed something).

My only point is that looking at the detailed logs with -J-Dorg.netbeans.upgrade.level=-1 I see that it also copies var/cache stuff, which I didn't expect to happen.
Comment 6 Quality Engineering 2010-05-30 07:10:40 UTC
Integrated into 'main-golden', will be available in build *201005300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c47987d7bc21
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #186867: 6.9RC1 crashes when trying to import settings from 6.8
Comment 7 fabriziogiudici 2010-06-16 19:00:09 UTC
Unfortunately, I have to reopen it, as it happened again with 6.9 final.

INFO [org.netbeans.upgrade.AutoUpgrade]: Importing from /Users/fritz/.netbeans/6.8 to /Users/fritz/.netbeans/6.9
WARNING [org.netbeans.core.startup.Main]
java.lang.NullPointerException
	at org.netbeans.upgrade.CopyFiles.copyFolder(CopyFiles.java:102)
	at org.netbeans.upgrade.CopyFiles.copyFolder(CopyFiles.java:104)
	at org.netbeans.upgrade.CopyFiles.copyFolder(CopyFiles.java:104)
	at org.netbeans.upgrade.CopyFiles.copyDeep(CopyFiles.java:97)
	at org.netbeans.upgrade.AutoUpgrade.copyToUserdir(AutoUpgrade.java:258)
	at org.netbeans.upgrade.AutoUpgrade.main(AutoUpgrade.java:97)
Caused: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.netbeans.core.startup.Main$1ImportHandler.run(Main.java:384)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:1


This time I archived the 6.8 settings, so I can attach them. They are a 50+MB .zip (after dropping -/var/cache), tell me how can I share it.
Comment 8 Jiri Rechtacek 2010-06-17 07:53:52 UTC
It's fixed in Development Daily Builds (upcoming NetBeans Next release), not in release69 branch. It can be backported to NetBeans 6.9.1. Could you verify in any recent daily build? It's important for backporting to 6.9.1. Thanks
Comment 9 Petr Blaha 2010-06-17 11:51:44 UTC
verified
Comment 10 rbalada 2010-06-21 13:37:56 UTC
main #c47987d7bc21 transplanted to release691 #72a95c80721b
Comment 11 Jiri Rechtacek 2010-06-24 11:44:27 UTC
*** Bug 188042 has been marked as a duplicate of this bug. ***