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.
If an auto-update operation fails (hangs and has to be killed), one or more of the xml files in the user's update_tracking directory will end up being empty, which causes the auto-update feature to kick in and freeze whenever the IDE starts up. Furthermore, the IDE auto-update process respawns whenever the IDE is quit or killed, which makes it impossible to exit the IDE through normal means. I originally encountered this problem when an auto-update operation froze in the installation step while installing the Ant documentation, Junit tests, and Fast Javac modules, and had to be killed. I found that several of the XML files in ~/.netbeans/3.5/update_tracking/ were empty after this happened, and whevever the auto updater respawned to try to complete the operation the following exception was reported on the console: Bad update_tracking org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.netbeans.updater.XMLUtil.parse(XMLUtil.java:58) at org.netbeans.updater.UpdateTracking.readModuleFromFile(UpdateTracking.java:301) at org.netbeans.updater.UpdateTracking.readModuleTracking(UpdateTracking.java:283) at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:303) at org.netbeans.updater.ModuleUpdater.run(ModuleUpdater.java:131) java.lang.NullPointerException at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:304) at org.netbeans.updater.ModuleUpdater.run(ModuleUpdater.java:131) Each time I killed the frozen update process the IDE would launch as normal, but then once I quit the IDE the updater would come back and freeze again, ad infinitum. I solved the problem by deleting the empty XML files. I'd recommend that the updater include logic to more gracefully handle this condition (empty XML files) instead of throwing an exception and hanging. - rdo
*** Issue 33725 has been marked as a duplicate of this issue. ***
Fixed in trunk (and for nevada patch 1). Deleting the file if found empty and letting it be regenerated (by the code already in place): Index: UpdateTracking.java =================================================================== RCS file: /cvs/autoupdate/libsrc/org/netbeans/updater/UpdateTracking.java,v retrieving revision 1.9 diff -c -r1.9 UpdateTracking.java *** UpdateTracking.java 19 Dec 2002 04:21:38 -0000 1.9 --- UpdateTracking.java 29 Jul 2003 13:14:13 -0000 *************** *** 273,278 **** --- 273,287 ---- File file = new File( dir + FILE_SEPARATOR + TRACKING_FILE_NAME + FILE_SEPARATOR + getTrackingName( codename ) + XML_EXT ); + + // fix for #34355 + try { + if ( file.exists() && file.length()==0 ) + file.delete(); + } catch (Exception e) { + // ignore + } + if ( ! file.exists() ) { if ( create ) return new Module( codename, file, fromuser );
closed