[Qt-interest] system crash when using external dll
Malyushytsky, Alex
alex at wai.com
Wed Sep 21 22:36:26 CEST 2011
I would add that the problem might be not even in the code (I am not saying it is not).
For example you could get such problem if different calling convention was used in your main project and dll.
Also the problem is likely not qt related.
-----Original Message-----
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Thiago Macieira
Sent: Wednesday, September 21, 2011 7:18 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] system crash when using external dll
On Wednesday, 21 de September de 2011 09.46.52, Vincent Cai wrote:
> Could anybody give me some hints, so that I can try something to
> continue my works. :) Any reference document or any debug method is
> welcome.
>
> I Love Qt!
We can't help you because you haven't posted nearly enough information for us to start.
When people come with this vague information on IRC, my recommendation is that they follow these steps:
1) find the bug
2) fix it
If you'd rather, I can expand and say:
1) hypothesise what the cause of the bug is
2) create a test to prove or disprove if that is the cause (one such test is to try and fix what you think the problem is)
3) execute the test
4) if it fails, go back to 1
For problems related to crashes, I also recommend the following sources of
information:
a) the backtrace of the crash and verify the validity of every single pointer used in the line that caused the crash
b) the valgrind log of the application.
Note that I recommend valgrind even for people developing on Windows. If your code is cross-platform, use Linux. It's worth to have a Linux system even if the only thing you need it for is valgrind. If you have non-cross-platform code, you can buy similar tools from IBM (Purify) or you can try Intel's Parallel Studio XE, which also contains a memory debugger (it's free for non- commercial use).
If all else fails, start reducing the code to the minimum necessary to reproduce the crash. One of two outcomes are possible out of this: either you'll find the issue in the process, or you'll end up with a very small testcase, which you can share with others to try and get help. Your objective is 200 lines of self-contained code.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list