VirtualBox

Ticket #8000 (new defect)

Opened 3 years ago

Last modified 3 months ago

memory access violation in statistics window

Reported by: mhanor Owned by:
Priority: minor Component: other
Version: VirtualBox 4.3.4 Keywords:
Cc: Guest type: other
Host type: Windows

Description (last modified by frank) (diff)

Win32 debug build of svn 35386, VS2010, QT 4.7.1, CRT retail libs, full pageheap enabled

After starting a VM, by opening and then closing the VboxDbg Statistics window (Debug menu), it always stops with memory access violation (2nd chance), the VboxDbgBaseWindow object (*this) is not accessible. If the pageheap is disabled, nothing is reported.

VBoxDbg!VBoxDbgBaseWindow::vPolishSizeAndPos(void)+0x1f [f:\vbox\src\vbox\debugger\vboxdbgbase.cpp @ 217]
VBoxDbg!VBoxDbgBaseWindow::event(
			class QEvent * a_pEvt = 0x0012d3ec)+0x39 [f:\vbox\src\vbox\debugger\vboxdbgbase.cpp @ 208]
QtGui4!QApplicationPrivate::notify_helper(
			class QObject * receiver = 0x671086bd, 
			class QEvent * e = 0x08cb4fb0)+0xb9 [f:\qt\4.7.1\src\gui\kernel\qapplication.cpp @ 4446]
QtGui4!QApplication::notify(
			class QObject * receiver = 0x08cb4fb0, 
			class QEvent * e = 0x0012d3ec)+0x12cc [f:\qt\4.7.1\src\gui\kernel\qapplication.cpp @ 4410]
MSVCR100!malloc(
			unsigned int size = 0x390cfc8)+0x4b [f:\dd\vctools\crt_bld\self_x86\crt\src\malloc.c @ 89]
QtCore4!QCoreApplication::notifyInternal(
			class QObject * receiver = 0x0390cfc8, 
			class QEvent * event = 0x0012d3ec)+0x8d [f:\qt\4.7.1\src\corelib\kernel\qcoreapplication.cpp @ 745]
QtCore4!QCoreApplication::sendSpontaneousEvent(
			class QObject * receiver = <Memory access error>, 
			class QEvent * event = <Memory access error>)+0x22 [f:\qt\4.7.1\src\corelib\kernel\qcoreapplication.h @ 218]
QtGui4!QWidgetPrivate::close_helper(
			QWidgetPrivate::CloseMode mode = <Memory access error>)+0xb9 [f:\qt\4.7.1\src\gui\kernel\qwidget.cpp @ 7765]
QtGui4!QtWndProc(
			struct HWND__ * hwnd = <Memory access error>, 
			unsigned int message = <Memory access error>, 
			unsigned int wParam = <Memory access error>, 
			long lParam = <Memory access error>)+0xdbc [f:\qt\4.7.1\src\gui\kernel\qapplication_win.cpp @ 2154]
USER32!InternalCallWinProc+0x28
USER32!UserCallWinProcCheckWow+0x150
USER32!DispatchClientMessage+0xa3
USER32!__fnDWORD+0x24
ntdll!KiUserCallbackDispatcher+0x13
USER32!NtUserMessageCall+0xc
USER32!RealDefWindowProcW+0x47
USER32!DefWindowProcW+0x72
QtGui4!QWinInputContext::DefWindowProcW(
			struct HWND__ * hwnd = <Memory access error>, 
			unsigned int msg = <Memory access error>, 
			unsigned int wParam = <Memory access error>, 
			long lParam = <Memory access error>)+0x40 [f:\qt\4.7.1\src\gui\inputmethod\qwininputcontext_win.cpp @ 365]
QtGui4!QtWndProc(
			struct HWND__ * hwnd = <Memory access error>, 
			unsigned int message = <Memory access error>, 
			unsigned int wParam = <Memory access error>, 
			long lParam = <Memory access error>)+0x219f [f:\qt\4.7.1\src\gui\kernel\qapplication_win.cpp @ 2636]
USER32!InternalCallWinProc+0x28
USER32!UserCallWinProcCheckWow+0x150
USER32!DispatchClientMessage+0xa3
USER32!__fnDWORD+0x24
ntdll!KiUserCallbackDispatcher+0x13
USER32!NtUserMessageCall+0xc
USER32!RealDefWindowProcW+0x47
USER32!DefWindowProcW+0x72
QtGui4!QWinInputContext::DefWindowProcW(
			struct HWND__ * hwnd = <Memory access error>, 
			unsigned int msg = <Memory access error>, 
			unsigned int wParam = <Memory access error>, 
			long lParam = <Memory access error>)+0x40 [f:\qt\4.7.1\src\gui\inputmethod\qwininputcontext_win.cpp @ 365]
QtGui4!QtWndProc(
			struct HWND__ * hwnd = <Memory access error>, 
			unsigned int message = <Memory access error>, 
			unsigned int wParam = <Memory access error>, 
			long lParam = <Memory access error>)+0x219f [f:\qt\4.7.1\src\gui\kernel\qapplication_win.cpp @ 2636]
