Ticket #5157 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

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

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


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

comment:1 Changed 10 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

AFAIR this was fixed some time ago.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use