Board index » delphi » FIND ERROR: Converting Segment address to segment number ?

FIND ERROR: Converting Segment address to segment number ?

To convert the reported address from a runtime error to one that Find
Error can use, add the address of TextStart to what gets reported.
You can find the address of TextStart by putting "@TextStart" in a
watch window and running the program.

You can use the same idea to look up an error in the .map file (since
Find Error won't find errors in code that doesn't have debugging
turned on).  Add the .map file address of TextStart to the reported
address, and look through the Publics by Value section of the map
until you bracket the result.  You know the error occurred somewhere
in that routine.

The first technique is a workaround for an IDE bug; the second would
always be necessary.

Duncan Murdoch

 

Re:FIND ERROR: Converting Segment address to segment number ?


: D.J.Murd...@bris.ac.uk (Duncan Murdoch) wrote:

Quote
>To convert the reported address from a runtime error to one that Find
>Error can use, add the address of TextStart to what gets reported.
>You can find the address of TextStart by putting "@TextStart" in a
>watch window and running the program.

>You can use the same idea to look up an error in the .map file (since
>Find Error won't find errors in code that doesn't have debugging
>turned on).  Add the .map file address of TextStart to the reported
>address, and look through the Publics by Value section of the map
>until you bracket the result.  You know the error occurred somewhere
>in that routine.

>The first technique is a workaround for an IDE bug; the second would
>always be necessary.

I think somebody else suggested a better technique which -
disclaimer! - I have not tried myself yet:

The effect of @TextStart is to get the image base address of the
executable - and the other poster claimed that HINSTANCE
(GetModuleHandle(0)) would exactly have that value.

Just an idea.
--
Stefan.Hoffmeis...@UNI-Passau.DE
http://kakadu.rz.uni-passau.de/~w4hoff01/
University of Passau, Bavaria, Germany

Other Threads