SphereServer BugTracker - SphereServer
View Issue Details
0002303SphereServerexecutable - windows buildpublic05-04-14 23:5623-04-14 15:12
Kirofus 
XuN 
normalmajoralways
resolvedfixed 
WIN32Windows7
16-06-2013, 0.56b Prerelease 
16-06-2013, 0.56b Prerelease 
Automated (specify build number)
Unicode, Size_Optimise, Minimize_Triggers
None
1840
0002303: thread 'Main' to terminate...
Since I've upgraded from the build #1823 to 0001840, I have problems with the main thread. After few minutes of server up, I receive the following message...

Auto-complete dictionary loaded (contains 143 words).
Option flags: NoItemNaming + NoHouseMuteSpeech
Experimental flags: DiagonalWalkCheck + FixKillTrigger + ItemStacking + ItemStackDrop + NewPositionChecks + SizeOptimize
Admin=fg620362@hotmail.com, URL=www.profania.net, Lang=French, TZ=5
Startup complete. items=157519, chars=9440
Press '?' for console commands
Sphere, Name=Profania 2.5.0, Age=2391, Clients=0, Items=157519, Chars=9440, Mem=187792K
Admin=fg620362@hotmail.com, URL=www.profania.net, Lang=French, TZ=5
15:30:WARNING:(AI_NPC.scp,60)Forcing thread 'Main' to terminate...
15:30:CRITICAL:(AI_NPC.scp,51)'Main' thread hang, restarting...
15:37:WARNING:(AI_Events.scp,177)Forcing thread 'Main' to terminate...
15:44:WARNING:(AI_Events.scp,72)Forcing thread 'Main' to terminate...
See the following script, Its the third return 0.
[EVENTS e_Undead]
ON=@EnvironChange
if (<var0.InSeasonChange>) // Prevent infinite loop during season change.
  return 0
endif

   // Enter "//" before Return 0, if you want to make script working
   // i like the dark
   if (<sector.isdark>) || (<flags>& (statf_nightsight|statf_indoors))
      if (!<tag0.lightstr>)
         return 0
      endif
      anim 011
      bark 4
      str=<tag.lightstr> // restore me.
      hits=<str>
      tag.lightstr=
      karma=<tag0.lightkarma>
      tag.lightkarma=//just dispose of this.
      fame=<tag0.lightfame>
      tag.lightfame=
      flags ^= statf_conjured // no loot if killed.
      return 0 // Line 60
   endif
   // i can't live in light areas. weaken me ? or destroy me ?
   anim 014
   bark 4

   if ( <flags>&statf_conjured )
      remove
      return 1
   endif
   flags |= statf_conjured // no loot if killed.
   hits=0 // Kill
   return 0
No tags attached.
Issue History
05-04-14 23:56KirofusNew Issue
07-04-14 20:12CorujaNote Added: 0002028
09-04-14 00:11KirofusNote Added: 0002031
23-04-14 15:12XuNNote Added: 0002084
23-04-14 15:12XuNStatusnew => resolved
23-04-14 15:12XuNFixed in Version => 16-06-2013, 0.56b Prerelease
23-04-14 15:12XuNResolutionopen => fixed
23-04-14 15:12XuNAssigned To => XuN

Notes
(0002028)
Coruja   
07-04-14 20:12   
It's a infinite loop created by the script, not really a internal server problem

Main loop is a function that never ends, like this

[FUNCTION lol]
SRC.SAY test
SRC.lol //<- this will create a infinite loop

you must check if your script doesnt have something calling a infinite loop
(0002031)
Kirofus   
09-04-14 00:11   
No, this is something about season or light change. I have a custom Season/Light system but some NPCs doesn't like that.
(0002084)
XuN   
23-04-14 15:12   
Script Issue: something must be causing that since there's no problem with this script and anyone more have problems with it. Check that there's nothing making this trigger to call over and over, otherwise post here again.