a problem with Virtual PC, Disk Image Plug-ins, and hdiutil

a problem with Virtual PC, Disk Image Plug-ins, and hdiutil

Post by Shawn V Herna » Sun, 29 Jun 2003 12:59:40



I encountered and partially fixed a problem with hdiutil (and the tools
that rely upon it, like DiskCopy and mounting a CD-R), DiskImages
plug-ins, and Virtual PC.  I couldn't find any references to it on the
Net, so I thought I'd post my experiences to see if anyone else can add
to my understanding. (Or maybe someone else has the same problem and
hasn't figured it out yet).

The symptoms were these: whenever I would insert a blank CD-R or
attempt to mount a .DMG file (by double-clicking it), it would fail. In
the case of mounting a CD-R, the crash log read, in part:

Command:    hdiutil
PID:        580

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x0016f7e0

Thread 0 Crashed:
#0   0x0016f7e0 in 0x16f7e0
#1   0x0016f654 in 0x16f654
#2   0x95ac78fc in DIUnloadCFPlugIns
#3   0x95ac990c in CCFPlugInDiskImage::copyPropertiesDict()
#4   0x95ac1da4 in DIInitialize

(I also got a type 11 error, which is often associated with a hardware
failure)

In the case of trying to mount a .DMG file, I got, in part:

Command:    Disk Copy
PID:        739

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x0026a7e0

Thread 0 Crashed:
#0   0x0026a7e0 in 0x26a7e0
#1   0x0026a654 in 0x26a654
#2   0x95ac78fc in DIUnloadCFPlugIns
#3   0x95ac990c in CCFPlugInDiskImage::copyPropertiesDict()
#4   0x95ac1da4 in DIInitialize

I knew it wasn't a hardware error, because I could do these operations
in a different account on the same machine. It must have been something
about my account config.

I started playing around with hdiutil -debug. In the accounts where it
worked, hdiutil -debug produced tons of output. In the account where it
failed, it didn't produce a single line of output, just "segmentation
fault" and the crash log.

To make a long story short, I started trying to trace the work of
hdiutil. By watching the debug output in the account where things
worked, I knew that hdiutil was looking in
/Library/Plug-ins/DiskImages/VirtualPCDiskImagePlugin.bundle/ for the
Virtual PC disk image plug-in. Then the man page said it also looked in
~/Library/Plug-ins. When I looked THERE, I found another, apparently
identical, copy of the Virtual PC Disk Image plugin (that is, identical
to the version in /Library). When I moved THAT folder (the one in
~/Library) out of the way, things started working again.

But then I started up VirtualPC to see if it still worked, and it did.
But THEN, mounting images started to fail again. Virtual PC had created
a whole new version of the DiskImage plugin in ~/Library. Again, moving
it out of the way helped.

So, some questions.

Does anyone know why having multiple identical (?) version of a
diskimage plugin in two different locations would cause such a hard
failure? hdiutil seemed totally unprepared for it, as did Disk Copy.
Judging by the Crash Logs, the offending code is in
DIInitialize->CCFPlugInDiskImage::copyPropertiesDict()->
DIUnloadCFPlugIns, which they both appear to use.

Does anyone know why Virtual PC recreated the diskimage plugin?

Does anyone know how to prevent this problem in a more sustainable way?

MacOS X is in nearly all ways better than Mac OS 9, but they've
generally taken a step backwars it seems when it comes to applications
checking return values and things like that.

I don't read this forum closely, so I'd appreciate an email response if
you are so inclined.

Thanks much for any assistance.

Shawn

 
 
 

1. Interested in writing plug-ins for AppleWin?

What about Mockingboard support?

I think the printer emulation shouldn't be too hard to do. All you have
to do is catch the codes the apple sends to its parallel port (PR#1) and
translate them into Windows GDI-calls (on a pixel-by-pixel basis). The
only printer I know of being supported in about all apple-programs is an
Epson.

Some more features:
* Change each color individually (the apple only supports few colors so
you could adjust them)
* Make the window resizable and give us full-screen-support (easy with
direct-X, I just lack the SDK)
* Add support for 3,5" floppies (there WAS something like that on the
apple)
* Add hot-keys, especially for disk-changing (What about CTRL+F1=Disk1,
and so on to disk 12?) This would be useful, especially for the bigger
games
* Give the user a way to turn the toolbar off.
* Implement a screen smoothing technic (The PC employs HiRes-Graphics
1024x768, as opposed to the apples 280x? screen)
* What about a way to start individual files from a disk (A way to open
apple-disks in Windows explorer would be nice too!)
* Enhance the on-line-help (List of AppleDos R3.3-Commands)
* Let users adjust the disk-speed like the CPU-speed (using a slider)
* Implement an easy screen-capturing-tool
* Implement those data-exchange buttons

Michael

2. fast postscript printer(22 ppm) on appletalk- anyproblems?

3. Is there ANY way to kill non-functioning Sherlock 2.0 built-in plug-ins?

4. TECO -- Request for beta testers

5. Animas / Genius scanner, need new plug-ins

6. ATM

7. Which Pshop Plug-ins (if any) require an FPU?

8. 8.10.0b6, SMTP AUTH, etc.

9. Help needed to transfer Apple 2 disks to virtual disk images on PC

10. Transfer disk on a image disk on a PC.

11. Virtual PC problem

12. Virtual PC / Tomb Raider Chronicles problem

13. Virtual PC vs. SoftWindows - PC Emulators for the MAC