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 187784 - In RCP development "Build Installers" produces non working Mac OS X Installer if application contains parentheses in its name
Summary: In RCP development "Build Installers" produces non working Mac OS X Installer...
Status: VERIFIED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: NBI (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: dlipin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 12:35 UTC by reyez
Modified: 2010-07-09 08:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
out.txt for comment #1 (273.61 KB, text/plain)
2010-06-18 18:06 UTC, reyez
Details
in reply to Comment #4 From dlipin 2010-06-18 19:10:28 (160.43 KB, text/plain)
2010-06-18 19:39 UTC, reyez
Details
image with empty installer (28.57 KB, image/png)
2010-06-18 20:19 UTC, reyez
Details
in reply to Comment #8 From dlipin (30.65 KB, text/plain)
2010-06-18 20:58 UTC, reyez
Details
WelcomePanel.java (15.18 KB, application/octet-stream)
2010-06-18 21:40 UTC, dlipin
Details
launcher.sh (49.37 KB, text/plain)
2010-06-18 21:43 UTC, dlipin
Details
in reply to Comment #16 From dlipin 2010-06-18 21:40:51 (30.67 KB, text/plain)
2010-06-18 23:51 UTC, reyez
Details
registry.xml in reply to Comment #18 From dlipin 2010-06-18 21:50:48 (5.00 KB, text/xml)
2010-06-18 23:52 UTC, reyez
Details
WelcomePanel.java (14.21 KB, application/octet-stream)
2010-06-19 07:47 UTC, dlipin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description reyez 2010-06-18 12:35:05 UTC
I got an RCP application and the "Build installers" feature is really cool. And works for Windows and Linux installers.

However, the Installation application fails generating a working MAC OS X installer.

What happens:
- generation of .tgz seems to be ok
- execution of installer fails silently.
- execution on command line of installer does not yield any error
- execution of Contents/MacOS/executable
says:
 
Configuring the installer...
Searching for JVM on the system...
Java SE Development Kit (JDK) was not found on this computer
JDK 6 is required for installing XYZ. Make sure that the JDK is properly installed and run installer again.
You can specify valid JDK location using --javahome installer argument.

To download the JDK, visit http://java.sun.com/javase/downloads


Maybe that's the source of the error? Setting parameter --javahome does not work either

Btw. Setting the correct path does not work either.
Any ideas? Thanks!
Comment 1 dlipin 2010-06-18 17:23:33 UTC
Do you have Leopard (or Snow Leopard) with Java 6 installed on that Mac OS X system?

Could you please run "sh -x Contents/MacOS/executable --verbose > out.txt 2>&1" and attach out.txt file to the issue? Thanks.
Comment 2 reyez 2010-06-18 18:06:32 UTC
Created attachment 100220 [details]
out.txt for comment #1
Comment 3 reyez 2010-06-18 18:07:42 UTC
(In reply to comment #1)
> Do you have Leopard (or Snow Leopard) with Java 6 installed on that Mac OS X
> system?
> 
> Could you please run "sh -x Contents/MacOS/executable --verbose > out.txt 2>&1"
> and attach out.txt file to the issue? Thanks.

out.txt is attached.

Java is:
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)


Mac is 10.6.4 (Snow Leopard).


Thanks!
Comment 4 dlipin 2010-06-18 19:10:28 UTC
Could you please attach the output of the following commands:
ls -la /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0
ls -laR /System/Library/Frameworks/JavaVM.framework/Versions/
ls -la /usr/bin/java
which java
Comment 5 reyez 2010-06-18 19:39:09 UTC
Created attachment 100225 [details]
in  reply to Comment #4 From  dlipin 2010-06-18 19:10:28
Comment 6 dlipin 2010-06-18 19:48:31 UTC
I guess I found the root cause... and the last question, I hope:)
Does it work without parentheses in the name?
E.g. if you name your project just
BackupGoo - A backup solution for Google Apps
not
BackupGoo - A backup solution for Google Apps(TM)
?
Comment 7 reyez 2010-06-18 20:19:08 UTC
Created attachment 100229 [details]
image with empty installer

