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.
Under certain circumstances, the I18N wizard throws a NPE whilst processing selected source file(s): Annotation: Exception occurred in Request Processor java.lang.NullPointerException at org.netbeans.editor.LineRootElement.fixSyntaxState Infos(LineRootElement.java:370) at org.netbeans.editor.DocumentContent$Edit.undoOrRed o(DocumentContent.java:399) at org.netbeans.editor.DocumentContent$Edit.<init> (DocumentContent.java:316) at org.netbeans.editor.DocumentContent.remove (DocumentContent.java:82) at org.netbeans.editor.BaseDocument.remove (BaseDocument.java:623) at org.netbeans.modules.i18n.java.JavaI18nSupport$1.r un(JavaI18nSupport.java:792) at org.netbeans.editor.BaseDocument.runAtomicAsUser (BaseDocument.java:890) at org.netbeans.editor.GuardedDocument.runAtomic (GuardedDocument.java:217) at org.openide.text.NbDocument.runAtomic (NbDocument.java:329) at org.netbeans.modules.i18n.java.JavaI18nSupport$Jav aI18nReplacer.replace(JavaI18nSupport.java:786) at org.netbeans.modules.i18n.wizard.HardStringWizardP anel$Panel.doLongTimeChanges (HardStringWizardPanel.java:650) at org.netbeans.modules.i18n.wizard.I18nWizardDescrip tor$ProgressThread.run (I18nWizardDescriptor.java:260) at org.openide.util.Task.run (Task.java:136) at org.openide.util.RequestProcessor$Task.run (RequestProcessor.java:328) [catch] at org.openide.util.RequestProcessor$Processor.run (RequestProcessor.java:670) Note that individual internationalization of each file in the selection works OK (which IMO rules out the content of the files at hand).
The problem seems to be in module Editor. In the stack trace, the last call initiated from module I18n is org.netbeans.editor.BaseDocument.remove(int, int) which should should check the passed parameters and throw a BadLocationException if there are wrong (module I18n would display an error message dialog then). Since this was not the case, the problem is somewhere else.
There appears to be null stateInfo in a non-first line element. Normally this should not happen but we should add a robustness check for that situation.
should be fixed in [maintrunk] Affected code has been removed as a result of issue #44693 fixing...
v