[Interest] Windows segfault, but not on Linux
William Hallatt
goblincoding at gmail.com
Thu Nov 21 07:13:57 CET 2013
Good day everybody,
I have a bit of an odd scenario. At home I have Qt 5.2.x built from
source, running on an Ubuntu 12.04 distribution. I also use QtCreator 3.x
and Clang 3.3 (both built from source) for my Qt development. Long story
short, I have a little data-gathering simulation application that I can run
for hours and hours on the Ubuntu box without any issues (I regularly run
it overnight), but when compiling the exact same source using the Qt 5.1.1
for Windows 32-bit (MinGW 4.8, OpenGL, 666
MB)<http://download.qt-project.org/official_releases/qt/5.1/5.1.1/qt-windows-opensource-5.1.1-mingw48_opengl-x86-offline.exe>package
on Windows 7 (64-bit), I get segfaults within minutes.
I have attached here two disassembler text files, the one is where the
break occurs and the other is for the only Qt related stack that I can find
in the ~30 threads that is running at that point. I have marked the breaks
with huge ( BREAKS HERE!!! ) markers in the text files (to the right of the
actual line) and the attached image is also of the complete stack for the
Qt-related function calls. I seriously doubt the disassemled output would
mean anything to anybody, but I include it here just in case.
None of the stacks trace back directly to any of my code so I am at a bit
of a loss, however, my actual problem is why everything works on Linux, but
falls over on Windows...and please don't say it is because it's Windows, I
know that already :P
If anyone has any ideas, I'm all ears.
Thanks a lot!
William.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131121/71672fc1/attachment.html>
-------------- next part --------------
Function: ole32!CoAddRefServerProcess
0x7738c98a <+0x02e3> or %cl,0x37890446(%ecx)
0x7738c990 <+0x02e9> call 0x773a26a6 <ole32!ObjectStublessClient15+2849>
0x7738c995 <+0x02ee> xor %eax,%eax
0x7738c997 <+0x02f0> pop %esi
0x7738c998 <+0x02f1> pop %edi
0x7738c999 <+0x02f2> pop %ebx
0x7738c99a <+0x02f3> pop %ebp
0x7738c99b <+0x02f4> ret $0x4
0x7738c99e <+0x02f7> mov (%eax),%ecx ( BREAKS HERE!!! )
0x7738c9a0 <+0x02f9> push %eax
0x7738c9a1 <+0x02fa> call *0x8(%ecx)
0x7738c9a4 <+0x02fd> jmp 0x773ba6d9 <ole32!CoRevokeClassObject+16608>
0x7738c9a9 <+0x0302> test $0x2000000,%eax
0x7738c9ae <+0x0307> jne 0x77395dc1 <ole32!StgOpenStorage+5555>
0x7738c9b4 <+0x030d> jmp 0x773ba715 <ole32!CoRevokeClassObject+16668>
0x7738c9b9 <+0x0312> mov 0xb4(%eax),%ecx
0x7738c9bf <+0x0318> jmp 0x7739067e <ole32!CoUnmarshalInterface+1506>
0x7738c9c4 <+0x031d> push %ecx
0x7738c9c5 <+0x031e> mov 0xb4(%eax),%ecx
0x7738c9cb <+0x0324> call 0x7738c9da <ole32!CoAddRefServerProcess+819>
0x7738c9d0 <+0x0329> jmp 0x773bae19 <ole32!CoRevokeClassObject+18464>
0x7738c9d5 <+0x032e> nop
0x7738c9d6 <+0x032f> nop
0x7738c9d7 <+0x0330> nop
0x7738c9d8 <+0x0331> nop
0x7738c9d9 <+0x0332> nop
0x7738c9da <+0x0333> mov %edi,%edi
0x7738c9dc <+0x0335> push %ebp
0x7738c9dd <+0x0336> mov %esp,%ebp
0x7738c9df <+0x0338> mov (%ecx),%ecx
0x7738c9e1 <+0x033a> pop %ebp
0x7738c9e2 <+0x033b> jmp 0x7738c9e9 <ole32!CoAddRefServerProcess+834>
0x7738c9e4 <+0x033d> nop
0x7738c9e5 <+0x033e> nop
0x7738c9e6 <+0x033f> nop
0x7738c9e7 <+0x0340> nop
0x7738c9e8 <+0x0341> nop
0x7738c9e9 <+0x0342> mov %edi,%edi
0x7738c9eb <+0x0344> push %ebp
0x7738c9ec <+0x0345> mov %esp,%ebp
0x7738c9ee <+0x0347> push %ecx
0x7738c9ef <+0x0348> push %esi
0x7738c9f0 <+0x0349> mov %ecx,%esi
0x7738c9f2 <+0x034b> push %edi
0x7738c9f3 <+0x034c> lea 0x4(%esi),%eax
0x7738c9f6 <+0x034f> push %eax
0x7738c9f7 <+0x0350> lea -0x4(%ebp),%ecx
0x7738c9fa <+0x0353> call 0x77392ca9 <ole32!CreateOleAdviseHolder+207>
0x7738c9ff <+0x0358> mov (%esi),%ecx
0x7738ca01 <+0x035a> mov %ecx,%eax
-------------- next part --------------
0x23a8e70 <+0x0000> push %ebp
0x23a8e71 <+0x0001> mov %esp,%ebp
0x23a8e73 <+0x0003> push %ebx
0x23a8e74 <+0x0004> sub $0x28,%esp
4050 in painting\qpaintengine_raster.cpp
0x23a8e77 <+0x0007> mov 0x10(%ebp),%eax
0x23a8e7a <+0x000a> mov %eax,%ecx
0x23a8e7c <+0x000c> call 0x255e484 <QRect::left() const>
0x23a8e81 <+0x0011> mov %ax,-0xe(%ebp)
4051 in painting\qpaintengine_raster.cpp
0x23a8e85 <+0x0015> mov 0x10(%ebp),%eax
0x23a8e88 <+0x0018> mov %eax,%ecx
0x23a8e8a <+0x001a> call 0x255e470 <QRect::top() const>
0x23a8e8f <+0x001f> mov %ax,-0x10(%ebp)
4052 in painting\qpaintengine_raster.cpp
0x23a8e93 <+0x0023> mov 0x10(%ebp),%eax
0x23a8e96 <+0x0026> mov %eax,%ecx
0x23a8e98 <+0x0028> call 0x255e4d4 <QRect::right() const>
0x23a8e9d <+0x002d> mov %ax,-0x12(%ebp)
4053 in painting\qpaintengine_raster.cpp
0x23a8ea1 <+0x0031> mov 0x10(%ebp),%eax
0x23a8ea4 <+0x0034> mov %eax,%ecx
0x23a8ea6 <+0x0036> call 0x255e508 <QRect::bottom() const>
0x23a8eab <+0x003b> mov %ax,-0x14(%ebp)
4054 in painting\qpaintengine_raster.cpp
4055 in painting\qpaintengine_raster.cpp
0x23a8eaf <+0x003f> movl $0x0,-0x8(%ebp)
4056 in painting\qpaintengine_raster.cpp
0x23a8eb6 <+0x0046> movl $0x0,-0xc(%ebp)
0x23a8ebd <+0x004d> jmp 0x23a90db <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+619>
0x23a90d7 <+0x0267> addl $0x1,-0xc(%ebp)
0x23a90db <+0x026b> mov -0xc(%ebp),%eax
0x23a90de <+0x026e> cmp 0xc(%ebp),%eax
0x23a90e1 <+0x0271> jl 0x23a8ec2 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+82>
4057 in painting\qpaintengine_raster.cpp
0x23a8ec2 <+0x0052> mov -0xc(%ebp),%eax
0x23a8ec5 <+0x0055> lea 0x0(,%eax,8),%edx
0x23a8ecc <+0x005c> mov 0x8(%ebp),%eax
0x23a8ecf <+0x005f> add %edx,%eax
0x23a8ed1 <+0x0061> movzwl 0x4(%eax),%eax
0x23a8ed5 <+0x0065> cmp -0x14(%ebp),%ax
0x23a8ed9 <+0x0069> jle 0x23a8ee0 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+112>
4058 in painting\qpaintengine_raster.cpp
0x23a8edb <+0x006b> jmp 0x23a90e7 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+631>
4059 in painting\qpaintengine_raster.cpp
0x23a8ee0 <+0x0070> mov -0xc(%ebp),%eax
0x23a8ee3 <+0x0073> lea 0x0(,%eax,8),%edx
0x23a8eea <+0x007a> mov 0x8(%ebp),%eax
0x23a8eed <+0x007d> add %edx,%eax
0x23a8eef <+0x007f> movzwl 0x4(%eax),%eax
0x23a8ef3 <+0x0083> cmp -0x10(%ebp),%ax
0x23a8ef7 <+0x0087> jl 0x23a8f46 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+214>
4060 in painting\qpaintengine_raster.cpp
0x23a8ef9 <+0x0089> mov -0xc(%ebp),%eax
0x23a8efc <+0x008c> lea 0x0(,%eax,8),%edx
0x23a8f03 <+0x0093> mov 0x8(%ebp),%eax
0x23a8f06 <+0x0096> add %edx,%eax
0x23a8f08 <+0x0098> movzwl (%eax),%eax
0x23a8f0b <+0x009b> cmp -0x12(%ebp),%ax
0x23a8f0f <+0x009f> jg 0x23a8f46 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+214>
4061 in painting\qpaintengine_raster.cpp
0x23a8f11 <+0x00a1> mov -0xc(%ebp),%eax
0x23a8f14 <+0x00a4> lea 0x0(,%eax,8),%edx
0x23a8f1b <+0x00ab> mov 0x8(%ebp),%eax
0x23a8f1e <+0x00ae> add %edx,%eax
0x23a8f20 <+0x00b0> movzwl (%eax),%eax
0x23a8f23 <+0x00b3> movswl %ax,%edx
0x23a8f26 <+0x00b6> mov -0xc(%ebp),%eax
0x23a8f29 <+0x00b9> lea 0x0(,%eax,8),%ecx
0x23a8f30 <+0x00c0> mov 0x8(%ebp),%eax
0x23a8f33 <+0x00c3> add %ecx,%eax
0x23a8f35 <+0x00c5> movzwl 0x2(%eax),%eax
0x23a8f39 <+0x00c9> movzwl %ax,%eax
0x23a8f3c <+0x00cc> add %eax,%edx
0x23a8f3e <+0x00ce> movswl -0xe(%ebp),%eax
0x23a8f42 <+0x00d2> cmp %eax,%edx
0x23a8f44 <+0x00d4> jg 0x23a8f4b <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+219>
4062 in painting\qpaintengine_raster.cpp
0x23a8f46 <+0x00d6> jmp 0x23a90d7 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+615>
4063 in painting\qpaintengine_raster.cpp
4064 in painting\qpaintengine_raster.cpp
0x23a8f4b <+0x00db> mov -0xc(%ebp),%eax
0x23a8f4e <+0x00de> lea 0x0(,%eax,8),%edx
0x23a8f55 <+0x00e5> mov 0x8(%ebp),%eax
0x23a8f58 <+0x00e8> add %edx,%eax
0x23a8f5a <+0x00ea> movzwl (%eax),%eax
0x23a8f5d <+0x00ed> cmp -0xe(%ebp),%ax
0x23a8f61 <+0x00f1> jge 0x23a8ff1 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+385>
4065 in painting\qpaintengine_raster.cpp
0x23a8f67 <+0x00f7> mov -0x8(%ebp),%eax
0x23a8f6a <+0x00fa> lea 0x0(,%eax,8),%edx
0x23a8f71 <+0x0101> mov 0x8(%ebp),%eax
0x23a8f74 <+0x0104> lea (%edx,%eax,1),%ebx
0x23a8f77 <+0x0107> movswl -0x12(%ebp),%edx
0x23a8f7b <+0x010b> movswl -0xe(%ebp),%eax
0x23a8f7f <+0x010f> sub %eax,%edx
0x23a8f81 <+0x0111> mov %edx,%eax
0x23a8f83 <+0x0113> add $0x1,%eax
0x23a8f86 <+0x0116> mov %eax,-0x20(%ebp)
0x23a8f89 <+0x0119> mov -0xc(%ebp),%eax
0x23a8f8c <+0x011c> lea 0x0(,%eax,8),%edx
0x23a8f93 <+0x0123> mov 0x8(%ebp),%eax
0x23a8f96 <+0x0126> add %edx,%eax
0x23a8f98 <+0x0128> movzwl 0x2(%eax),%eax
0x23a8f9c <+0x012c> movzwl %ax,%eax
0x23a8f9f <+0x012f> mov -0xc(%ebp),%edx
0x23a8fa2 <+0x0132> lea 0x0(,%edx,8),%ecx
0x23a8fa9 <+0x0139> mov 0x8(%ebp),%edx
0x23a8fac <+0x013c> add %ecx,%edx
0x23a8fae <+0x013e> movzwl (%edx),%edx
0x23a8fb1 <+0x0141> movswl %dx,%ecx
0x23a8fb4 <+0x0144> movswl -0xe(%ebp),%edx
0x23a8fb8 <+0x0148> sub %edx,%ecx
0x23a8fba <+0x014a> mov %ecx,%edx
0x23a8fbc <+0x014c> add %edx,%eax
0x23a8fbe <+0x014e> mov %eax,-0x1c(%ebp)
0x23a8fc1 <+0x0151> lea -0x20(%ebp),%eax
0x23a8fc4 <+0x0154> mov %eax,0x4(%esp)
0x23a8fc8 <+0x0158> lea -0x1c(%ebp),%eax
0x23a8fcb <+0x015b> mov %eax,(%esp)
0x23a8fce <+0x015e> call 0x249ead8 <qMin<int>(int const&, int const&)>
0x23a8fd3 <+0x0163> mov (%eax),%eax
0x23a8fd5 <+0x0165> mov %ax,0x2(%ebx)
4066 in painting\qpaintengine_raster.cpp
0x23a8fd9 <+0x0169> mov -0x8(%ebp),%eax
0x23a8fdc <+0x016c> lea 0x0(,%eax,8),%edx
0x23a8fe3 <+0x0173> mov 0x8(%ebp),%eax
0x23a8fe6 <+0x0176> add %eax,%edx
0x23a8fe8 <+0x0178> movzwl -0xe(%ebp),%eax
0x23a8fec <+0x017c> mov %ax,(%edx)
0x23a8fef <+0x017f> jmp 0x23a906e <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+510>
4067 in painting\qpaintengine_raster.cpp
4068 in painting\qpaintengine_raster.cpp
0x23a8ff1 <+0x0181> mov -0x8(%ebp),%eax
0x23a8ff4 <+0x0184> lea 0x0(,%eax,8),%edx
0x23a8ffb <+0x018b> mov 0x8(%ebp),%eax
0x23a8ffe <+0x018e> add %eax,%edx
0x23a9000 <+0x0190> mov -0xc(%ebp),%eax
0x23a9003 <+0x0193> lea 0x0(,%eax,8),%ecx
0x23a900a <+0x019a> mov 0x8(%ebp),%eax
0x23a900d <+0x019d> add %ecx,%eax
0x23a900f <+0x019f> movzwl (%eax),%eax
0x23a9012 <+0x01a2> mov %ax,(%edx)
4069 in painting\qpaintengine_raster.cpp
0x23a9015 <+0x01a5> mov -0x8(%ebp),%eax ( BREAKS HERE!!! )
0x23a9018 <+0x01a8> lea 0x0(,%eax,8),%edx
0x23a901f <+0x01af> mov 0x8(%ebp),%eax
0x23a9022 <+0x01b2> lea (%edx,%eax,1),%ebx
0x23a9025 <+0x01b5> movzwl -0x12(%ebp),%edx
0x23a9029 <+0x01b9> mov -0x8(%ebp),%eax
0x23a902c <+0x01bc> lea 0x0(,%eax,8),%ecx
0x23a9033 <+0x01c3> mov 0x8(%ebp),%eax
0x23a9036 <+0x01c6> add %ecx,%eax
0x23a9038 <+0x01c8> movzwl (%eax),%eax
0x23a903b <+0x01cb> sub %eax,%edx
0x23a903d <+0x01cd> mov %edx,%eax
0x23a903f <+0x01cf> add $0x1,%eax
0x23a9042 <+0x01d2> mov %ax,-0x16(%ebp)
0x23a9046 <+0x01d6> mov -0xc(%ebp),%eax
0x23a9049 <+0x01d9> lea 0x0(,%eax,8),%edx
0x23a9050 <+0x01e0> mov 0x8(%ebp),%eax
0x23a9053 <+0x01e3> add %edx,%eax
0x23a9055 <+0x01e5> lea 0x2(%eax),%edx
0x23a9058 <+0x01e8> lea -0x16(%ebp),%eax
0x23a905b <+0x01eb> mov %eax,0x4(%esp)
0x23a905f <+0x01ef> mov %edx,(%esp)
0x23a9062 <+0x01f2> call 0x249eb30 <qMin<unsigned short>(unsigned short const&, unsigned short const&)>
0x23a9067 <+0x01f7> movzwl (%eax),%eax
0x23a906a <+0x01fa> mov %ax,0x2(%ebx)
4070 in painting\qpaintengine_raster.cpp
4071 in painting\qpaintengine_raster.cpp
0x23a906e <+0x01fe> mov -0x8(%ebp),%eax
0x23a9071 <+0x0201> lea 0x0(,%eax,8),%edx
0x23a9078 <+0x0208> mov 0x8(%ebp),%eax
0x23a907b <+0x020b> add %edx,%eax
0x23a907d <+0x020d> movzwl 0x2(%eax),%eax
0x23a9081 <+0x0211> test %ax,%ax
0x23a9084 <+0x0214> jne 0x23a9088 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+536>
4072 in painting\qpaintengine_raster.cpp
0x23a9086 <+0x0216> jmp 0x23a90d7 <qt_intersect_spans(QT_FT_Span*, int, QRect const&)+615>
4073 in painting\qpaintengine_raster.cpp
0x23a9088 <+0x0218> mov -0x8(%ebp),%eax
0x23a908b <+0x021b> lea 0x0(,%eax,8),%edx
0x23a9092 <+0x0222> mov 0x8(%ebp),%eax
0x23a9095 <+0x0225> add %eax,%edx
0x23a9097 <+0x0227> mov -0xc(%ebp),%eax
0x23a909a <+0x022a> lea 0x0(,%eax,8),%ecx
0x23a90a1 <+0x0231> mov 0x8(%ebp),%eax
0x23a90a4 <+0x0234> add %ecx,%eax
0x23a90a6 <+0x0236> movzwl 0x4(%eax),%eax
0x23a90aa <+0x023a> mov %ax,0x4(%edx)
4074 in painting\qpaintengine_raster.cpp
0x23a90ae <+0x023e> mov -0x8(%ebp),%eax
0x23a90b1 <+0x0241> lea 0x0(,%eax,8),%edx
0x23a90b8 <+0x0248> mov 0x8(%ebp),%eax
0x23a90bb <+0x024b> add %eax,%edx
0x23a90bd <+0x024d> mov -0xc(%ebp),%eax
0x23a90c0 <+0x0250> lea 0x0(,%eax,8),%ecx
0x23a90c7 <+0x0257> mov 0x8(%ebp),%eax
0x23a90ca <+0x025a> add %ecx,%eax
0x23a90cc <+0x025c> movzbl 0x6(%eax),%eax
0x23a90d0 <+0x0260> mov %al,0x6(%edx)
4075 in painting\qpaintengine_raster.cpp
0x23a90d3 <+0x0263> addl $0x1,-0x8(%ebp)
4076 in painting\qpaintengine_raster.cpp
4077 in painting\qpaintengine_raster.cpp
0x23a90e7 <+0x0277> mov -0x8(%ebp),%eax
4078 in painting\qpaintengine_raster.cpp
0x23a90ea <+0x027a> add $0x28,%esp
0x23a90ed <+0x027d> pop %ebx
0x23a90ee <+0x027e> pop %ebp
0x23a90ef <+0x027f> ret
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtstack.png
Type: image/png
Size: 68725 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131121/71672fc1/attachment.png>
More information about the Interest
mailing list