[Qt-interest] crash in qapplication_win.cpp
Matthias Pospiech
matthias.pospiech at gmx.de
Wed Jun 30 10:51:36 CEST 2010
This is the trace:
0 ntdll!RtlAppendStringToString C:\WINDOWS\system32\ntdll.dll
0 0x7c9202f6
1 qt_set_windows_font_resources qapplication_win.cpp 591
0x006d0061
2 KERNEL32!GetEnvironmentVariableA
C:\WINDOWS\system32\kernel32.dll 0 0x7c814ec1
3 CSumixCam::Shutdown SMX150.h 452 0x6caddead
4 ~CSumixCam SMX150.h 339 0x6caddf22
5 ~QCameraSMXPrivate QCameraSMX150.cpp 28 0x6cad4c91
6 ~QCameraSMX QCameraSMX150.cpp 86 0x6cac1d04
7 ~GlobalDevices globaldevices.cpp 13 0x004022e7
8 ~MainWindow mainwindow.cpp 17 0x0040172d
9 main main.cpp 9 0x00401419
I have a device (camera) which is defined as a global pointer
-- globaldevices.cpp -->
#include "globaldevices.h"
#include "QCameraSMX.h"
QCameraSMX* cameraSMX;
GlobalDevices::GlobalDevices()
{
cameraSMX = 0;
}
GlobalDevices::~GlobalDevices()
{
delete cameraSMX; cameraSMX = 0;
}
<-------------
GlobalDevices has an instance in MainWindow to ensure that all devices get
deleted during shutdown. So as expected the destructor is called during
destruction of MainWindow.
This however leads to this crash in qapplication_win.cpp at last line of:
static void qt_set_windows_font_resources()
{
#ifndef Q_WS_WINCE
NONCLIENTMETRICS ncm;
ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) +
sizeof(LOGFONT);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize , &ncm, 0);
What does that mean? What should I do different?
Matthias
More information about the Qt-interest-old
mailing list