VirtualBox

Changeset 24344 in vbox


Ignore:
Timestamp:
Nov 4, 2009 4:34:16 PM (15 years ago)
Author:
vboxsync
Message:

Main: fix a really nasty problem in the Machine destructor which never detached non-harddisk media when the machine object was deleted. The problem exhibited itself that when a machine was inaccessible for some reason (e.g. hard disk inaccessible) and also had non-hard disk media attached, debug code would assert somewhere very deep in media backreferences because first the machine was loaded, then marked inaccessible and destroyed (except for the non-harddisk media which never got detached), and then Machine::GetAccessible would retry loading that machine and couldn't attach anything because the old dead attachment was still in the backreferences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r24342 r24344  
    51765176        {
    51775177            ComObjPtr<Medium> hd = (*it)->medium();
    5178             if (hd.isNull() || (*it)->type() != DeviceType_HardDisk)
     5178            if (hd.isNull())
    51795179                continue;
    51805180            HRESULT rc = hd->detachFrom(mData->mUuid, snapshotId());
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette