Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User ondrej_andrej's Avatar
    Join Date
    Jul 2012
    Location
    Brno, Czech Republic
    Posts
    14
    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;
    }
    Where the class IndexEntry is defined as follows:
    Code:
    class IndexEntry {
    public:
    	IndexEntry() { heading = ""; dictPos = 0; length = 0; }
    	QString heading;
    	qint64 dictPos;
    	qint64 length;
    };
    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

  2. #2
    Registered User ondrej_andrej's Avatar
    Join Date
    Jul 2012
    Location
    Brno, Czech Republic
    Posts
    14
    I apologize, I realized I had a bug in my function base64toInt(), so the member variables of ie were not assigned any meaningful value.
    However, I still don't understand why the watch window displays ie.heading as empty even after the assignment on line 3 of readLineIE().

Similar Threads

  1. Simulator stops when running qt-mobility simple example
    By juancito_wdg in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2011-08-06, 18:10
  2. On-device debugging: Reading debug messages from device is too slow
    By elviin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2010-05-12, 14:55
  3. debugging and running a widget
    By ferranhalden in forum Symbian Web Runtime
    Replies: 2
    Last Post: 2008-10-23, 11:33
  4. Changin UID3 value STOPS the application from running.
    By MehulPatel in forum Symbian C++
    Replies: 11
    Last Post: 2008-10-16, 06:33
  5. running and debugging with emulator and JBuilder
    By zivgr in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2003-05-06, 09:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved