ISO image creation fails

Hello,

I’m trying to use DropDMG to automatically create ISO images for data CD/DVDs

I’m using an applescript (folder action) that watches for new mounted CDs to create the ISO image
using DropDMG. When done, the CD is ejected.

This works fine for about 75% of my discs.

For some discs, however, DropDMG asks for my password because it want “to make some changes”.
It afterward fails and creates a zero-sized image.

I know that DropDMG returns an error code, because my applescript stops and the disc is not ejected.
I have yet to check what the error code is, I would need to try this in another script.

Trying other discs will work, until I hit another one with this behavior, or if I try one of the discs
that I know trigger this.

Help please ?

I have not seen this problem before. Please check DropDMG’s log to get some more information about the error so that we can look into what might be causing it.

Checked this morning, the log window doesn’t say much (see attached png).
Also, the ‘create from file’ line in the applescript returns a path to the empty iso image.

Screen Shot 2015-11-25 at 9.25.14 AM.png

Do you still get a zero-sized file if you use a .dmg format?

It looks like the system is not reporting an error, so it’s normal for DropDMG to return a path to the completed image.

Ok, when asking for a .dmg format, DropDMG stills asks for my password but the image is not empty.

Why does it need my password only for some disks ? Could it save it ?
Also why the empty iso ?

Good. Now, if you really need a .iso instead of a .dmg you could try converting the .dmg file.

It might need a password to read the source disk or to write the file to the chosen destination. Yes, there is a preference that lets you save the password.

I don’t know because the .iso conversion is handled by the OS, and it did not report an error.

Allright, we have somewhat progressed. With the run as root option, the ISO file creation works. So most likely the conversion tasks times out while waiting for my password. However, there is most likely an error/exception thrown because my applescript stops after the “create” command to DropDMG and any subsequent task, such as ejecting the CD tray, is not executed.

So the bug is now that, for some CD/DVDs (those who previously required the password) the “create” command interrupts the applescript.
This is still cumbersome, as i bought DropDMG to automate iso image creation for hundreds of discs.

The bug is quite reproducible, you could quite easily find a CD/DVD that triggers the behavior and you could then step your code to see what’s going on.
I can send you my applescript if you wish, but the problem even shows when trying a manual iso image creation (when the run as root option is off).

I thought you said that DropDMG was not reporting an error. Is AppleScript?

I think you may be running into the fact that AppleScript has a built-in 2-minute timeout for any command. If you expect it to take longer than that to create your disk image, you can override the timeout as shown in the Create Disk Image sample script.

No one is reporting an error, the applescript just stops,
for the timeout, no I have “with timeout of 9600 seconds” in my script

Are you still having problems with that timeout? If so, how are you running the script, and what does it say when it stops?

I’m using this timeout value since the very beginning so yes, I still have problems.

I’m running the script as a folder action, so debugging is harder.
Even when I run in a different script with a manual ‘choose folder’ the script stops and I have no other feedback

Can you try running just the one DropDMG command in Script Editor and look at its event log?

Tried my script with a choose folder instead, with a problematic CD. From the event log, the ISO file creation works (as long as the run as root option is selected) and the script keeps going , the disc eject command is executed and returns no error, but the CD is not ejected.

I figured that, for some reason, when the password is needed, the CD is considered ‘in use’ by the script application and thus disk eject fails if called within the script. As soon as the script quits, the CD can be ejected. This ownership of the CD doesn’t happen when the password is not required.

Strange bug, but no solution yet !

Thanks for your help.

Which eject command are you using?

drutil eject

or

drutil tray eject

Maybe try “diskutil unmountDisk force <device>” or “diskutil eject <device>”.