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 200303 - NullPointerException at org.netbeans.modules.form.GandalfPersistenceManager.encodeInvalidXMLChars
Summary: NullPointerException at org.netbeans.modules.form.GandalfPersistenceManager.e...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-22 04:49 UTC by Tomas Mysik
Modified: 2011-07-22 09:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180057


Attachments
stacktrace (4.93 KB, text/plain)
2011-07-22 04:49 UTC, Tomas Mysik
Details
stacktrace (4.93 KB, text/plain)
2011-07-22 04:53 UTC, Tomas Mysik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2011-07-22 04:49:54 UTC
Build: NetBeans IDE Dev (Build 20110720-b38145cec97a)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Linux

User Comments:
tmysik: Saving matisse form




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.GandalfPersistenceManager.encodeInvalidXMLChars(GandalfPersistenceManager.java:4004)
   at org.netbeans.modules.form.GandalfPersistenceManager.saveProperty(GandalfPersistenceManager.java:3881)
   at org.netbeans.modules.form.GandalfPersistenceManager.saveProperties(GandalfPersistenceManager.java:3800)
   at org.netbeans.modules.form.GandalfPersistenceManager.saveComponent(GandalfPersistenceManager.java:3723)
   at org.netbeans.modules.form.GandalfPersistenceManager.saveVisualComponent(GandalfPersistenceManager.java:3484)
   at org.netbeans.modules.form.GandalfPersistenceManager.saveContainer(GandalfPersistenceManager.java:3283)
Comment 1 Tomas Mysik 2011-07-22 04:49:59 UTC
Created attachment 109561 [details]
stacktrace
Comment 2 Tomas Mysik 2011-07-22 04:51:30 UTC
P2 at least since I cannot save my Java form at all and have no idea how to work around it :/
Comment 3 Tomas Mysik 2011-07-22 04:53:08 UTC
Created attachment 109562 [details]
stacktrace

cannot save my java form at all! uaaaaaaaaaaaaaaaa!!!!!!!!!!
Comment 4 Jan Stola 2011-07-22 06:29:13 UTC
> cannot save my java form at all! uaaaaaaaaaaaaaaaa!!!!!!!!!!

I am sorry, I am not able to reproduce the problem. Could you, please, attach the problematic form ... just kidding. In fact, I am really sorry for that. I have overlooked that null can come into encodeInvalidXMLChars() method. I will fix it soon (=today), but I am afraid that it will not help you with saving of your current form :-(. Anyway, thanks for catching that problem.
Comment 5 Tomas Mysik 2011-07-22 06:46:58 UTC
Thanks for your words, Honzo :) Never mind, I switched to 7.0.1 RC a while ago, due to other bugs (in other modules ;) as well.

BTW I also noticed that the Inspector window does not exist anymore - too bad, I used it docked between Palette and Properties so I was able to see everything needed for working in Matisse form (my Navigator window is in auto-hiding mode). Is there a way to get it working like in NB 7.0?
Comment 6 Jan Stola 2011-07-22 09:19:17 UTC
I was not able to reproduce this problem using a simple test case. It seems to be rather uncommon situation. There must be some property that is modified and whose property editor is not XMLPropertyEditor, i.e., serialization must be used to store the property value.

I searched NetBeans sources and I found that
org.netbeans.modules.a11ychecker.traverse.FocusTraversalPolicyEditor
is used in several forms and meets the mentioned requirements.

So, the reproducible steps are:
1. Install a11ychecker module (that resides in main/contrib)
2. Open FmtAlignment form from php.editor
3. Perform some dummy modification to mark the file as modified.
4. Save the form => the mentioned exception is thrown.
Comment 7 Jan Stola 2011-07-22 09:25:19 UTC
Fixed.

Modified file: http://hg.netbeans.org/jet-main/rev/50e066ff26e2

BTW: I have noticed some other problems of FocusTraversalPolicyEditor (besides not being XMLPropertyEditor). So, make sure to check the diff when you are modifying a form that is using this property editor.

>BTW I also noticed that the Inspector window does not exist anymore - too bad,
>I used it docked between Palette and Properties so I was able to see everything
>needed for working in Matisse form (my Navigator window is in auto-hiding
>mode). Is there a way to get it working like in NB 7.0?

HIE team was requesting this change (merge of Inspector and Navigator) for a long time. There's no way to resurrect the old Inspector. The corresponding TopComponent had been removed completely.
Comment 8 Tomas Mysik 2011-07-22 09:37:20 UTC
(In reply to comment #6)
> I searched NetBeans sources and I found that
> org.netbeans.modules.a11ychecker.traverse.FocusTraversalPolicyEditor
> is used in several forms and meets the mentioned requirements.
> 
> So, the reproducible steps are:
> 1. Install a11ychecker module (that resides in main/contrib)
> 2. Open FmtAlignment form from php.editor
> 3. Perform some dummy modification to mark the file as modified.
> 4. Save the form => the mentioned exception is thrown.

Yes, I use this plugin. Sorry for not mentioning that, it did not come into my mind...

In any case, thanks for fixing.