﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
10	Trap issuing stdlib's exit() when QApplication instance is created on the stack in main()	dmik	dmik	"If we have a QApplication instance created on the stack in main() (a very common practice for 99% of Qt apps), then an attempt to call the exit() function from stdlib will produce an application trap with a popuplog entry (SYS3170/c0010001, most likely in DOSCALL1.DLL).

A simple example to reproduce:

{{{
#include <qapplication.h>
#include <stdlib.h>
int main (int argc, char **argv)
{
    QApplication a (argc, argv);
    exit (-1);
}
}}}

From what I've already found, this happens when a global QFontCache (internal QObject subclass) instance is being destroyed (by a static func from the exit list). It is created as a child of QApplication, so its QObject desctructor calls {{{parentObject->removeChild (this);}}} but for some reason the vtable of the QApplocation instance is already corrupted by that time (but no QApplocation destructor has been called yet!)."	defect	closed	normal	qt-os2-3.3.1-rc07	kernel	3.3.1-rc06	normal	fixed	trap exit()	
