PenUltima Online

It is currently Sat Aug 30, 2008 2:57 am

All times are UTC - 8 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Shard crash boat - POL096.1-2006-07-02 Vestal Virgin
PostPosted: Sun Aug 20, 2006 9:12 am 
Offline

Joined: Sun Feb 05, 2006 2:00 am
Posts: 91
Location: Denmark
After running stabile for 3 weeks on pol96.1, we had our first shard crash. I restarted the shard, and hoped it was a one time event. The last night, about 8 days after the first crash, it happened again.


Both time this was printed in the console.
Quote:
[08/19 11:33:53] Unhandled Exception! Writing Minidump file.
This file with explanation and last lines from log files should be given to the development team.
Saved dump file to 'POL096.1-2006-07-02 Vestal Virgin-20060818135657-0.dmp'
Last Script: pkg/items/boat/boat.ecl PC: 225


boat.lst (about 50 lines before and after line 225)
Code:
175: if false goto 180
DestroyBoatForce( "Boat decay" );
176: "Boat decay"
177: makelocal
178: jmp userfunc @478
179: #
AddBoatToGlobalRegistry ();
180: makelocal
181: jmp userfunc @438
182: #
RegisterForSpeechEvents (tillerman, 14, LISTENPT_HEAR_GHOSTS);
183: global #13
184: 14L
185: 1L
186: Func(3,39): RegisterForSpeechEvents
187: #
var nextsound := ReadGameClock() + 5;
188: decl local #4
189: Func(3,22): ReadGameClock
190: 5L
191: +
192: :=
193: #
var driftcounter := 1;
194: decl local #5
195: 1L
196: :=
197: #
var x, y;
198: decl local #6
199: #
200: decl local #7
201: #
while (boat)
202: global #12
203: if false goto 436
case (state)
204: global #9
205: casejmp
   1: @206
   2: @367
   0: @406
   default: @418
if (ReadGameClock () > nextsound)
206: Func(3,22): ReadGameClock
207: local #4
208: >
209: if false goto 217
PlayBoatSounds ();
210: makelocal
211: jmp userfunc @876
212: #
nextsound := ReadGameClock() + 5;
213: Func(3,22): ReadGameClock
214: 5L
215: +
216: local4 :=
x := boat.x;
217: global #12
218: get member id 'x' (0)
219: local6 :=
y := boat.y;
220: global #12
221: get member id 'y' (1)
222: local7 :=
MoveBoatRelative (boat, relative_direction);
223: global #12
224: global #10
225: Func(5,0): MoveBoatRelative
226: #
if (x == boat.x)
227: local #6
228: global #12
229: get member id 'x' (0)
230: ==
231: if false goto 302
if (y == boat.y)
232: local #7
233: global #12
234: get member id 'y' (1)
235: ==
236: if false goto 248
state := STATE_STATIONARY;
237: 0L
238: global9 :=
PrintTextAbove (tillerman, "Aaargh!  We've run ashore!");
239: global #13
240: "Aaargh!  We've run ashore!"
241: 3L
242: 1000L
243: Func(3,28): PrintTextAbove
244: #
SmackEveryone ();
245: makelocal
246: jmp userfunc @1600
247: #
if( (boat.y >= 0) and (boat.y <= 10) )
248: global #12
249: get member id 'y' (1)
250: 0L
251: >=
252: global #12
253: get member id 'y' (1)
254: 10L
255: <=
256: &&
257: if false goto 275
if (boat.y < y)
258: global #12
259: get member id 'y' (1)
260: local #7
261: <
262: if false goto 274
MoveObjectToLocation(boat, boat.x, 4085, boat.z, boat.realm, MOVEOBJECT_NORMAL)
263: global #12
264: global #12
265: get member id 'x' (0)
266: 4085L
267: global #12
268: get member id 'z' (2)
269: global #12
270: get member id 'realm' (112)
271: 0L
272: Func(3,13): MoveObjectToLocation
273: #
274: goto301
elseif( (boat.y >= 4086) and (boat.y <= 4096) )