USER32!InternalCallWinProc+0x28
USER32!UserCallWinProcCheckWow+0x150
USER32!DispatchMessageWorker+0x306
USER32!DispatchMessageW+0xf
QtCore4!QEventDispatcherWin32::processEvents(
			class QFlags<enum QEventLoop::ProcessEventsFlag> flags = class QFlags<enum QEventLoop::ProcessEventsFlag>)+0x5d1 [f:\qt\4.7.1\src\corelib\kernel\qeventdispatcher_win.cpp @ 807]
QtGui4!QGuiEventDispatcherWin32::processEvents(
			class QFlags<enum QEventLoop::ProcessEventsFlag> flags = class QFlags<enum QEventLoop::ProcessEventsFlag>)+0xf [f:\qt\4.7.1\src\gui\kernel\qapplication_win.cpp @ 1170]
QtCore4!QEventLoop::exec(
			class QFlags<enum QEventLoop::ProcessEventsFlag> flags = class QFlags<enum QEventLoop::ProcessEventsFlag>)+0x100 [f:\qt\4.7.1\src\corelib\kernel\qeventloop.cpp @ 201]
*** WARNING: Unable to verify checksum for VirtualBox.exe
QtCore4!QCoreApplication::exec(void)+0x106 [f:\qt\4.7.1\src\corelib\kernel\qcoreapplication.cpp @ 1009]
VirtualBox!TrustedMain(
			int argc = 0n3, 
			char ** argv = 0x02ccafb0, 
			char ** __formal = 0x0217ef68)+0x4c9 [f:\vbox\src\vbox\frontends\virtualbox\src\main.cpp @ 496]
VirtualBox!main(
			int argc = 0n3, 
			char ** argv = 0x02ccafb0, 
			char ** envp = 0x0217ef68)+0x3b0 [f:\vbox\src\vbox\frontends\virtualbox\src\main.cpp @ 647]
VirtualBox!__tmainCRTStartup(void)+0x122 [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 555]
kernel32!BaseProcessStart+0x23

Attachments

crash.txt Download (19.4 KB) - added by mhanor 8 months ago.
svn47735 x64 self-build

Change History

comment:1 Changed 3 years ago by mhanor

Code flow:

VBoxDbgBaseWindow::event   this=119d0fb0 event_type=19 {
    VBoxDbgStats::closeEvent (119d0fb0) {
        VBoxDbgStats::~VBoxDbgStats (119d0fb0) {
            VBoxDbgBaseWindow::event   this=119d0fb0 event_type=71 {
                VBoxDbgBaseWindow::event after QWidget::event
                VBoxDbgBaseWindow::vPolishSizeAndPos (119d0fb0) {
                } // VBoxDbgBaseWindow::vPolishSizeAndPos (if branch)
            } // VBoxDbgBaseWindow::event
            VBoxDbgBase::~VBoxDbgBase (139fcfec) {
            } //VBoxDbgBase::~VBoxDbgBase
            VBoxDbgBase::~VBoxDbgBase (24654fa4) {
            } //VBoxDbgBase::~VBoxDbgBase
            VBoxDbgBaseWindow::event   this=119d0fb0 event_type=71 {
                VBoxDbgBaseWindow::event after QWidget::event
                VBoxDbgBaseWindow::vPolishSizeAndPos (119d0fb0) {
                } // VBoxDbgBaseWindow::vPolishSizeAndPos (if branch)
            } // VBoxDbgBaseWindow::event
        } // VBoxDbgStats::~VBoxDbgStats
        VBoxDbgBaseWindow::~VBoxDbgBaseWindow (119d0fb0)
        VBoxDbgBase::~VBoxDbgBase (119d0fc4) {
        } //VBoxDbgBase::~VBoxDbgBase
    } // VBoxDbgStats::closeEvent
    VBoxDbgBaseWindow::event after QWidget::event
    VBoxDbgBaseWindow::vPolishSizeAndPos (119d0fb0) { // called after the destructor !!!

src\Vbox\Debugger\VBoxDbgBase.cpp, line 208, inside VBoxDbgBaseWindow::event()
With heap page enabled, it doesn't complain anymore about memory access violation, if I write:

    if (a_pEvt->type() != QEvent::Close)
        vPolishSizeAndPos();

comment:2 Changed 3 years ago by mhanor

At the time I submitted this bug, I did't knew the Debug menu can be accessed with the --debug command line option, when using a release build.
Please edit the ticket title. It can be reproduced with the 4.1.0.r73009 official win32 build.
Also, it's the same thing with latest svn38122, win23 self-build.

comment:3 Changed 8 months ago by mhanor

The issue is still there. It also affects release builds, it should be fixed.

Changed 8 months ago by mhanor

svn47735 x64 self-build

comment:4 Changed 5 months ago by mhanor

This is still true for VirtualBox 4.3.2. Please rename the title of the ticket. This bug affects the official Windows build of VirtualBox. Heap corruption occurs when closing the VboxDbg Statistics window. You can catch it by enabling pageheap for VirtualBox.exe, using gflags.

comment:5 Changed 5 months ago by frank

  • Version changed from VirtualBox 4.0.0 to VirtualBox 4.3.4
  • Description modified (diff)

comment:6 Changed 3 months ago by frank

  • Summary changed from win32 debug build memory access violation to memory access violation in statistics window
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use