<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[What is wrong here [A data abort exception has occurred]]]></title><description><![CDATA[<p dir="auto">hi everyone!<br />
did I do something wrong here?<br />
!<a href="http://files.myopera.com/tratstil/files/nokiaqt.png" target="_blank" rel="noopener noreferrer nofollow ugc">http://files.myopera.com/tratstil/files/nokiaqt.png</a>!</p>
]]></description><link>https://forum.qt.io/topic/12235/what-is-wrong-here-a-data-abort-exception-has-occurred</link><generator>RSS for Node</generator><lastBuildDate>Sun, 03 May 2026 20:55:26 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/12235.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Dec 2011 03:18:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to What is wrong here [A data abort exception has occurred] on Fri, 16 Dec 2011 02:28:40 GMT]]></title><description><![CDATA[<p dir="auto">hum, more thing to do. You are right. I just return NULL without any code and get the same error message. It means this function not relative at all :D. Thanks you</p>
]]></description><link>https://forum.qt.io/post/120746</link><guid isPermaLink="true">https://forum.qt.io/post/120746</guid><dc:creator><![CDATA[Tratstil]]></dc:creator><pubDate>Fri, 16 Dec 2011 02:28:40 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong here [A data abort exception has occurred] on Fri, 16 Dec 2011 02:21:33 GMT]]></title><description><![CDATA[<p dir="auto">bq. is it mean the bug is in another unsynchronize thread?</p>
<p dir="auto">Yeah, that's the only thing that makes any sense here: I'd suggest running in a debugger that will let you see what thread is crashing, and what it's trying to do. I don't trust char * and friends in the least, but they may be totally unrelated to the problem here.</p>
]]></description><link>https://forum.qt.io/post/120745</link><guid isPermaLink="true">https://forum.qt.io/post/120745</guid><dc:creator><![CDATA[Chris H]]></dc:creator><pubDate>Fri, 16 Dec 2011 02:21:33 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong here [A data abort exception has occurred] on Fri, 16 Dec 2011 02:15:55 GMT]]></title><description><![CDATA[<p dir="auto">thanks Chris H, it is interesting to try.<br />
I change my code to<br />
@extern "C" const char* GetRealFilePath(const char* filename){<br />
char realname[1024];<br />
qDebug()&lt;&lt;"checkpoint1:"&lt;&lt;filename;<br />
sprintf(realname,"%s",filename);<br />
qDebug()&lt;&lt;"checkpoint2";<br />
qDebug()&lt;&lt;"realname"&lt;&lt;realname;<br />
return NULL;<br />
}@<br />
and get<br />
@[Qt Message] start QtGame<br />
[Qt Message] application event: 68<br />
[Qt Message] \private%s\res\bin%s<br />
[Qt Message] \private\E57BFD88\res\bin%s<br />
[Qt Message] game init<br />
[Qt Message] runhere2: ten<br />
<em>Process 2357, thread 2358 stopped at 0x504b46: A data abort exception has occurred.</em><br />
*[Qt Message] checkpoint1: ten<br />
[Qt Message] checkpoint2 *<br />
[Qt Message] realname ten @<br />
the realname is correct. But I don't know what happened. The error message above the checkpoint1, is it mean the bug is in another unsynchronize thread?</p>
<p dir="auto">I change the code to<br />
@extern "C" const char* GetRealFilePath(const char* filename){<br />
qDebug()&lt;&lt;"begin function";<br />
char realname[1024];<br />
qDebug()&lt;&lt;"checkpoint1:"&lt;&lt;filename;<br />
sprintf(realname,"%s",filename);<br />
qDebug()&lt;&lt;"checkpoint2";<br />
qDebug()&lt;&lt;"realname"&lt;&lt;realname;<br />
return NULL;<br />
}@<br />
and receive<br />
@[Qt Message] game init<br />
[Qt Message] runhere2: ten<br />
[Qt Message] begin function<br />
Process 2389, thread 2390 stopped at 0x504cda: A data abort exception has occurred.<br />
[Qt Message] checkpoint1: ten<br />
[Qt Message] checkpoint2<br />
[Qt Message] realname ten<br />
[Qt Message]  @</p>
]]></description><link>https://forum.qt.io/post/120744</link><guid isPermaLink="true">https://forum.qt.io/post/120744</guid><dc:creator><![CDATA[Tratstil]]></dc:creator><pubDate>Fri, 16 Dec 2011 02:15:55 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong here [A data abort exception has occurred] on Fri, 16 Dec 2011 01:50:48 GMT]]></title><description><![CDATA[<p dir="auto">If you step through this one line at a time in the debugger, does realname get set correctly?</p>
]]></description><link>https://forum.qt.io/post/120743</link><guid isPermaLink="true">https://forum.qt.io/post/120743</guid><dc:creator><![CDATA[Chris H]]></dc:creator><pubDate>Fri, 16 Dec 2011 01:50:48 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong here [A data abort exception has occurred] on Fri, 16 Dec 2011 01:45:33 GMT]]></title><description><![CDATA[<p dir="auto">The filename is an element of an array of char like this<br />
@char* _ResourceFileName[] = {<br />
"tester",<br />
"ten"};<br />
filename = _ResourceFileName[1];@<br />
_ResourceFileName is static.</p>
<p dir="auto">At you see above, if filename is not end with '\0', the line "qDebug()&lt;&lt;"checkpoint1"&lt;&lt;filename" can't work correctly.</p>
<p dir="auto">And I must using char for some reason.</p>
<p dir="auto">Thanks for replying favoritas37.</p>
]]></description><link>https://forum.qt.io/post/120742</link><guid isPermaLink="true">https://forum.qt.io/post/120742</guid><dc:creator><![CDATA[Tratstil]]></dc:creator><pubDate>Fri, 16 Dec 2011 01:45:33 GMT</pubDate></item><item><title><![CDATA[Reply to What is wrong here [A data abort exception has occurred] on Thu, 15 Dec 2011 11:16:17 GMT]]></title><description><![CDATA[<p dir="auto">Was the fileName null terminated? (The last character to be '\0')</p>
<p dir="auto">Also why do you want to do that operation by that way since there are plenty of easier ways by using QString methods. Just asking..not judging.</p>
]]></description><link>https://forum.qt.io/post/120627</link><guid isPermaLink="true">https://forum.qt.io/post/120627</guid><dc:creator><![CDATA[favoritas37]]></dc:creator><pubDate>Thu, 15 Dec 2011 11:16:17 GMT</pubDate></item></channel></rss>