Qt アプリケーションで使用しようとしdeque
ましたが、奇妙なことに、動作していないようです。
QThread
完全に動作する Qt クラス (から派生) がありますが、stl::deque<int>
メンバーを宣言すると、正常にビルドされますが、起動時にクラッシュします。私はその変数をどこでも使用していません。
特に基本的なQtクラスを継承するクラスでは、Qt内でSTL構造を使用しないでください?
編集:
Thread 3 (Thread 172.0x3bc):
#0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c91d21a in ntdll!ZwDelayExecution () from C:\WINDOWS\system32\ntdll.dll
#2 0x7c8023f1 in SleepEx () from C:\WINDOWS\system32\kernel32.dll
#3 0x00000000 in ?? ()
Thread 2 (Thread 172.0xb78):
#0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c91daaa in ntdll!ZwReplyWaitReceivePortEx () from C:\WINDOWS\system32\ntdll.dll
#2 0x77e565e3 in UuidCreate () from C:\WINDOWS\system32\rpcrt4.dll
#3 0x77e56caf in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#4 0x77e56ad1 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#5 0x77e56c97 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#6 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll
#7 0x00000000 in ?? ()
Thread 1 (Thread 172.0x8d4):
#0 0x7c921689 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c928ccd in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll
#2 0xbaadf00d in ?? ()
#3 0x0a0bc000 in ?? ()
#4 0x7c939ba8 in towlower () from C:\WINDOWS\system32\ntdll.dll
#5 0x7c97fb98 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\system32\ntdll.dll
#6 0x7c95b244 in ntdll!LdrFindEntryForAddress () from C:\WINDOWS\system32\ntdll.dll
#7 0x003e0000 in ?? ()
#8 0x7c929c0c in ntdll!RtlpUnWaitCriticalSection () from C:\WINDOWS\system32\ntdll.dll
#9 0x77bfc3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll
#10 0x003e0000 in ?? ()
#11 0x77bfc3e7 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll
#12 0x00001d40 in ?? ()
#13 0x00224b68 in ?? ()
#14 0x77bfc42e in msvcrt!malloc () from C:\WINDOWS\system32\msvcrt.dll
#15 0x00cef12a in QClipData::initialize (this=0xa093a30) at painting\qpaintengine_raster.cpp:4487
#16 0x00cfa797 in qt_alphamapblit_quint32 (rasterBuffer=0xa099488, x=17, y=207, color=4278190080, map=0xa0ad401 "", mapWidth=9, mapHeight=12, mapStride=256, clip=0xa093a30) at painting\qdrawhelper.cpp:7209
#17 0x00ceb02e in QRasterPaintEngine::alphaPenBlt (this=0x9ff7860, src=0xa0ad401, bpl=256, depth=8, rx=17, ry=207, w=9, h=12) at painting\qpaintengine_raster.cpp:2954
...
別の実行のスタック トレース:
Thread 3 (Thread 1176.0xb4c):
#0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c91d21a in ntdll!ZwDelayExecution () from C:\WINDOWS\system32\ntdll.dll
#2 0x7c8023f1 in SleepEx () from C:\WINDOWS\system32\kernel32.dll
#3 0x00000000 in ?? ()
Thread 2 (Thread 1176.0x71c):
#0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c91daaa in ntdll!ZwReplyWaitReceivePortEx () from C:\WINDOWS\system32\ntdll.dll
#2 0x77e565e3 in UuidCreate () from C:\WINDOWS\system32\rpcrt4.dll
#3 0x77e56caf in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#4 0x77e56ad1 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#5 0x77e56c97 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#6 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll
#7 0x00000000 in ?? ()
Thread 1 (Thread 1176.0x818):
#0 0x7c921689 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c928ccd in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll
#2 0x00000000 in ?? ()
編集2:
を使用すると、コンソールに「ヒープの破損が検出されました」と表示されましたstl::deque
。QQueue の使用に切り替えましたが、完全に機能しているようです。