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.
Starting with recent dev builds (I am using 080121), this NPE is thrown routinely in the IDE, especially when I open text files, etc. Presumably some problem with my old settings, but did not go away just by deleting $userdir/config/Editors. Potential 6.0 settings compatibility bug.
Created attachment 55405 [details] Stack traces
I think I've found a fix for it, but please review. For whatever reason, a MIME path had no Preferences instance in it. When I fixed the getter, I found I also had to fix the setter (so I put in a warning), but then I did not get the setter problem again, so I am not sure what to say. Checking in editor/src/org/netbeans/modules/editor/options/BaseOptions.java; /shared/data/ccvs/repository/editor/src/org/netbeans/modules/editor/options/BaseOptions.java,v <-- BaseOptions.java new revision: 1.161; previous revision: 1.160 done
Thanks Jesse, the fix looks ok. I mean it would be better to understand why there is no Preferences in MimeLookup, but I suspect that this is a problem with initialization of MimeLookup that when re-entered may return an empty lookup and it wouldn't be easy to track down. Also, after eliminating BaseOptions and Settings the initialization should be more straightforward and we shouldn't have these problems.