Author hail
Date 2011-10-29.18:55:12
I was able to confirm this bug is still possible to trigger (ostensibly)

I added an enemy to level 68, modified the waypoint array to contain 0 waypoints, 
then tried to force an enemy that I clicked on to find a waypoint. Same error as 
before. I'm not sure if this is considered a bug since we validate for it in the 
level editor, but I'm writing a patch to handle this gracefully anyway

GDB log follows:

(gdb) break check_for_droids_to_attack_or_talk_with
Breakpoint 3 at 0x4494e3: file influ.c, line 1522.
(gdb) c

[Clicked on the droid here]

Breakpoint 3, check_for_droids_to_attack_or_talk_with () at influ.c:1522
1522		enemy *droid_below_mouse_cursor = GetLivingDroidBelowMouseCursor();
(gdb) p droid_below_mouse_cursor 
$11 = (enemy *) 0x13c6ad0
(gdb) call enemy_find_closest_waypoint(droid_below_mouse_cursor)
$12 = 0
(gdb) set curShip.AllLevels[droid_below_mouse_cursor->pos.z]->waypoints.size = 0
(gdb) call enemy_find_closest_waypoint(droid_below_mouse_cursor)

Freedroid has encountered a problem:
In function: enemy_find_closest_waypoint.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
Found no closest waypoint on level 68.

If you encounter this message, please inform the Freedroid developers
about the problem, by either

  sending e-mail to:
    freedroid-discussion AT
  mention it to someone of the developers on our IRC channel:
    channel: #freedroid on
  post on our forum at:
  report a bug on our tracker at:

Thanks a lot!

Freedroid will terminate now to draw attention to the problems it could
not resolve.  Sorry if that interrupts a major game of yours...

Termination of freedroidRPG initiated...Thank you for playing freedroidRPG.

[Thread 0x7ffff095e700 (LWP 21487) exited]
[Thread 0x7fffea0f1700 (LWP 21489) exited]

Program exited with code 01.
The program being debugged exited while in a function called from GDB.
Evaluation of the expression containing the function
(enemy_find_closest_waypoint) will be abandoned.
Date User Action Args
2011-10-29 18:55:13hailsetmessageid: <>
2011-10-29 18:55:13haillinkissue492 messages
2011-10-29 18:55:12hailcreate