Some applications crash on a sparsebundle disk image?
Moderators: Cat_7, Ronald P. Regensburg, ClockWise
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Some applications crash on a sparsebundle disk image?
Following a suggestion here a few weeks ago about using the sparsebundle format for SheepShaver disk images, I replaced the disk image in one of my projects with a sparsebundle - and then found (as I had discovered earlier but had forgotten) that some programs crash when run from a sparsebundle disk image, so I've had to go back to the old .dsk/.img format.
The program that caused a crash in my project was the macps2pdf script in the MacGhostView32 application. SheepShaver crashed even when i compiled an AppleScript that ran macps2pdf. it doesn't cause any problems on a traditional disk image.
I have no idea why this should happen, but I remember that I encountered similar problems when I first tried using sparsebundles in my projects some years ago. I don't remember the exact detail, but I remember going back to the standard disk image, as I did just now.
Probably no one else will have this kind of problem, but I thought it was worthwhile to post a message about it.
The program that caused a crash in my project was the macps2pdf script in the MacGhostView32 application. SheepShaver crashed even when i compiled an AppleScript that ran macps2pdf. it doesn't cause any problems on a traditional disk image.
I have no idea why this should happen, but I remember that I encountered similar problems when I first tried using sparsebundles in my projects some years ago. I don't remember the exact detail, but I remember going back to the standard disk image, as I did just now.
Probably no one else will have this kind of problem, but I thought it was worthwhile to post a message about it.
- adespoton
- Forum All-Star
- Posts: 4279
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Some applications crash on a sparsebundle disk image?
Thanks; I'll keep an eye on it. I had similar issues years ago when sparsebundle support was first added, but did something to fix it at some later date, and I'm not sure what that was now. It's possibly that I modified my bundles to have 1MB files instead of the default 8MB, or it could be something else.
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Some applications crash on a sparsebundle disk image?
If you remember what you did to fix it, please let us know.
Re: Some applications crash on a sparsebundle disk image?
When I tried a few years ago, I wasn't even able to install OS 9 in SheepShaver using a sparsebundle image. Would indeed be great to know how to fix this.
- Ronald P. Regensburg
- Expert User
- Posts: 7834
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: Some applications crash on a sparsebundle disk image?
I vaguely remember that that the initial assigned size of the sparsebundle image mattered. There must be an old discussion about that somewhere in the forum.
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Some applications crash on a sparsebundle disk image?
Couldn't find anything in old messages after a quick search, but I may not have looked deeply enough.
- adespoton
- Forum All-Star
- Posts: 4279
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Some applications crash on a sparsebundle disk image?
I think it may not have been on the forum; we may have been discussing it directly with Vasi or on the mail list.
- adespoton
- Forum All-Star
- Posts: 4279
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Some applications crash on a sparsebundle disk image?
Here's the script I use to prep my images as sparsebundles:
I use this on a regular 2GB disk image after installing 9.0.4.
Code: Select all
#!/bin/sh
echo $1
hdiutil convert "$1" -format UDSB -tgtimagekey sparse-band-size=2048 -o "$1-1Mb.sparsebundle"
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Some applications crash on a sparsebundle disk image?
That seems to work! Thank you! It's good to have it on record here for future reference. The macpcl2pdf app doesn't crash the system now.adespoton wrote:Here's the script I use to prep my images as sparsebundles:
Code: Select all
#!/bin/sh echo $1 hdiutil convert "$1" -format UDSB -tgtimagekey sparse-band-size=2048 -o "$1-1Mb.sparsebundle"
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Some applications crash on a sparsebundle disk image?
And here is an AppleScript wrapper for adespoton's script that includes error handling:
Certainly adespoton can improve on this but it seems to work.
Code: Select all
on open theDrop
repeat with thisItem in theDrop
set thisPath to POSIX path of thisItem
set outPath to thisPath & "-1Mb.sparsebundle"
try
do shell script "hdiutil convert" & space & quoted form of thisPath & space & "-format UDSB -tgtimagekey sparse-band-size=2048 -o" & space & quoted form of outPath
on error err
if err contains "recognized" then
display dialog "Please change the extension of the disk image to .img and try again." buttons {"OK"}
end if
end try
end repeat
end open
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Some applications crash on a sparsebundle disk image?
Could you check the 7z file in the repository? I can't extract it either on Windows (with 7-Zip) or macOS (with BetterZip). And various other programs say the file is invalid.adespoton wrote:I'll add the git repo to this thread too:
https://github.com/adespoton/sparserbundler
- adespoton
- Forum All-Star
- Posts: 4279
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Some applications crash on a sparsebundle disk image?
Hmm; I'll check it over the next couple of days; it's possible the upload never completed correctly (the original decompresses for me with Keka and The Unarchiver).
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Some applications crash on a sparsebundle disk image?
Slightly improved code for the AppleScript wrapper (and, for anyone doing this for the first time, you must save it in the File Format "Application" (not "Script"):
Code: Select all
on open theDrop
repeat with thisItem in theDrop
set thisPath to POSIX path of thisItem
set outPath to thisPath & "-1Mb.sparsebundle"
try
do shell script "hdiutil convert" & space & quoted form of thisPath & space & "-format UDSB -tgtimagekey sparse-band-size=2048 -o" & space & quoted form of outPath
on error err
if err contains "recognized" then
display dialog "Please change the extension of the disk image to .img and try again." buttons {"OK"}
else
display dialog "Error:" & space & err buttons {"OK"}
end if
end try
end repeat
end open
- adespoton
- Forum All-Star
- Posts: 4279
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Some applications crash on a sparsebundle disk image?
Github repo fixed; somehow I pushed the alias instead of the archive. It should be accessible now.