on-device debugging stops while my app is running
Hi,
I'm trying to debug my app, which crashes suddenly. However, on the following code the debugger is behaving weirdly:
[CODE]IndexEntry DictEngine::readLineIE()
{
QStringList strl = streamIndex->readLine().split("\t");
IndexEntry ie;
ie.heading = strl[0];
ie.dictPos = base64toInt(strl[1]);
ie.length = base64toInt(strl[2]);
return ie;
}[/CODE]
Where the class IndexEntry is defined as follows:
[CODE]class IndexEntry {
public:
IndexEntry() { heading = ""; dictPos = 0; length = 0; }
QString heading;
qint64 dictPos;
qint64 length;
};[/CODE]
When I step through the first line (where QStringList instance is created), everything is OK, I can see the values of strl in watch window, which are as expected.
However, when I step through lines 3-6, I realize, that the member variables of ie contain some random values, although they should have been assigned values from strl. After line 6 (assignment of ie.length) the yellow arrow disappears and debugging ends.
It's a pity I can't attach a text file to this post. I could attach the debugger log. So at least I'm sending a couple of last lines from it:
<63-stack-select-frame 0
<64disassemble 0x80484ab8
<65bb options:fancy,autoderef vars: expanded:local.ie.heading,local.strl,local.ie typeformats: formats: watchers:
>63^done
>&"disassemble 0x80484ab8\n"
>&"No function contains specified address.\n"
>64^error,msg="No function contains specified address."
<66disassemble 0x80484aa4,0x80484b1c
>&"bb options:fancy,autoderef vars: expanded:local.ie.heading,local.strl,local.ie typeformats: formats: watchers:\n"
>~"XXX: BLOCK IN FRAME NOT ACCESSIBLE: Cannot locate object file for block.\n"
>~"\n"
>~"data=[,],typeinfo=[]\n"
>65^done
dDISCARDING JUNK AT BEGIN OF RESPONSE: XXX: BLOCK IN FRAME NOT ACCESSIBLE: Cannot locate object file for block.
d
d
<Rebuild Watchmodel 10>
sFinished retrieving data
>&"disassemble 0x80484aa4,0x80484b1c\n"
>~"Dump of assembler code from 0x80484aa4 to 0x80484b1c:\n"
>~" 0x80484aa4:\t"
>&"Cannot access memory at address 0x80484ab8\n"
>66^error,msg="Cannot access memory at address 0x80484ab8"
sDisassembler failed: Cannot access memory at address 0x80484ab8
Re: on-device debugging stops while my app is running
I apologize, I realized I had a bug in my function base64toInt(), so the member variables of[FONT="Courier New"] ie[/FONT] were not assigned any meaningful value.
However, I still don't understand why the watch window displays [FONT="Courier New"]ie.heading [/FONT]as empty even after the assignment on line 3 of [FONT="Courier New"]readLineIE()[/FONT].