Invalid target in "GetTargetData" (-2)
issueid=49 04-15-2008 07:55 AM
Ancient Member
Number of reported issues by Nezur: 13
Invalid target in "GetTargetData" (-2)

I lost a monk to this bug a while ago. I know I should have posted this earlier but better late than never I guess.

Summary:

1. I was in a room with my two tame cave lions like this. I'm not sure if the reconstructed image is accurate but you get the idea.
Code:
######
#....#
#....#########
#.@...........
#..f.#########
#.f..#
######
The whole level was explored I think.

2. I pressed w+numpad 6 to use the fast walk mode to move east.

3. The game froze and I started pressing different keys repeatedly to get somewhere.

4. Finally the game view disappeared and I got this error message:

Fatal error:
"Invalid target in 'GetTargetData' (-2)"

The screenshot below.





I was able to load the save file since ADoM (or ADoM Sage) made a backup in the process but the game just immediately crashed again because of the same bug and I lost the file.

I was playing the Linux version of ADoM 1.1.1 using the ADoM Sage frontend on Windows XP. I'm sure this bug wasn't due to the frontend since it seems that other people have ran into it on the regular ADoM 1.1.1.

Links to other reports of this bug on various operating systems on the old bug tracker:
Report 1
Report 2
Report 3
Report 4

By typing GetTargetData (-2) on the bug search field I was able to find 10 bug reports with an error message like this.

I think this bug is fairly difficult to reproduce but it does exist.

I'm giving this a fairly high priority as the bug seems to kick in fairly unpredictably.

EDIT: Clarified and added more stuff. Gave a priority.
Issue Details
Issue Number 49
Project ADOM (Ancient Domains Of Mystery)
Category Unknown
Status Fixed
Priority 2
Affected Version ADOM 1.2.0 pre 2
Fixed Version ADOM 1.2.0 pre 3
Milestone (none)
Users able to reproduce bug 2
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




04-23-2008 02:09 PM
Ancient Member
I once had the "GetTargetData" bug as well. I think it's related to neutral monsters having no effing clue what to do.

I discovered, in my lucky case, that not only I could reload the game, the action I had wanted to take was actually executed. So I took another step - crash. Reload, and I discovered I had taken the step! You can guess how it continued. Take one step - crash - reload - take one step - crash - reload... until the bug fixed itself.

05-23-2012 08:30 PM
jt jt is offline
Administrator
My analysis so far:

- a monster wants to attack a specific adjacent (this is important!) spot (indicated by the "-2" value)
- the monster checks if a speedy retreat is possible, therefore it determines the "speed" of the target
- since this is not possible (a spot has no speed), the error message is shown

It's a bug, but it seems to happen only under very rare circumstances. I need to discuss this with Thomas.

08-14-2012 04:00 AM
Junior Member
Just happened to me, adjacent to a neutral Blink Dog. As soon as I moved, the game crashed with this message. When I reload, move, it crashes. So I reload the game and instead shot the Blink Dog, killing it. After that, everything worked fine.

Save file before killing the Blink Dog is available if required.

08-14-2012 08:58 PM
Ancient Member
I have had this happen a few times. And at least twice when this has happened, I had a panicing companion.

09-11-2012 06:03 PM
jt jt is offline
Administrator
Fixed.

+ Reply