3

Under delphi and android my app raise this error: E/LogError(22894): Access violation at address 830330D2, accessing address 00000000

Is their any way to know to with line of code is connected the address 830330D2 ?

  • did you tried to use the debugger with f7 (instruction by instruction), you will have the error when you reach that line of code. – Nasreddine Galfout Mar 27 '17 at 00:00
  • I do not know if this also works on Android, but on the PC, when you start the debugger with F4 (it will break on the begin line in your dpr file) and then select Search -> Go To Address, you can enter the address and the debugger will try to find the unit and line that corresponds with it. – R. Beiboer Mar 27 '17 at 06:48
  • @NasreddineAbdelillahGalfout no because the error is very hard to reproduce and when i have it i was not in debugging session –  Mar 27 '17 at 07:39
  • this type of error is a headache, if you can not reproduce it then it might be any thing (may be it is logic not code, you are trying to use something that you already freed). I would advice you to try to do the same actions and hope to have the error again. – Nasreddine Galfout Mar 27 '17 at 09:36
  • Not really any more headache than the other types of errors. Its clearly null pointer reference. Do the debugging. – Free Consulting Mar 27 '17 at 11:31
  • @FreeConsulting i know my code is trying to access a nil object, but what i want to know is where in my code i trying to do so to understand why in some very very rare case my code try to access a nil pointer. and the only information i have is the address 830330D2 where my code try to access this null pointer –  Mar 27 '17 at 12:06
  • @R.Beiboer: yes seam to work on android :) –  Mar 28 '17 at 14:11

1 Answers1

0

Have you generated a .MAP file? That's the typical (if slightly manual) way to connect an address to the line of code it pertains to, if indeed it is an address from within your code. Locate the closest address, taking account any implied starting offset.

You may need to look at this Stack Overflow answer in order to test it out, as I think Delphi 10.2 Tokyo still "makes it difficult" to access the required option. Basically plug in the command line compiler switch to generate a .MAP file into the IDE compiler options field.

Unfortunately I don't have an Android-capable product to hand to verify exact steps with the map file, but hopefully that will help you along the path.

Community
  • 1
  • 1
blong
  • 2,145
  • 13
  • 23