[Qt-interest] system crash when using external dll
Vincent Cai
wcai at cypress.com
Thu Sep 22 03:42:50 CEST 2011
Thanks for your reply.
Actually, that is what I concerned.
1. As I stated before: the dll and the application are all created in Qt Creator with the same compiler setting.
So it should not be calling convention issue, right?
2. If I add the source code into application, everything works well.
So it should not be the source code issue, right?
If it is not Qt and source code related, any other possibility I should focus on?
Please correct me if my statement is wrong.
Thanks!
-----Original Message-----
From: qt-interest-bounces+wcai=cypress.com at qt.nokia.com [mailto:qt-interest-bounces+wcai=cypress.com at qt.nokia.com] On Behalf Of Malyushytsky, Alex
Sent: 2011年9月22日 4:36
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] system crash when using external dll
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.”
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
________________________________
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110921/87ccc113/attachment.html
More information about the Qt-interest-old
mailing list