I removed the "(" and ")" and the installer ist built.
It also starts (hooray). But the installer itself is empty. I cannot click "next" or "cancel" - the buttons do not react.

I can also try to remove "-" or the " " in the filename. But I am not sure if that is what was intended.

Thanks for your help :)
Comment 8 dlipin 2010-06-18 20:25:18 UTC
There should be definitely no problems with space in path... Dashes ("-") are also unlikely the reason of such behaviour but who knows...

Could you please run installer via
sh Contents/MacOS/executable --verbose --output out.txt
then exit when see that empty screen, and attach out.txt file. Thanks.

BTW, does resizing of the dialog has any effect?
Comment 9 dlipin 2010-06-18 20:40:51 UTC
FYI.
The "parentheses" problem was just fixed for development builds. The fix would be available in a couple of days at the latest daily build
http://bits.netbeans.org/netbeans/trunk/nightly/latest/
(probably would backport it to the nearest 6.9 patch - which is 6.9.1 release - but no guarantee).

It would be great if you could verify that by creating the installer for the same app ("BackupGoo - A backup solution for Google Apps(TM)") using that build and running it on Mac. Thanks.
Comment 10 reyez 2010-06-18 20:58:27 UTC
Created attachment 100231 [details]
 in reply to Comment #8 From  dlipin

content of:
sh Contents/MacOS/executable --verbose --output out.txt
Thanks!
Comment 11 dlipin 2010-06-18 21:02:08 UTC
The first commit [1] was wrong, the second one [2] is OK.

[1] http://hg.netbeans.org/main/rev/71c40af3adfd
[2] http://hg.netbeans.org/main/rev/956eda5ab817
Comment 12 dlipin 2010-06-18 21:06:34 UTC
OK, I see some problems there in log:

Fri Jun 18 22:54:45 grannysmith.fritz.box java[59761] <Error>: kCGErrorIllegalArgument: CGSOrderWindowList
Fri Jun 18 22:54:45 grannysmith.fritz.box java[59761] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.


and then

 Error during updating wizard UI
 java.lang.reflect.InvocationTargetException
 	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1034)
 	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1320)
 	at org.netbeans.installer.wizard.containers.SwingFrameContainer.updateWizardUi(SwingFrameContainer.java:214)
 	at org.netbeans.installer.wizard.Wizard.next(Wizard.java:607)
 	at org.netbeans.installer.wizard.components.WizardAction$1.run(WizardAction.java:127)
 Caused by: java.lang.NullPointerException
 	at org.mycompany.installer.wizard.components.panels.WelcomePanel$WelcomePanelSwingUi.initialize(WelcomePanel.java:205)
 	at org.netbeans.installer.wizard.components.WizardComponent$WizardComponentUi.getSwingUi(WizardComponent.java:444)
 	at org.netbeans.installer.wizard.components.WizardPanel$WizardPanelUi.getSwingUi(WizardPanel.java:167)
 	at org.netbeans.installer.wizard.components.panels.ErrorMessagePanel$ErrorMessagePanelUi.getSwingUi(ErrorMessagePanel.java:99)
 	at org.mycompany.installer.wizard.components.panels.WelcomePanel$WelcomePanelUi.getSwingUi(WelcomePanel.java:152)
 	at org.netbeans.installer.wizard.containers.SwingFrameContainer.updateWizardUi(SwingFrameContainer.java:228)
 	at org.netbeans.installer.wizard.containers.SwingFrameContainer$1.run(SwingFrameContainer.java:216)
 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
 	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
 	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Will see why such an issue happens...
Comment 13 reyez 2010-06-18 21:14:23 UTC
(In reply to comment #7)
> Created an attachment (id=100229) [details]
> image with empty installer
> 
> I removed the "(" and ")" and the installer ist built.
> It also starts (hooray). But the installer itself is empty. I cannot click
> "next" or "cancel" - the buttons do not react.
> 
> I can also try to remove "-" or the " " in the filename. But I am not sure if
> that is what was intended.
> 
> Thanks for your help :)


