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 
 
Skywing's NWNX4 improvements
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Mar 02, 2008 0:18    Post subject: Re: Skywing's NWNX4 improvements Reply with quote

Papillon wrote:
I have no problems handing out write access, but I am not sure to which repository. I think it would be best to have a vanilla svn which receives the changes which are accepted into the next NWNX version (i.e. the current one), and a more liberal svn that helps with coordination between multiple programmers.

Thoughts ?

Skywing wrote:
How about just having a 'stable' branch and otherwise keep it all in the same repository, leaviing head as the new-feature-development branch or the like?
It doesn't matter for me how much NWNX4 repositories will exist, I'm just saying that at least a 'liberal' SVN is needed.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Sun Mar 02, 2008 0:35    Post subject: Re: Skywing's NWNX4 improvements Reply with quote

virusman wrote:
Papillon wrote:
I have no problems handing out write access, but I am not sure to which repository. I think it would be best to have a vanilla svn which receives the changes which are accepted into the next NWNX version (i.e. the current one), and a more liberal svn that helps with coordination between multiple programmers.

Thoughts ?

Skywing wrote:
How about just having a 'stable' branch and otherwise keep it all in the same repository, leaviing head as the new-feature-development branch or the like?
It doesn't matter for me how much NWNX4 repositories will exist, I'm just saying that at least a 'liberal' SVN is needed.


I'm more used to CVS than SVN. In CVS it was nicer to have things in one repository, however, as that made it much easier to pull out specific diffs to apply to a particular branch (e.g. two -j merge). With two repositories you would have to manually make diffs and patch them in. Not sure if that applies directly to SVN, however.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Mar 02, 2008 1:30    Post subject: Re: Skywing's NWNX4 improvements Reply with quote

Skywing wrote:
I'm more used to CVS than SVN. In CVS it was nicer to have things in one repository, however, as that made it much easier to pull out specific diffs to apply to a particular branch (e.g. two -j merge). With two repositories you would have to manually make diffs and patch them in. Not sure if that applies directly to SVN, however.
Yes, most projects use SVN repository for current (unstable) development, tags for marking released versions, branches for some experimental work and separate downloads for official stable soruces of released versions.
SVN is like CVS, just a bit better. Smile
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Mar 02, 2008 11:21    Post subject: Reply with quote

It's the same for SVN, true. You can not merge changes between two separate repositories.

Unfortunately, I did not use the branch,tag,trunk directory structure this time. I'll probably have to restructure the repository... I'll see what I can do.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Mar 02, 2008 12:00    Post subject: Reply with quote

Ok, now there is a new src_release/ directory in the NWNX4 svn, based on revision 19.

Please leave this directory alone for now.

Also, if you commit to src/, please make sure that you do not break anything. Only commit code that compiles and no cowboy coding, please.

Everyone who wants write access, please send me a PM with your desired username and password.

Good to have you on board, gentleman.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Mar 15, 2008 0:36    Post subject: Reply with quote

So, anyone still interested in write access Shocked ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Sat Mar 29, 2008 1:12    Post subject: Reply with quote

I suspect I could put it to good use, though not necessarily quickly. PM sent...
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
dmguild



Joined: 20 Sep 2007
Posts: 15

PostPosted: Mon Jun 09, 2008 0:49    Post subject: Reply with quote

I have installed the xp_bugfix.dll and you version of the NWNX4 extender.

The system has been running for five hours and I've had five crashes.

I cannot find anything in the dumps directory here is a copy of the section in the nwnx.ini where i placed the switches.

Quote:

# Command line parameters to start the server with
# default: no parameters
parameters = -module "Skullport" -servername "The Port of Shadow MOTB" -port xxxx-pvp 2 -elc 0 -autosaveinterval 0 -publicserver 1 -maxclients 32 -ilr 1 -gametype 3 -difficulty 3 -pauseandplay 0 -oneparty 0 -servervault 1 -dmpassword xxxx


crashDumpDir = f:\games\nwn2\dumps
logPacketDir = f:\games\nwn2\dumps
initTimeout = 30000

# Should NWNX restart the server if the server process has gone away ?
# 0 = do not restart the server
# 1 = restart the server
# default: 1
processWatchdog = 1



And here is the starup log

Quote:

NWN Extender 4 V.0.0.8
(c) 2007 by Ingmar Stieger (Papillon)
visit us at http://www.nwnx.org

* Loading plugins...
* Loading plugin xp_bugfix.dll: Successfully registered as class: BUGF
* Loading plugin xp_mysql.dll: Successfully registered as class: SQL
* Loading plugin xp_time.dll: Successfully registered as class: TIME
* Disabling general protection fault error dialog.
* NWNX4 activated.



I'm pretty sure I may be doing something wrong, but I do not know what? Placement of the additional switches?

Thanks
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Mon Jun 09, 2008 1:06    Post subject: Reply with quote

You can use xp_bugfix with or without my version of NWNX4; it's compatible with the stock release. However, you won't have the crash dump writer logic with the standard version.

As far as the crash dump support goes, this may need a newer version of dbghelp.dll than ships with your OS depending on which Windows version you are running.

Try installing the Debugging Tools for Windows and copying dbghelp.dll from the DTW installation directory to the directory containing nwn2server.exe.

