ID:71115
 
Resolved
Fixed in 442
BYOND Version:440
Operating System:Windows Vista Business 64-bit
Web Browser:Opera 9.51
Status: Resolved (442)

This issue has been resolved.
Descriptive Problem Summary: I don't even know speficically what the problem is, it is highly random, but definately related to areas.
The bug is highly random, sometimes it results in a simple error message, which is none-sensical because it is reporting a null.New() error, despite the fact that the area that is created has no New() proc I have defined.
Sometimes, it causes inbuilt procs to behave irregularly. Such as range and view to always return true.
Sometimes it causes other, nonsensical errors to be reported, speficially "BYOND BUG: Bad turf", for no apparent reason.
Othertimes, it simply causes Dream Seeker to stop running properly. In this case, map elements stop responding, any verbs/procs that should be running just stop, the options and messages window can be open, but the profiler cannot. However, windows does not report Dream Seeker as not responding, nor does the trace.bat report it as having crashed. (There is also no infinite loop, as each time the proc that causes this error loops, it is set to put out a message).

Numbered Steps to Reproduce Problem:
Don't even get me started with this, from what I have figured out, it only happens when there is a large number of different areas in the world (over about 50).
But as I said, it is highly random, sometimes it happens, other times it does not. Below is a source code for a game I am working on, it happens a lot in this code.

http://www.byond.com/members/TheMagicMan/files/ BOnline_src.zip

The problem is somehow related to the proc GenArea, if you stop this proc from running none of the above errors will occur.

Code Snippet (if applicable) to Reproduce Problem:


Expected Results:
Things work as they are intended?

Actual Results:
BYOND pretty much breaks down at random?

Does the problem occur:
Every time? Or how often? Randomly
In other games? No idea
In other user accounts? Yes
On other computers? No idea

When does the problem NOT occur?

When there is not a large number of different areas in the world.

Workarounds:
Look above.
Haven't found out much about your bug, but I figured I'd let you know the mass runtime errors produced when a users character is created can be removed if you place
if(!st || !maxst) return

at the top of your HealthToText() and StaminaToText() procs.
I've marked this post as unverified. Hopefully someone else will come along and either prove or disprove it completely.

But so far, I haven't been able to reproduce this bug.
I've been encountering something similar when using Lummox's SwapMaps library. So far it seems to not like a multi-level swapmap; it gives the same error as above: BYOND BUG: Bad turf.
Compile errors with that source: turf\water.dm:313:error:sd_PathTurfs:undefined proc
Falacy wrote:
Compile errors with that source: turf\water.dm:313:error:sd_PathTurfs:undefined proc

You need some of Shadow Darke's libraries.
It appears to be an issue with the block() procedure. Both swapmaps and sd_mapsuite use them, and my testing has shown that to be the culprit.

Try this: create a multi level map.
create a list and add block(locate(1,1,1),locate(world.maxx,world.maxy,world.maxz)) to it.
Now try this:
var/list/turfs = block(locate(1,1,1),locate(world.maxx,world.maxy,world.maxz))
for(var/atom/a in turfs)
world.log<<"[a] [a.x] [a.y] [a.z]"


For me it craps out on the very last turf, (ie at world.maxx, world.maxy, world.maxy) and gives a bad turf error.
CriticalBotch wrote:
It appears to be an issue with the block() procedure.

I found and fixed a bug with block() that affected anything spanning multiple z levels. I believe this is the core of TMM's report as well because with this bug, DS/DD would be trying to look at turf indexes that don't exist.