<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>seems that in this function: mMediaData.backedUpData() might be NULL</DIV>
<DIV> </DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>void</FONT></FONT><FONT size=2> SessionMachine::restoreSnapshotHandler(RestoreSnapshotTask &aTask)</DIV>
<DIV>{</DIV>
<DIV> </DIV><FONT color=#008000 size=2><FONT color=#008000 size=2>
<DIV>// Normally we "detach" the medium by removing the attachment object</DIV></FONT></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// from the current machine data; saveSettings() below would then</DIV></FONT></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// compare the current machine data with the one in the backup</DIV></FONT></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// and actually call Medium::detachFrom(). But that works only half</DIV></FONT></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// the time in our case so instead we force a detachment here:</DIV></FONT></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// remove from machine data</DIV></FONT></FONT><FONT size=2>
<DIV>mMediaData->mAttachments.remove(pAttach);</DIV>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// remove it from the backup or else saveSettings will try to detach</DIV></FONT></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// it again and assert</DIV></FONT></FONT><FONT size=2>
<DIV>mMediaData.backedUpData()->mAttachments.remove(pAttach);</DIV>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// then clean up backrefs</DIV></FONT></FONT><FONT size=2>
<DIV>pMedium->detachFrom(mData->mUuid);</DIV></FONT>
<DIV> </DIV>
<DIV>}</DIV></FONT>
<DIV> </DIV>
<DIV>  VBoxSVC.exe!std::list<ComObjPtr<MediumAttachment>,std::allocator<ComObjPtr<MediumAttachment> > >::end()  Line 538 + 0x7 bytes C++<BR>  VBoxSVC.exe!std::list<ComObjPtr<MediumAttachment>,std::allocator<ComObjPtr<MediumAttachment> > >::remove(const ComObjPtr<MediumAttachment> & _Val_arg={...})  Line 907 C++<BR>> VBoxSVC.exe!SessionMachine::restoreSnapshotHandler(SessionMachine::RestoreSnapshotTask & aTask={...})  Line 1916 C++<BR>  VBoxSVC.exe!SessionMachine::RestoreSnapshotTask::handler()  Line 1178 C++<BR>  VBoxSVC.exe!SessionMachine::taskHandler(RTTHREADINT * __formal=0x0357d9d8, void * pvUser=0x039c76a0)  Line 1215 + 0xe bytes C++<BR>  VBoxRT.dll!rtThreadMain(RTTHREADINT * pThread=0x0357d9d8, unsigned int NativeThread=7124, const char * pszThreadName=0x0357df54)  Line 679 +
 0xa bytes C++<BR>  VBoxRT.dll!rtThreadNativeMain(void * pvArgs=0x0357d9d8)  Line 102 + 0xe bytes C++<BR>  msvcr80.dll!_callthreadstartex()  Line 348 + 0x6 bytes C<BR>  msvcr80.dll!_threadstartex(void * ptd=0x034a0b28)  Line 326 + 0x5 bytes C<BR>  <A href="mailto:kernel32.dll!@BaseThreadInitThunk@12">kernel32.dll!@BaseThreadInitThunk@12</A>()  + 0x12 bytes <BR>  <A href="mailto:ntdll.dll!___RtlUserThreadStart@8">ntdll.dll!___RtlUserThreadStart@8</A>()  + 0x27 bytes <BR>  <A href="mailto:ntdll.dll!__RtlUserThreadStart@8">ntdll.dll!__RtlUserThreadStart@8</A>()  + 0x1b bytes <BR></DIV></td></tr></table>