VirtualBox

Opened 15 years ago

Closed 13 years ago

#5157 closed defect (fixed)

RTUuidFromUtf16 implementation is too draconian, and the error reporting is poor

Reported by: Kohsuke Kawaguchi Owned by:
Component: other Version: VirtualBox 3.0.8
Keywords: Cc:
Guest type: other Host type: other

Description

The implementation doesn't accept typical variants like "{936244ab-ddf7-4ea4-a439-d0c0ccb9ee46}" (with brackets) or "936244abddf74ea4a439d0c0ccb9ee46" (without hyphen), even though VirtualBox uses some of these formats by itself, as can be seen in the following error message:

: 0x80070057 (Cannot register the hard disk '/tmp/slave1/distfork4413096236958589915.tmp/applianceBuilder/key.vmdk' with UUID {936244ab-ddf7-4ea4-a439-d0c0ccb9ee46} because a hard disk '/home/kohsuke/ws/aklite/builder/applianceBuilder/key.vmdk' with UUID {936244ab-ddf7-4ea4-a439-d0c0ccb9ee46} already exists in the media registry ('/home/kohsuke/.VirtualBox/VirtualBox.xml'))

Furthermore, failing to parse an UUID often doesn't result in an error right away, and instead VirtualBox moves on as if the zero UUID is passed --- one such example can be seen in Guid::Guid(const Btr&)

Since often user-specified UUID values are fed directly into here, I suggest RTUuidFromUtf16 to be modified slightly to skip '{', '}' and '-' to accomodate variations in the format.

I was using Python API for VirtualBox, and Python's UUID support uses {-bracketd notation, so this change improves the user experience at multiple levels.

Change History (1)

comment:1 by Frank Mehnert, 13 years ago

Resolution: fixed
Status: newclosed

AFAIR this was fixed some time ago.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use