GAME/EDITING: Continual loops of teleporters will crash RTC

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13791
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

GAME/EDITING: Continual loops of teleporters will crash RTC

Post by Gambit37 »

Unsurprisng really, but if you create some kind of structure that uses teleporters to move items around a dungeon and then back to the beginning, RTC will crash with no errors.

This applies only when all teleporters have the same delay settings for activation/deactivation.

It's fine if you stagger the activation/deactivation.

Here's a sample of it broken:
http://homepage.ntlworld.com/matt_hill/ ... llsame.txt

Here's a sample of it working:
http://homepage.ntlworld.com/matt_hill/ ... tagger.txt

Put the chest on the pad in front of you.

I assume this error is due to some kind of overflow because everything is being processed at once.

NOTE: The staggered sample is a good text of RTCs performance. Simply stand still watching the chest being rotated --- on my machine (which is pretty powerful) it's generally fast but every now and then there is a hiccup and some lag, and the mouse goes all smooshy.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

I've actually fixed the overflow which causes it to crash without warning already - now it crashes and gives you enough information in the file to work out why (there's a stack of teleporter function calls that repeatedly loop around eachother!).

On the matter of it crashing in the first place, I think that this is the correct behaviour. In the sample dungeon you have told it to teleport an item from one place to another and then back again ad infinitum with no delay whatsoever - it tries its best to comply but it just can't! I happy to classify this as a bug in the dungeon rather than a bug in RTC engine especially now the crash diagnostics give you a shot at working out the offending teleporters.
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

I took a look at this, and yes you CAN crash the engine with that particular teleporter set up, I looked at other ways of achieving the same (functional teleporters not crashes) @Gambit Look in your hotmail dude will that do your job. It is simpler but it does the same job.
Don't be scene or herd!
User avatar
Gambit37
Should eat more pies
Posts: 13791
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I didn't get any attachement from you on that hotmail email.

I wasn't actually trying to make a setup that have 0 delays, I was simply testing to see if RTC would generate warnings. I knew it would probably crash due to overflow issues.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

The folks at FTL must have gotten caught by this
at one time. They put a limit of 1000 moves....like
teleporting, falling into pits. Then it simply stops and
leaves the object wherever it was after the 1000th move.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Really? I've had a freezing crash accidentally doing this in DM (havign a chain of teleporters linking to each other and forgettign to have a delay and break)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Yes, really. But maybe it is only for objects and
not the party or something. Or maybe it simply
does not work. Here is a piece of it from Code11f52.cpp:

Code: Select all

    for (LOCAL_30=1000; LOCAL_30!=0; LOCAL_30--)
    { // Limited teleportation??? 1000 seems sufficient.
      pdA0 = d.LevelCellFlags[newX];
      D6W = pdA0[newY];
      D5W = sw(D6W >> 5);
      if (D5W == roomTELEPORTER)
      {
        if ((D6W & 8)==0) break;

      ........
      ........
      ........

    }; // for (LOCAL_30)
 
Post Reply