I just renamed everything into "BackupGoo". No dashes. No spaces. But it does
(still) not work (my out.txt in reply to comment 8 was produced by that).

Thanks!
Comment 14 reyez 2010-06-18 21:19:57 UTC
(In reply to comment #12)
> OK, I see some problems there in log:
> 
> Fri Jun 18 22:54:45 grannysmith.fritz.box java[59761] <Error>:
> kCGErrorIllegalArgument: CGSOrderWindowList
> Fri Jun 18 22:54:45 grannysmith.fritz.box java[59761] <Error>: kCGErrorFailure:
> Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
> 
> 
> and then
> 
>  Error during updating wizard UI
>  java.lang.reflect.InvocationTargetException
>      at java.awt.EventQueue.invokeAndWait(EventQueue.java:1034)
>      at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1320)
>      at
> org.netbeans.installer.wizard.containers.SwingFrameContainer.updateWizardUi(SwingFrameContainer.java:214)
>      at org.netbeans.installer.wizard.Wizard.next(Wizard.java:607)
>      at
> org.netbeans.installer.wizard.components.WizardAction$1.run(WizardAction.java:127)
>  Caused by: java.lang.NullPointerException
>      at
> org.mycompany.installer.wizard.components.panels.WelcomePanel$WelcomePanelSwingUi.initialize(WelcomePanel.java:205)
>      at
> org.netbeans.installer.wizard.components.WizardComponent$WizardComponentUi.getSwingUi(WizardComponent.java:444)
>      at
> org.netbeans.installer.wizard.components.WizardPanel$WizardPanelUi.getSwingUi(WizardPanel.java:167)
>      at
> org.netbeans.installer.wizard.components.panels.ErrorMessagePanel$ErrorMessagePanelUi.getSwingUi(ErrorMessagePanel.java:99)
>      at
> org.mycompany.installer.wizard.components.panels.WelcomePanel$WelcomePanelUi.getSwingUi(WelcomePanel.java:152)
>      at
> org.netbeans.installer.wizard.containers.SwingFrameContainer.updateWizardUi(SwingFrameContainer.java:228)
>      at
> org.netbeans.installer.wizard.containers.SwingFrameContainer$1.run(SwingFrameContainer.java:216)
>      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
>      at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
>      at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
>      at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
>      at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
>      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> 
> 
> Will see why such an issue happens...

Great!

If there's anything I can do let me know.

I am not yet 100% sure if I got time to build Netbeans to crosscheck the paranthesis problem (I am not a Netbeans expert tough and I am not sure how much time it will take for me to build everything from scratch).


Thanks for your quick replies and your support!

Raphael
Comment 15 dlipin 2010-06-18 21:29:24 UTC
> If there's anything I can do let me know.

OK, I'll do it soon :)

> I am not yet 100% sure if I got time to build Netbeans to crosscheck the
paranthesis problem (I am not a Netbeans expert tough and I am not sure how
much time it will take for me to build everything from scratch).

You don't need to build NetBeans from sources to verify the fix. Of course, you can do that if you like :) But the easiest way is to wait for the daily build with that fix (it would be ready in ~2 days):
http://bits.netbeans.org/netbeans/trunk/nightly/latest/

Actually you can even test the fix yourself by fixing it in the NetBeans installed!

To fix the parantheses problem, go to 
NETBEANS_INSTALL_DIR/harness/modules/ext
Notice nbi-engine.jar there... you need to unzip it somewhere and modify file native/launcher/unix/launcher.sh in it. Search for "escapeString()" there (line ~1630) and change line
echo "$1" | sed "s/\\\/\\\\\\\/g;s/\ /\\\\ /g;s/\"/\\\\\"/g" # escape spaces & commas

to

