SphereServer BugTracker - SphereServer
View Issue Details
0001596SphereServerexecutable - linux buildpublic30-04-09 14:3605-05-09 18:58
Earlgrey100 
 
normalcrashsometimes
closedunable to reproduce 
 
 
Not Available
None
DrinkIsFood
0001596: SECTOR-LIGHT change with on@environchange crashes server
Hello everybody,

i'm running a serverclock ingame which controls the lightlevel of the whole map.
This clock "tells" the sectors which lightlevel is used by now. The clock sends via serv.allclients the lightvalue to the char and to a tag.

If the char changes an environment, the script checks if the sectorlightvalue is equal to the actual lightvalue stored in tag.helligkeit.

This causes the server to crash! We've tried this with "d" (eval) and without.
It crashes not everytime! But very often.
The server shuts down without any comment in the log.

=========================

SECTOR.LIGHT=<dSRC.TAG.HELLIGKEIT>

=========================
Hope you can help me!

EarlG100


Spheretype is 56b up to date nightly on Linux Debian 5.
No tags attached.
Issue History
30-04-09 14:36Earlgrey100New Issue
30-04-09 14:36Earlgrey100Nightly Version => Not Available
30-04-09 14:36Earlgrey100Experimental Flags => None
30-04-09 14:36Earlgrey100Option Flags => DrinkIsFood
30-04-09 16:54MrSugarCubeStatusnew => closed
30-04-09 16:54MrSugarCubeNote Added: 0000194
30-04-09 16:54MrSugarCubeResolutionopen => no change required
30-04-09 17:55Earlgrey100Statusclosed => feedback
30-04-09 17:55Earlgrey100Resolutionno change required => reopened
30-04-09 17:55Earlgrey100Note Added: 0000195
02-05-09 04:32MrSugarCubeNote Added: 0000200
05-05-09 18:38Earlgrey100Note Added: 0000213
05-05-09 18:58MrSugarCubeStatusfeedback => closed
05-05-09 18:58MrSugarCubeResolutionreopened => unable to reproduce
14-11-10 19:54MrSugarCubeCategoryexecutable - linux => executable - linux build

Notes
(0000194)
MrSugarCube   
30-04-09 16:54   
Changing the light level will cause the @EnvironChange trigger to be fired. Since your script is changing the light level inside the @EnvironChange trigger this is causing the trigger to be fired again (and again and again, etc) indefinately until the server eventually crashes.
(0000195)
Earlgrey100   
30-04-09 17:55   
Thank you for your instantly answer MrSugarCube.

I'm sorry for bugging you again with that topic, but I forgot to post, that we already prevented the neverending (story) function with:

if (<eval <SRC.SECTOR.LIGHT>> != <eval <SRC.TAG.HELLIGKEIT>>)

Because of this, the environchange should be fired only once per change.

We've been using this script for at lest 4 years on an 55i shard and it worked without any error. Since migrating to 56b it (sorry) sucks ;). We've checked the scriptcode multiple times... Even the allknowing *G* uodev.de couldn't find the answer to our problem...

Thank you for reading.

Earlg100
(0000200)
MrSugarCube   
02-05-09 04:32   
I have no problems when using the following trigger. I suspect that you may have an invalid light level in your tag, since trying to set it to an out-of-range value will still cause @EnvironChange to be triggered again (and since the light is not set to the value you expect, you would then continue to set the light level).

Of course since you're only revealing your script one line at a time I can only guess as to what could be happening in it, perhaps you're also setting the weather in there or doing something else to set off a different loop. Maybe there's even a SERV.SHUTDOWN in there. :P

ON=@EnvironChange
    IF (<ISEMPTY <TAG.LIGHTLEVEL>>)
        RETURN 2
    ENDIF
    SERV.LOG @@EnvironChange(<TAG0.LIGHTLEVEL>, <SECTOR.LIGHT>)
    IF (<TAG0.LIGHTLEVEL> >= 0) && (<TAG0.LIGHTLEVEL> <= 30)
        IF (<SECTOR.LIGHT> != <TAG0.LIGHTLEVEL>)
            SECTOR.LIGHT = <TAG0.LIGHTLEVEL>
        ENDIF
    ENDIF
    RETURN 2
(0000213)
Earlgrey100   
05-05-09 18:38   
Thank you for your help!
I modified my scripts now to work without the entry in the environchange section.

This problem is no bug and can be closed!