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 218220 - Multiple .conf files causes RCP uninstaller to hang
Summary: Multiple .conf files causes RCP uninstaller to hang
Status: RESOLVED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: NBI (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 14:06 UTC by NeilCSmith
Modified: 2012-09-19 03:00 UTC (History)
1 user (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 NeilCSmith 2012-09-12 14:06:38 UTC
I have a platform application which ships with 2 .conf files in /etc.  This causes the uninstaller to hang indefinitely due to a NPE.  The cause is the code in NetBeansRCPUtils.getApplicationUserDir() - http://hg.netbeans.org/main-silver/file/868e279b3a11/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/utils/applications/NetBeansRCPUtils.java#l106 which cannot handle cases of 2 .conf files  It can handle more than 2 though!

The same bug is repeated in the getApplicationName() method.

This code doesn't need the 'if' checks on array length at all - it should just use the 'for' loop.  The infrastructure should also be able to cope with a 'null' being returned from these methods without hanging.

Workaround - add an additional empty file with the .conf suffix (eg. uninstaller.conf) - 3 files works fine.
Comment 1 Jiri Rechtacek 2012-09-12 15:27:01 UTC
Thanks for the report with a helpful hint, it really needs to be fixed. A patch would be welcome.
Comment 2 Libor Fischmeistr 2012-09-17 12:36:33 UTC
Fixed in changeset core-main/rev/31e86e49eff7

Thanks for the tip where and how to fix this bug.

And I want to ask you to verify the fix. Thank you.
Comment 3 Quality Engineering 2012-09-19 03:00:51 UTC
Integrated into 'main-golden', will be available in build *201209190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/31e86e49eff7
User: Libor Fischmeistr <lfischmeistr@netbeans.org>
Log: #218220: Multiple .conf files causes RCP uninstaller to hang