You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2009/12/18 17:01:13 UTC

DO NOT REPLY [Bug 48411] New: Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

           Summary: Squiggle Mac OS X application bundle does not launch
                    or start when installed in a path that contains spaces
           Product: Batik
           Version: 1.7
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SVG Viewer
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: jalexanderdatkins@googlemail.com


Created an attachment (id=24733)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24733)
the corrected Squiggle.app/Contents/MacOS/Squiggle shell script

Overview:
The Mac OS X application bundle for Squiggle (a GUI front-end for Batik)
refuses to run if it is installed in a path containing spaces, and possibly
some other odd characters.  However, it does not produce any error messages; it
just doesn't start.

Steps to Reproduce:
1. Create a folder whose name contains one or more spaces.
2. Download the Mac OS X disk image from
http://xmlgraphics.apache.org/batik/download.cgi#Download+a+distribution
3. Most OS X native browsers will mount the disk image automatically.  If your
browser is a ported browser that doesn't do this, find the downloaded disk
image and double-click on it to mount it.
4. Install the Squiggle application by dragging it from the disk image to the
folder created in step 1, or to a sub-folder of a folder whose name contains
one or more spaces.
5. Un-mount (eject) the disk image.
6. Double-click on the installed Squiggle application to launch it.
7. When the computer displays the message '“Squiggle” is an application which
was downloaded from the Internet. Are you sure you want to open it?' click
Open.

Actual Results:
The Squiggle icon that appeared in the Dock in step 7 disappears.  On
subsequent attempted launches (when the computer does not ask for confirmation)
the icon appears very briefly in the Dock and then disappears.  No splash
screens etc appear.  The following is written to the Console (which can be read
by opening /Applications/Utilities/Console.app):

Dec 18 15:45:25 Beetle [0x0-0x135135].org.apache.batik[77397]: usage: dirname
path
Dec 18 15:45:25 Beetle [0x0-0x135135].org.apache.batik[77397]: Unable to access
jarfile /../Resources/batik-squiggle.jar
Dec 18 15:45:25 Beetle com.apple.launchd[158]
([0x0-0x135135].org.apache.batik[77397]): Exited with exit code: 1

Expected Results:
The Squiggle application should launch, display a splash screen and continue to
run, and its icon should remain in the Dock until the user desires the
application to quit.

Build Date & Platform:
Build 2008-01-06 on Mac OS 10.5.8

Additional Builds and Platforms:
This only affects the Mac OS X application.  The JAR file works just fine.

Additional Information:
I know how to fix this.

Inside the Mac OS X application bundle (applications on OS X are really just
folders whose name ends in '.app') there is a file at
Squiggle.app/Contents/MacOS/Squiggle.  It is an executable shell script that is
run when the user double-clicks on the application.  It attempts to start up
the JAR located at Squiggle.app/Contents/Resources/batik-squiggle.jar.  It is
this file that contains the bug.  This script reads as follows:

#!/bin/sh

JAVA=/usr/bin/java
[ -e "$JAVA_HOME/bin/java" ] && JAVA="$JAVA_HOME/bin/java"

"$JAVA" -Dcom.apple.mrj.application.apple.menu.about.name=Squiggle -jar
"`dirname $0`/../Resources/batik-squiggle.jar"

The problem is in the last line.  The script should read as follows:

#!/bin/sh

JAVA=/usr/bin/java
[ -e "$JAVA_HOME/bin/java" ] && JAVA="$JAVA_HOME/bin/java"

"$JAVA" -Dcom.apple.mrj.application.apple.menu.about.name=Squiggle -jar
"`dirname \"$0\"`/../Resources/batik-squiggle.jar"

I have also attached the corrected script.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

--- Comment #4 from Helder Magalhães <he...@gmail.com> 2009-12-19 11:33:12 UTC ---
Created an attachment (id=24735)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24735)
Patch from the suggested fix

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] [PATCH] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

Alexander Atkins <ja...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24733|application/octet-stream    |application/x-sh
          mime type|                            |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] [PATCH] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

Freek Dijkstra <pu...@macfreek.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.8                         |1.7

--- Comment #6 from Freek Dijkstra <pu...@macfreek.nl> 2010-01-31 12:31:09 UTC ---
I can confirm this bug, and its solution.

In fact, I wanted to submit the same patch, since I did not find this page
before. To aid other users who encounter the same problem, here are the errors
that I got:

% open Squiggle.app
LSOpenFromURLSpec() failed with error -10810 for the file /Applications/Image
viewer/Squiggle.app.

% cat /var/log/system.log
[0x0-0x63d63d].org.apache.batik[95014]: Unable to access jarfile
/../Resources/batik-squiggle.jar
com.apple.launchd[119] ([0x0-0x63d63d].org.apache.batik[95014]): Exited with
exit code: 1
[0x0-0x63e63e].org.apache.batik[95018]: usage: dirname path

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.7                         |1.8

--- Comment #3 from Helder Magalhães <he...@gmail.com> 2009-12-19 11:29:54 UTC ---
(In reply to comment #0)
> The problem is in the last line.  The script should read as follows:
[...]
> "$JAVA" -Dcom.apple.mrj.application.apple.menu.about.name=Squiggle -jar
> "`dirname \"$0\"`/../Resources/batik-squiggle.jar"

I've checked that this is still present [1] in the trunk version, so I'm
adjusting the bug's metadata.

A quick web crawl validates [2] your suggestion. Thanks for the hint! ;-)


[1]
http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/build.xml?revision=774981&view=markup#l513
[2]
http://www.unix.com/shell-programming-scripting/109120-find-dirname-problems-white-spaces-directories.html

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] [PATCH] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable
            Summary|Squiggle Mac OS X           |[PATCH] Squiggle Mac OS X
                   |application bundle does not |application bundle does not
                   |launch or start when        |launch or start when
                   |installed in a path that    |installed in a path that
                   |contains spaces             |contains spaces

--- Comment #5 from Helder Magalhães <he...@gmail.com> 2009-12-19 11:34:45 UTC ---
Available patch is pretty simple and seems very safe to apply. Could it be
committed?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

--- Comment #2 from Alexander Atkins <ja...@googlemail.com> 2009-12-18 09:55:46 UTC ---
Make that

http://www.atkinsfamily.ukonline.co.uk/Squiggle-1.7.dmg.zip

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] [PATCH] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Helder Magalhães <he...@gmail.com> 2010-02-06 05:23:25 UTC ---
Fixed in revision 907210. Thanks to Alexander Atkins for the report and
suggested fix, and to Freek Dijkstra for testing the solution! :-)

If possible, please download a nightly build and/or update your SVN
repositories and verify the resolution (marking the issue as "verified"). ;-)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48411] Squiggle Mac OS X application bundle does not launch or start when installed in a path that contains spaces

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48411

--- Comment #1 from Alexander Atkins <ja...@googlemail.com> 2009-12-18 09:46:54 UTC ---
The corrected Mac OS X disk image can be downloaded from

http://www.atkinsfamily.ukonline.co.uk/Squiggle-1.7.dmg

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org