If you look at the controller log file or the NWNX GUI log, and you see an error relating to MiniDumpWriteFile, then the problem is likely related to an old dbghelp.dll. (Could also be that the dump path doesn't exist, or that you don't have access to write to it from the user that runs the controller on NWNX gui, but most likely, I'd imagine it's probably an out of date dbghelp that doesn't support all the features that my build of NWNX requests when writing a dump.)
Back to top
View user's profile Send private message
Dragonsbane777



Joined: 07 Sep 2005
Posts: 23
Location: Fort Lauderdale, Florida

PostPosted: Tue Jun 10, 2008 3:00    Post subject: Reply with quote

You, sir, are my hero Smile

Since installing this plugin, my server never crashes. As in, it has not since I installed it, I now reset the server at 100 hours.

Freaking awesome work bro.
Back to top
View user's profile Send private message Send e-mail
dmguild



Joined: 20 Sep 2007
Posts: 15

PostPosted: Tue Jun 10, 2008 6:57    Post subject: Reply with quote

Still nothing. I ensured I had the newest dbghelp.dll and double checked the log file path. But I still have no logs =(

I also checked the user logged in is the administrator of that XP machine.

The server crashed 9 times today and 13 times yesterday.

I'm not sure which file to look in for "If you look at the controller log file or the NWNX GUI log, and you see an error relating to MiniDumpWriteFile"
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Fri Jun 13, 2008 6:31    Post subject: Reply with quote

If you are using NWNX_GUI.exe, then the GUI has a log message window where any errors relating to dump writing will go. If you are using NWNX_Controller (in service or console mode), then the log messages should go to the nwnx_controller.txt log.

N.B. Going to be updating xp_bugfix for 1.13 RTM when that comes time, as to the best of my knowledge some of these problems, at the least, are still present.

The old xp_bugfix will silently turn itself off if used with a non-1.12 build. Thus, once 1.13 is RTM, you will need an updated xp_bugfix.dll to once again work around any of these bugs that remain in the RTM code.

Still working with OEI on getting some of these problems fixed in code on their end. Have two additional crashes (dm client attempting to toggle plot item status on certain classes of objects, and what appears to be a crash when attempting to log in a character with a servervault .bic file that fails to load) which I'll be updating xp_bugfix for at some point as well.

Have also done some more research onto the pathing hang problem and have the basis for a more reliable fix for that problem which should allow recovery from the "dereference 0xdeadbeef" issue that sometimes occurs when a JStar node gets freed to the pool and the memory pool linked list is treated as a JStar node parent pointer (until we reach the end of list 0xdeadbeef marker).
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Fri Jun 13, 2008 16:31    Post subject: Reply with quote

One other thing to consider - for dump file writing to work, you need to be using one of { NWNX4_GUI.exe/NWNX4_Controller.exe } AND the NWNX4_Hook.dll from the above distribution. You may use the standard set of plugins, including any custom plugins you've got.

The crash dump writing logic requires code in the controller/GUI process as well as some logic in the hook DLL to detect that a crash occured and pass a notification of the fault off to the controller/GUI process, which writes the minidump in a safe context isolated from any heap corruption that may have occurred in the crashed process.
Back to top
View user's profile Send private message
mckillroy



Joined: 16 May 2005
Posts: 40

PostPosted: Mon Jun 16, 2008 22:59    Post subject: Reply with quote

I tried it on Wine / Solaris, and it couldn't start the server unfortunately, as
opposed to the new version based on detours.
But since the Detours version also seems not to load the hook I think I'll dig a
bit into your sourcecode and try to make it run using my fallback method with
using a PE edited nwn2server.

I'll report back here when done.

/waves
McK.
_________________
/McKillroy
a.k.a Yorlik
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Sun Jun 22, 2008 6:56    Post subject: Reply with quote

I have merged all of these enhancements to virusman's SVN with the Detours-enabled pre-1.09 NWNX4. Once we do a build from that repository, I would suggest cutting over to that NWNX4 release instead of my modified 1.08 release (or the plain 1.08 release).

For the next build (which will be done off of the pre-1.09 trunk at virusman's SVN), I have also made the following changes in addition to all the ones above:

- Fixed new memory leaks that were introduced post-1.08 outside of my branch
- Added graceful shutdown support. The server will attempt to do a graceful shutdown when stopping the service or stopping the server via the GUI. There is a config parameter "gracefulShutdownTimeout" that describes the count in milliseconds of how long to wait for a graceful shutdown to complete before hard killing the server process. The default is 10000 (10 seconds). A graceful shutdown will log players cleanly out of the server (i.e. likely without crashing them), and will save all character bics properly.
- Added an optional broadcast message sent before the server shuts down for graceful shutdown (set via the "gracefulShutdownMessage" config parameter). Depending on timing, you may see the "Server has gone down" message box and be booted before it is displayed to clients. The default is to not try and send any message.
- Fixed the new undocumented "gamespyDelay" config parameter (count in seconds to wait since start of server process before starting GameSpy ping probes) to work after the first server boot per NWNX controller/GUI instance.
- Dynamic linked to DbgHelp.dll for Windows 2000 support out of the box, if you're still using Win2K (for crash dump support).
- Downgrade the dump files created gracefully on downlevel platforms with ancient DbgHelp.dll versions to provide less useful information but still write a dump file instead of failing completely. We also log a message that indicates how to upgrade DbgHelp for full crash dump support if we detect this condition. I still recommend installing the latest DbgHelp from the WinDbg distribution if you are using Windows XP or earlier.
- Various code cleanup.
- Fixed Detours makefile configuration being broken with respect to dependencies and trying to build the x64 Detours on 64-bit Windows platforms (if you are building on 64-bit Windows). NWNX4 always uses 32-bit Detours.
- Fixed service stop code for NWNX4_Controller to be much more intelligent.
- Log file appending instead of overwriting.
- Linked nwn2srvutil/nwn2srvutil_remote into the main .sln.

Still to do:

- Still need to merge in xp_bugfix
- Still need to merge in NWN2Lib
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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