boat.src: (PC 225 seems to match 'MoveBoatRelative (boat, relative_direction);' in line 11 of the code.
Code:
   while (boat)
      case (state)
         STATE_MOVING:
            if (ReadGameClock () > nextsound)
               PlayBoatSounds ();
               nextsound := ReadGameClock() + 5;
            endif

            x := boat.x;
            y := boat.y;
            MoveBoatRelative (boat, relative_direction);

            if (x == boat.x)

               if (y == boat.y)
                  state := STATE_STATIONARY;
                  PrintTextAbove (tillerman, "Aaargh!  We've run ashore!");
                  SmackEveryone ();
               endif

                                        //the world is round, so see if we need to wrap
                   if( (boat.y >= 0) and (boat.y <= 10) )
                                                if (boat.y < y)
                                                        //MoveBoatXY (boat, boat.x, 4085);
                                                        MoveObjectToLocation(boat, boat.x, 4085, boat.z, boat.realm, MOVEOBJECT_NORMAL);
                                 endif
                              elseif( (boat.y >= 4086) and (boat.y <= 4096) )
                                 if (boat.y > y)
                                         //MoveBoatXY (boat, boat.x, 11);
                                                        MoveObjectToLocation(boat, boat.x, 11, boat.z, boat.realm, MOVEOBJECT_NORMAL);
                                 endif
                         endif
            else
               //the world is round, so see if we need to wrap
               if( (boat.x >= 0) and (boat.x <= 10) )
                  if (boat.x < x)
                                                        MoveObjectToLocation(boat, 5099, boat.y, boat.z, boat.realm, MOVEOBJECT_NORMAL);
                     //MoveBoatXY (boat, 5099, boat.y);
                  endif
               elseif( (boat.x >= 5108) and (boat.x <= 5118) )
                  if (boat.x > x)
                                                        MoveObjectToLocation(boat, 21, boat.y, boat.z, boat.realm, MOVEOBJECT_NORMAL);
                     //MoveBoatXY(boat, 21, boat.y);
                  endif
                                        endif

            endif
            sleepms (ms_delay_between_moves);
            while (events_waiting())
               process_event (wait_for_event(0));
            endwhile
         STATE_DRIFTING:
            if (ReadGameClock() > nextsound)
               PlayBoatSounds();
               nextsound := ReadGameClock()+5;
            endif
            if (driftcounter > 15)
               MoveBoatRelative (boat, RandomInt(8));
               driftcounter := 1;
            else
               driftcounter := driftcounter + 1;
            endif
            sleepms (DELAY_SLOW);
            while (events_waiting())
               process_event (wait_for_event(0));
            endwhile
         STATE_STATIONARY:
            var ev := wait_for_event (120);
            if (ev)
               process_event (ev);
            endif
      endcase

      //occasionally, monsters spawn
      if ( ReadGameClock() > nextencounter )
         if( DoEncounter() )
              nextencounter := ReadGameClock() + 180;
                        else
                             nextencounter := ReadGameClock() + Randomint(180);
                        endif
      endif
   endwhile



From what I could tell, the problem happens rarely when 'MoveBoatRelative' is called. I have tried to call it with uninitilised variables, but it only lead to an error in the the return statemnt(as it should), not a shard crash.

_________________
When was the last time, you did something for the first time?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 20, 2006 9:51 am 
Offline
POL Core Developer

Joined: Mon Jan 30, 2006 9:28 am
Posts: 292
Location: Germany, Bavaria
I have to install the debug engine on this PC first to analyze your dump, but it could be an older problem with border bounds. so can u enter some LogToFile or SysLogs to log x, y and relative_direction? in normal case something is inside the dump, but nobody knows... and maybe it's the reason?!?

Shinigami


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 20, 2006 1:55 pm 
Offline

Joined: Sun Feb 05, 2006 2:00 am
Posts: 91
Location: Denmark
Ill add a syslog just before the MoveBoatRelative call.
When the first crash happened, a player did contact me and told me he was wrapping when the shard crashed.
I then change 'MoveBoatXY (boat, boat.x, 4085);' to 'MoveObjectToLocation(boat, boat.x, 4085, boat.z, boat.realm, MOVEOBJECT_NORMAL);'. But since it happened again, Its not sure that is the problem.

_________________
When was the last time, you did something for the first time?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl