Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Detect an misterious acess violation [SOLVED]

  1. #1

    Detect an misterious acess violation [SOLVED]

    1 in 100 times (not really, just guessing) i run my program (debugging inside the IDE), my app trows an access violation (the debugger does not react to it) and the app closes after i close the access violation dialog

    i already double checked the routines involved and i can't find it -.-'

    someone can help me


    Specs:
    Delphi 7
    win XP PRO
    From brazil (:

    Pascal pownz!

  2. #2

    Detect an misterious acess violation [SOLVED]

    Have you any idea about where it might have occurred within the source? If you have an idea of the problem region then you might reproduce it, and if you can reproduce it then you can track it down.

    Do you even know what may be going on behind the scenes when it throws this exception?

  3. #3

    Detect an misterious acess violation [SOLVED]

    The error is after the window is showed at the screen (at this time nothing critical is happening in background)
    From brazil (:

    Pascal pownz!

  4. #4

    Detect an misterious acess violation [SOLVED]

    Can you be a little more specific what is happening, what components are on the form (if any), and what you might be doing in the source at that time? If it isn't proprietary then I can't be of much help without seeing the source to the OnCreate event.

  5. #5

    Detect an misterious acess violation [SOLVED]

    Notice what address you get the violation on and dump the disassembly your executable. make sure you have not stripped the symbols of the executable you dump the output of.
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  6. #6

    Detect an misterious acess violation [SOLVED]

    Quote Originally Posted by JSoftware
    Notice what address you get the violation on and dump the disassembly your executable. make sure you have not stripped the symbols of the executable you dump the output of.
    ops: how can i do that?
    From brazil (:

    Pascal pownz!

  7. #7

    Detect an misterious acess violation [SOLVED]

    arthurprs, In D7 there is a Search=>Find Error menu option where you can enter the address where an AV happened. And it will show you the corresponding line in your source code.

  8. #8

    Detect an misterious acess violation [SOLVED]

    Quote Originally Posted by arthurprs
    Quote Originally Posted by JSoftware
    Notice what address you get the violation on and dump the disassembly your executable. make sure you have not stripped the symbols of the executable you dump the output of.
    ops: how can i do that?
    I suppose you have binutils already, if not you can find them somewhere in binary form(they also come with fpc). Simply call
    Code:
    objdump -D project1.exe > disasm.txt
    This will disassemble your executable and place the corresponding symbols(function names, variable names, etc) at the places in the assembler where they really are.

    The access violation you get say something like "Access violation at address xxxxxxxx". This address should be somewhere in the dump
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  9. #9

    Detect an misterious acess violation [SOLVED]

    also what does the access violation state? read, write? file or what? when you get the error on the dialog box hit ctrl+c then paste here ?

  10. #10

    Detect an misterious acess violation [SOLVED]

    i "think" i have found the problem,

    delphi does not initialize initialize global var of class types with nil (like i said 1/100 of the time)

    not sure, but the problem seems to be solved
    From brazil (:

    Pascal pownz!

Page 1 of 2 12 LastLast

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
  •