[Qt-interest] system crash when using external dll
Thiago Macieira
thiago at kde.org
Wed Sep 21 16:17:30 CEST 2011
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110921/3cb689f7/attachment.bin
More information about the Qt-interest-old
mailing list