Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
347 Beiträge
 
#14

AW: Nach Update auf Delphi12 startet compiliertes Prog nicht mehr. Fehler bei LoadRes

  Alt 20. Jun 2024, 18:44
@Bernau: Selbst wenn man nicht selbst versteht, was da genau passiert, hilft es vielleicht, einen Screenshot des CPU-Fensters vor der Anweisung, die die Exception auslöst, hier zu posten.

Kas Ob.'s Vermutung, dass da der Stack kaputt ist, könnte man damit auch überprüfen.

Ohne weitere Informationen raten wir hier nur rum.
Well this will not useful at all after the exception because the EIP already pointing to inaccessible address.

But there is a way, and bernau words "Ist ja nicht so mein Ding." made me stop explaining how to catch this, though it is not hard nor late to learn, so here we go :
1) put breakpoint on this line "if Assigned(P) and Assigned(Pointer(P^)) then"
2) run the application until it stop on the above breakpoint
3) open the CPU View and watch the stack pointer and its content like this in the screenshot
stack.png
We don't care about anything else, just the two values at the blue arrow, what are we watching for, these values on that breakpoint must stay the same all the time and on every execution.
4) hit RUN on the debugger or F9 key, the debugger will stop again on that break point, and the blue arrow (the stack pointer) should be pointing to the same values each time, on side note all the vlaue above also should be not changed in this case, it might change in different case, but that is different talk for different place.
5) keep hiting F9 until you see different values, this means the last initialization section had corrupted the stack already, we stop here , without closing the debugger.
6) from the local variables for this thread, you willse the value inside P, it should be in hex, something like $xxxxxxxx.
7) on my IDE XE8, there is
IDE Main Menu -> Search -> Go to Address , open it and write the P address, and don't forget the $ , the place for this option might be different in newer IDEs, i have no idea.
8) you will land on the initialization that caused the stack to corrupt, investigate there.
Kas
  Mit Zitat antworten Zitat