Results 1 to 6 of 6

Thread: Locate Class/Method from Dll hex address

  1. #1
    Join Date
    Jul 2008
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Locate Class/Method from Dll hex address

    Hello there,

    i am having a problem which i could not locate for weeks please help..

    We have an application which loads some hundreds of components from some 30 dlls (dlls of our own, dlls from qt and others).

    We have a system which does the same processing in a production line, which should also do many additional logging, visualisation etc work. So many things run time critical. Furthermore, for historical reasons, many parts of the software are in race conditions.

    Therefore the realtime behaviour is most of the time different in debug mode.

    I have:

    - i have tried to regenerate the problem with the debug build, but it does not appear in debug mode..

    - checked all possible locations for NULL Pointers, put if statements which will not execute the in case of NULL pointer..

    - put some asserts which can give a clue about a value error, did not bring anything..

    Now only information i have is from the windows system log, which tells this:

    "Crashed application myapplication.exe, version 1.2.3.4,
    crashed module qtgui4.dll, version 4.2.2.0,
    error address 0x00320275"

    Is there any method to locate the method/class which corresponds to that hex address?

    If this is because of some privacy issue not possible can someone at least TELL which method that is without giving a method to retrieve this information? It would also help.

    Thanks in advance
    Last edited by sivrisinek; 1st October 2009 at 10:48.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Locate Class/Method from Dll hex address

    This address is in code section of the application and will depend on the different relocations of different libraries. What you can do is run the application under debugger, stop it, set a breakpoint to this address, continue and read the stack frame when the breakpoint is reached. But I can't guarantee it will work at all
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2008
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Locate Class/Method from Dll hex address

    Quote Originally Posted by wysota View Post
    This address is in code section of the application and will depend on the different relocations of different libraries.
    If you mean the way the solution is structured, it was not changing since long. if you mean at each new linking it might get differently linked, i can not know if we have some huge changes which might cause this.. anyway i want to find an address in a Qt Dll and i do not relink Qt Dll anyway


    Quote Originally Posted by wysota View Post
    What you can do is run the application under debugger, stop it, set a breakpoint to this address, continue and read the stack frame when the breakpoint is reached.
    Do you mean that the addresses for debug and release dlls are the same? I do not know these issues i'am just trying to understand. If the debug dll has no shift in addresses as compared to the release dll (i would say because of some debug labels it might be different) it should work.


    Quote Originally Posted by wysota View Post
    But I can't guarantee it will work at all
    Thanks a lot any help is appreciated, if it will not help, at least it will give some insight.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Locate Class/Method from Dll hex address

    Quote Originally Posted by sivrisinek View Post
    If you mean the way the solution is structured, it was not changing since long.
    I mean the way the dynamic linker links parts of the executable together during application startup.
    [quote]anyway i want to find an address in a Qt Dll and i do not relink Qt Dll anyway
    Finding an address in Qt DLL won't do you any good. You need to find address in your code that called the method from Qt's library that was the direct cause of the crash. What will you gain from knowing the crash occured at destructor of QString?

    Do you mean that the addresses for debug and release dlls are the same?
    I mean you need to run the exact same executable that caused a crash and make it stop before it crashes. Or just make it crash under debugger. The effect will be the same (or even better).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jul 2008
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Locate Class/Method from Dll hex address

    I can not regenerate the same crash in debug build this IS the reason why want to find the problem using the release build.

    The crash is happening sporadically. We can not attach its reason to something specific.

    That's why i am longing for -yes- even the simplest clue like QString destructor, it IS better than what i have now: "nothing".

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Locate Class/Method from Dll hex address

    I didn't say you were to use debug build. You were to use the very same executable that crashed.

    Believe me, destructor of QString would tell you exactly nothing, especially if your system is threaded.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. how can i get IP address
    By dognzhe in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2009, 05:27
  2. IP address find
    By kpmsivachand in forum Qt Programming
    Replies: 6
    Last Post: 21st February 2009, 18:11
  3. How to display My Current System IP Address...???
    By maveric in forum Qt Programming
    Replies: 8
    Last Post: 4th August 2008, 17:22
  4. Native Mac Address
    By genny77 in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2007, 10:02
  5. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.