Issue492

Title Crash: Found no closest waypoint on level 42.
Priority critical Status resolved
Assigned To hail Keywords
Linked issues Watchers hail

Submitted on 2011-10-23 22h45 by Henker, last changed by matthiaskrgr.

Files
File name Uploaded Type Edit Remove
fourteen.savegame Henker, 2011-10-23.22:46:49 application/octet-stream
fourteen.shp Henker, 2011-10-23.22:45:55 application/x-qgis
Messages
Author: Henker Date: 2011-10-23   22h45
After entering level 42, my game is constantly crashing. The game stated that it
could find no closest waypoint, the whole error message is attached, as is a
savegame the problem should occur seconds after starting.

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

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

  sending e-mail to:
    freedroid-discussion AT lists.sourceforge.net
  mention it to someone of the developers on our IRC channel:
    channel: #freedroid on irc.freenode.net
  post on our forum at:
    https://sourceforge.net/apps/phpbb/freedroid
  report a bug on our tracker at:
    https://sourceforge.net/tracker/?group_id=54521&atid=474016

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...
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  129 (XFree86-VidModeExtension)
  Minor opcode of failed request:  10 (XF86VidModeSwitchToMode)
  Value in failed request:  0x420000e
  Serial number of failed request:  211
  Current serial number in output stream:  213

Attached fourteen.shp.
Author: Henker Date: 2011-10-23   22h46
and the second file for the savegame

Attached fourteen.savegame.
Author: Henker Date: 2011-10-23   22h49
I am using Ubunto 11.10. The Freedroid RPG 0.14.1 was installed using the
deb-package.
I am not sure about what information you also could need, so please ask fpr it
if I forgot something.
Author: salimiles Date: 2011-10-24   05h59
Hum, it looks like this doesn't affect the current SVN 5062.

It could be that there are no wapoints on that level in the released version?
From what I can tell, the level is mostly water, at least in the current SVN.
Author: ahuillet Date: 2011-10-24   10h13
Miles, I think you're right - .14.1 had no waypoints on level 42. Hence the bug.

What we have to do now is:

- check if we *still* require presence of a waypoint on a level 
- if we do, make it non-fatal unless it's unavoidable
- add a check to the leveleditor validator
Author: ahuillet Date: 2011-10-24   10h14
Henker, do you wish to have a "fixed" savegame that will not crash? That can be
arranged.
Author: Henker Date: 2011-10-24   17h05
Thank you very much, but this will not be necessary. I opened the developer
tools and destroyed all bots in that level to get out of the area (since I had
already overtaken all of them this was ok). ;)
Author: ahuillet Date: 2011-10-24   17h36
What developer tools? Do you mean the level editor? 
How did you destroy the bots?
Author: Henker Date: 2011-10-24   17h59
SHIFT+CTRL+ALT+C opens some developer or cheat tools with some options like
showing all bots in the level etc.
There is also an option "destroy robots on current level".
Author: ahuillet Date: 2011-10-24   18h03
OK - we call that the cheat menu.
-- 
Greetings, 
A. Huillet
Author: hakzsam Date: 2011-10-27   16h11
My understanding is that this issue doesn't exist for the current svn version,
so, Henker, if you are agree with that, could you close the ticket, please?
Author: Henker Date: 2011-10-27   23h39
ahuillet mentioned three tasks to do to prevent problems of this kind in general
(2011-10-24   10h13)

Therefore I am not sure about closing this ticket before this tasks are
fulfilled. I would like to let ahuillet the decision about it.
Author: hail Date: 2011-10-29   18h55
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 lists.sourceforge.net
  mention it to someone of the developers on our IRC channel:
    channel: #freedroid on irc.freenode.net
  post on our forum at:
    https://sourceforge.net/apps/phpbb/freedroid
  report a bug on our tracker at:
    https://sourceforge.net/tracker/?group_id=54521&atid=474016

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.
Author: matthiaskrgr Date: 2011-10-30   22h35
Fixed in r5090. Thanks!
History
Date User Action Args
2011-10-30 22:35:10matthiaskrgrsetstatus: open -> resolved
messages: + msg1808
2011-10-29 18:55:13hailsetassignedto: hail
messages: + msg1800
nosy: + hail
2011-10-27 23:39:57Henkersetmessages: + msg1779
2011-10-27 16:11:06hakzsamsetmessages: + msg1776
2011-10-24 18:03:03ahuilletsetmessages: + msg1745
2011-10-24 17:59:42Henkersetmessages: + msg1743
2011-10-24 17:36:04ahuilletsetmessages: + msg1741
2011-10-24 17:05:20Henkersetmessages: + msg1740
2011-10-24 10:14:02ahuilletsetmessages: + msg1736
2011-10-24 10:13:27ahuilletsetmessages: + msg1735
2011-10-24 05:59:11salimilessetmessages: + msg1728
2011-10-23 22:49:55Henkersetmessages: + msg1724
2011-10-23 22:46:49Henkersetfiles: + fourteen.savegame
messages: + msg1723
2011-10-23 22:45:56Henkercreate