Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
4.6.0
-
None
-
None
-
S60 emulator.
Description
With the following test application std::bad_alloc exception is thrown while appending QVariant item to a QList. Exception is first caught successfully in QList<T>::append from where it's rethrown. For some reason rethrown exception is not caught in main() but program panics with KERN-EXEC 3. Same code works as expected e.g. with some custom type.
#include <QList> #include <QVariant> static bool gOomSimulationEnabled = false; void* operator new(std::size_t sz) __THROW(std::bad_alloc) { if (gOomSimulationEnabled) { qBadAlloc(); } return qMalloc(sz); } void operator delete(void* memoryAddr) throw() { if (memoryAddr) { qFree(memoryAddr); } } int main(int argc, char *argv[]) { try { gOomSimulationEnabled = true; QList<QVariant> list; list << QVariant(1); } catch (...) { int breakPoint = 1; } }
Attachments
Issue Links
- depends on
-
QTBUG-4852 Nested exceptions in Qt not working on Symbian hardware builds
-
- Closed
-