logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Module crashes with nwnx_funcs

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Flutterby



Joined: 01 May 2012
Posts: 11

PostPosted: Thu Aug 16, 2012 13:15    Post subject: Module crashes with nwnx_funcs Reply with quote

Hey there,

The nwn1 pw I'm a developer for has recently made the switch to nwnx. We don't use it heavily (yet), just to switch around some feats and abilities on character creation. Since the switch, however, the module crashes significantly more often than before, amd severely enough that the watchdog process doesn't restart it.
Our server runs windows xp 32 bit. Any idea what might cause this?

Thanks,
Flutterby (www.worldofcaenyr.com)


Last edited by Flutterby on Mon Aug 20, 2012 20:49; edited 1 time in total
Back to top
View user's profile Send private message
Brutus



Joined: 16 Aug 2012
Posts: 1

PostPosted: Thu Aug 16, 2012 21:05    Post subject: Reply with quote

Another one of the WoC staff chiming in. I think I may have found the issue, and just want to confirm.

I was browsing your forums, and noticed a link to a page here, which states that the "UpdateIntervalProcess'" should not be less than 30 (ours was set to 5). When I get home, I will change to 60. Is that a hard and fast rule there, and would possibly be the issue behind our sudden instability?

Thanks, Brutus Smile
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Aug 17, 2012 13:05    Post subject: Reply with quote

Yes - that may be the cause.

nwserver is single threaded.

When a long script is running, it essentially freezes the gui of the server.
nwnx has a built in process monitor, that tries to detect crashes, and recover.

However, it can find false positives if your settings are too low.

I set mine to be

10 Second Interval with 5 Retries

Essentially - will only kill a server, if its been locked up for 50 seconds or more.

You can in theory get the thresholds lower, and stable, if you have efficient scripts.

What locks the GUI is most likely scripts that take a long time to finish.
Best thing to do, is to make clever use of ExecuteScript, as well as DelayCommand

These can break up long winded Loop statements to stretch the work load over a longer duration, but free-ing up the main server thread, without locking the GUI up.

TMI Plugin- although good for extending the length of loops and scripts you can run, can also be a dangerous tool.
The TMI Warning although annoying to look at, does save your server from scripts that would lock the GUI.

Many advanced nwnx users tend to increase the TMI Limit, to allow their complex scripts to run, but keeping it at default value, can protect your server from long never ending scripts.
Back to top
View user's profile Send private message
Flutterby



Joined: 01 May 2012
Posts: 11

PostPosted: Mon Aug 20, 2012 20:49    Post subject: Reply with quote

It turns out to be a nwnx_funcs problem. I've hooked an onexit script, and it looks like sometimes, a player entering the module triggers that onexit script, making the module crash. I've now unhooked the script and it seems to be stable.

The odd thing is, I'm not able to reproduce this on my virtual machine. The main difference is that my VM runs XP Professional while the server runs XP Home. On the server, the onexit script is not triggered by players leaving, only by some players entering who thereby crash the mod.

Any smart ideas, anyone?
Back to top
View user's profile Send private message
Flutterby



Joined: 01 May 2012
Posts: 11

PostPosted: Mon Aug 20, 2012 20:49    Post subject: Reply with quote

By the way, I doubt that this post is in the forum where it belongs. If someone could please move it, I'd be very happy Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group