E-Maculation
https://www.emaculation.com/forum/

Some applications crash on a sparsebundle disk image?
https://www.emaculation.com/forum/viewtopic.php?f=20&t=9790
Page 1 of 1

Author:  emendelson [ Mon Jul 23, 2018 2:09 am ]
Post subject:  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.

Author:  adespoton [ Tue Jul 31, 2018 9:39 pm ]
Post subject:  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.

Author:  emendelson [ Wed Aug 01, 2018 11:33 am ]
Post subject:  Re: Some applications crash on a sparsebundle disk image?

If you remember what you did to fix it, please let us know.

Author:  mabam [ Wed Aug 01, 2018 2:55 pm ]
Post subject:  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.

Author:  Ronald P. Regensburg [ Wed Aug 01, 2018 7:38 pm ]
Post subject:  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.

Author:  emendelson [ Wed Aug 01, 2018 10:08 pm ]
Post subject:  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.

Author:  adespoton [ Wed Aug 01, 2018 10:14 pm ]
Post subject:  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.

Author:  adespoton [ Thu Aug 02, 2018 4:12 am ]
Post subject:  Re: Some applications crash on a sparsebundle disk image?

Here's the script I use to prep my images as sparsebundles:

Code:
#!/bin/sh

echo $1
hdiutil convert "$1" -format UDSB -tgtimagekey sparse-band-size=2048 -o "$1-1Mb.sparsebundle"


I use this on a regular 2GB disk image after installing 9.0.4.

Author:  emendelson [ Thu Aug 02, 2018 12:54 pm ]
Post subject:  Re: Some applications crash on a sparsebundle disk image?

adespoton wrote:
Here's the script I use to prep my images as sparsebundles:

Code:
#!/bin/sh

echo $1
hdiutil convert "$1" -format UDSB -tgtimagekey sparse-band-size=2048 -o "$1-1Mb.sparsebundle"


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.

Author:  emendelson [ Thu Aug 16, 2018 6:32 am ]
Post subject:  Re: Some applications crash on a sparsebundle disk image?

And here is an AppleScript wrapper for adespoton's script that includes error handling:

Code:
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


Certainly adespoton can improve on this but it seems to work.

Author:  adespoton [ Thu Aug 16, 2018 4:27 pm ]
Post subject:  Re: Some applications crash on a sparsebundle disk image?

I'll add the git repo to this thread too:

https://github.com/adespoton/sparserbundler

Author:  emendelson [ Fri Aug 17, 2018 7:31 am ]
Post subject:  Re: Some applications crash on a sparsebundle disk image?

adespoton wrote:
I'll add the git repo to this thread too:

https://github.com/adespoton/sparserbundler


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.

Author:  adespoton [ Fri Aug 17, 2018 4:03 pm ]
Post subject:  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).

Author:  emendelson [ Fri Aug 17, 2018 9:53 pm ]
Post subject:  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:
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

Author:  adespoton [ Sat Aug 18, 2018 7:51 pm ]
Post subject:  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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/