echo "$1" | sed "s/\\\/\\\\\\\/g;s/\ /\\\\ /g;s/\"/\\\\\"/g;s/(/\\\\\(/g;s/)/\\\\\)/g;" # escape spaces, commas and parentheses


I'm working on the NullPointerException issue right now...
Comment 16 dlipin 2010-06-18 21:40:51 UTC
Created attachment 100232 [details]
WelcomePanel.java

Please put the attached file instead of
NETBEANS_INSTALL_DIR/harness/nbi/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/WelcomePanel.java

Then please run installer via
sh Contents/MacOS/executable --verbose --output out.txt
then exit when see that empty screen, and attach out.txt file. Thanks.
(This will not fix that NullPointerException issue but will give more more info about why it happens). Thanks again :)
Comment 17 dlipin 2010-06-18 21:43:04 UTC
Created attachment 100233 [details]
launcher.sh

The fixed launcher.sh file (native/launcher/unix/launcher.sh in NETBEANS_INSTALL_DIR/harness/modules/ext/nbi-engine.jar).
Comment 18 dlipin 2010-06-18 21:50:48 UTC
Could you please also attach /Users/ra/.backupgoo-installer/registry.xml?
Thanks.
Comment 19 reyez 2010-06-18 23:51:14 UTC
Created attachment 100235 [details]
in reply to Comment #16 From  dlipin   2010-06-18 21:40:51

I hope I did the correct things - I also replaced the launcher.sh
 as mentioned in comment #20.
Thanks for your help!
Comment 20 reyez 2010-06-18 23:52:52 UTC
Created attachment 100236 [details]
registry.xml in reply to Comment #18 From  dlipin   2010-06-18 21:50:48

Thanks!
Comment 21 reyez 2010-06-18 23:54:05 UTC
(In reply to comment #19)
> Created an attachment (id=100235) [details]
> in reply to Comment #16 From  dlipin   2010-06-18 21:40:51
> 
> I hope I did the correct things - I also replaced the launcher.sh
>  as mentioned in comment #20.
wrong. "as mentioned in comment #17" is correct...
sry...

> Thanks for your help!
Comment 22 dlipin 2010-06-19 07:47:22 UTC
Created attachment 100239 [details]
WelcomePanel.java

Put this WelcomePanel.java to 
NETBEANS_INSTALL_DIR/harness/nbi/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/WelcomePanel.java
and this NullPointerIssue should be gone away.
Comment 23 dlipin 2010-06-19 07:54:26 UTC
So the "parentheses" issue is fixed (in main#71c40af3adfd and main#956eda5ab817).
The NullPointerException was filed (and fixed) as separate Issue #187822.

So I close this issue as fixed. Feel free to file another issue if some other issue happens. 

Please verify (set status to VERIFIED) this issue and Issue #187822 when available in the daily build in a couple of days.
http://bits.netbeans.org/netbeans/trunk/nightly/latest/

Thanks a lot for your incredible help!
Comment 24 Quality Engineering 2010-06-20 03:11:15 UTC
Integrated into 'main-golden', will be available in build *201006200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/71c40af3adfd
User: Dmitry Lipin <dlipin@netbeans.org>
Log: Bug #187784 In RCP development "Build Installers" produces non working Mac OS X Installer if application contains parentheses in its name
Comment 25 dlipin 2010-06-22 13:05:29 UTC
reyez,

Could you please verify that you can successfully create and run installer for RCP project with parentheses in the name using the latest daily build?
http://bits.netbeans.org/netbeans/trunk/nightly/latest/

Thanks.
Comment 26 reyez 2010-06-23 08:55:15 UTC
installer works with latest build :)

thanks a lot for fixing the issue - really great support!
Comment 27 rbalada 2010-06-28 11:35:02 UTC
main #71c40af3adfd transplanted to release691 #525481a84303
main #956eda5ab817 transplanted to release691 #c37a31443067
Comment 28 Jaromir Uhrik 2010-07-09 08:05:13 UTC
Verified - the code is properly in the release691 repository.