View previous topic :: View next topic |
Author |
Message |
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Wed Jan 17, 2007 23:41 Post subject: NWN2 Server Log says "No NWNX4" |
|
|
Not sure where to go with this one.
I have NWN2 installed in C:\NWN2\
I have NWNx4 installed in C:\NWN2Utils\nwnx\
I copied madCHook.dll to C:\NWN2\
Temporary files in C:\TEMP\NWN2\
I have a shortcut to the controller set up with -interactive in the NWNx4 directory, and it starts NWServer and loads the module successfully.
I'm using the nwnx_demo_mysql module.
But the server log says:
Code: |
[Wed Jan 17 16:28:44] Loading Module: nwnx_demo_mysql
TRANS: [Wed Jan 17 16:28:44]Not decompressing as not loading from a previously visited module.
TRANS: [Wed Jan 17 16:28:44]Setting up Stall Event now.
[Wed Jan 17 16:28:44]---- Server Options ----
## SERVER OPTIONS REMOVED FOR SPACE
---- End Server Options ----
No NWNX4
.
|
I can't find any nwnx.txt log file anywhere.
Any idea what might be going wrong? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Thu Jan 18, 2007 1:37 Post subject: |
|
|
Please check nwnx.ini and make sure that paths in there are correct. The logfiles are written to the nwnx directory, you should have a couple of .txt files in there ! _________________ Papillon |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Thu Jan 18, 2007 1:47 Post subject: |
|
|
Paths are correct, unless they are case sensitive? I will make another check.
But I used FileMon from sysinternals.com; there did not appear to be any attempts to write to a nwnx.txt file.
The NWNX hook DLL does seem to be successfully injected into the nwserver process. |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Thu Jan 18, 2007 6:46 Post subject: |
|
|
Excerpt from my nwnx.ini file (I've stripped out comments & made no other changes).
You can see that I've changed nothing but the directories and the parameters command. The directories seem to be getting picked up properly; I changed the temp directory and the nwserverlog.txt file was created in a different place; I changed the nwn2 directory and it couldn't find nwserver.
Still not seeing any files created in the nwnx directory.
Code: |
# NWNX4 configuration file
nwn2 = C:\NWN2\
nwn2temp = C:\TEMP\NWN2\
parameters = -module nwnx_demo_mysql
processWatchdog = 1
gamespyWatchdog = 1
gamespyPort = 5121
gamespyInterval = 30
gamespyTolerance = 4
restartDelay = 5
noGPFaultErrorBox = 1
# restartCmd = nwnx_restart.cmd
|
Contents of the nwnx directory:
Code: |
Directory of C:\NWN2Utils\nwnx4
01/31/2006 03:27 PM 126,464 madCHook.dll
11/18/2006 09:52 PM 1,732 nwnx_time.erf
11/18/2006 09:52 PM 2,199 nwnx_include.erf
11/26/2006 10:52 AM 188,416 xp_time.dll
11/26/2006 11:48 AM 61 OFF xp_sqlite.ini
12/02/2006 06:10 PM 167,936 NWNX4_Controller.exe
12/02/2006 06:13 PM 200,704 NWNX4_Hook.dll
12/02/2006 06:14 PM 1,544,192 xp_mysql.dll
12/05/2006 10:55 PM 516,096 OFF xp_sqlite.dll
12/09/2006 10:57 AM 20,960 nwnx_sql.erf
12/10/2006 10:44 AM 22,983 licence.txt
01/15/2007 10:42 PM 183 xp_mysql.ini
01/15/2007 10:46 PM <DIR> ..
01/15/2007 10:46 PM <DIR> .
01/15/2007 10:46 PM 667 start NWNX4_Controller.lnk
01/17/2007 11:39 PM 2,362 nwnx.ini
|
The .lnk (shortcut) file just adds the -interactive command-line option. |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Thu Jan 18, 2007 17:08 Post subject: |
|
|
OK, tried a couple of other things, but I still don't know why it hadn't been working.
First -- changed to the NWNx4Demo module instead of direct to the MySQL demo.
Second -- instead of using a shortcut to launch NWNX, I launched from a command prompt. That still doesn't work every single time, though; any idea what might be going wrong?
What I'm seeing in the launch window is just:
Code: |
C:\NWN2Utils\nwnx4>NWNX4_Controller.exe -interactive
NWN Extender 4 Server Controller V.0.0.6
(c) 2006 by Ingmar Stieger (Papillon)
visit us at http://www.nwnx.org
Running in interactive mode.
Press enter to stop the controller.
NWNX will continue to run within nwnserver.
|
Note that when it's not working, I am NOT getting the message, "* Hook installed and initialized succesfully", although when I use Process Explorer (from www.sysinternals.com) to look at the nwn2server process, NWNX4_Hook.dll is listed as one of the DLLs attached to the process.
So it looks like it's somehow failing before it gets to the point where it starts writing out its log files, which is why I wasn't seeing any.
I don't think there's anything unusual about my system; I'm running Windows XP Home, SP2; I run AVG as my antivirus software. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Jan 19, 2007 16:22 Post subject: |
|
|
Hmm, this sounds like the IPC connection between the controller and the server can not be established... do you have Visual Studio on your PC ? I could send you a special build which gives more information then.
Right now, I have no clue why this would not work. Your setup seems to be ok. Do you have another computer where you could test ? _________________ Papillon |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Fri Jan 19, 2007 18:34 Post subject: |
|
|
The only other computer I can test on easily is running 64 bit Windows XP, which is likely to introduce its own problems...
I don't currently have Visual Studio on the PC (well, except for C# Express), but I could install VS6.0 or any of the other Express products on there, if that would be useful. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Jan 22, 2007 0:09 Post subject: |
|
|
It might be enough if you just install the platform sdk (cf. this thread) - you just need to be able to run debug builds on your machine. I think it can be safely uninstalled afterwards.
I'll upload a debug version of 1.06 soon and will post a link to it here. _________________ Papillon |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Mon Jan 22, 2007 4:10 Post subject: |
|
|
Ah! I seem to have missed that thread. I will install both VC++ Express & the Platform SDK. |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Tue Jan 23, 2007 15:39 Post subject: |
|
|
What version of wxWidgets are you using? Will it work with the December 2006 release (v. 2.8.0), or should version 2.6.3 be used? (Or even some other version?
Thanks. |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Tue Jan 23, 2007 22:14 Post subject: |
|
|
I think wxWidgets is statically linked, so you should not need a separate install of it. _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Mon Jan 29, 2007 0:31 Post subject: |
|
|
Well, it's occasionally failing to connect to the server (e.g. NWNXClient::Connect returns false).
If I turn the logs on, I get messages like:
Code: |
Trace: (TRACE_VERBOSE) IPC Server MyNWNXServer 4064 connecting (DDE)
Error: Failed to create connection to server 'MyNWNXServer 4064' on topic 'NWNX SERVER': a client's attempt to establish a conversation has failed.
Trace: (TRACE_VERBOSE) Client host="localhost" port="MyNWNXServer 4064" topic="NWNX SERVER" failed to connect
|
I don't know why the connection is failing -- Using Process explorer, the nwserver process IS at PID 4064, and NWNX4_HookD.dll is being linked in.
I'm not quite sure where to go from here. What's my next step? I at least need a pointer on what I need to do to do just-in-time debugging on the DLL; although I've done it in the past, the last time was probably in 2000, and I've forgotten all the details (which Microsoft has probably changed anyway.) So a pointer to a tutorial on debugging DLLs would be useful.
Thanks. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Jan 30, 2007 9:35 Post subject: |
|
|
It seems like you know what you are doing , so here is what I'd do
Check out how the log file is created in hook.cpp, function init():
Code: | wxString logfile = *nwnxhome + wxT("\\nwnx.txt");
logger = new wxLogNWNX(logfile, header);
|
Then move that code to the top of startIPCServer() and give it a fixed filename, e.g. c:\nwnx.txt. The output that will be written to that file, especially that from startIPCServer() should point to the problem. From what you posted so far, I guess it will be something like
Code: | wxLogMessage(wxT("* IPC Server %s failed to start"), servername.c_str()); |
Let's confirm this before we continue. _________________ Papillon |
|
Back to top |
|
|
Katy
Joined: 16 Jan 2007 Posts: 17
|
Posted: Tue Jan 30, 2007 15:54 Post subject: |
|
|
Papillon wrote: | It seems like you know what you are doing |
Mu-ha-ha, I have fooled you all!
Did a quick test -- hardcoding the logfile location in NWNX4Hook | hook.cpp | startIPCServer as you suggested.
That logfile shows...
Code: |
NWN Extender 4 V.0.0.6
(c) 2006 by Ingmar Stieger (Papillon)
visit us at http://www.nwnx.org
* IPC Server MyNWNXServer 3688 started (DDE)
* NWNX4 shutting down...
* NWNX4 shutdown successfull.
|
And the regular server logfile shows:
Code: |
Trace: (TRACE_VERBOSE) Reading inifile c:\NWN2Utils\nwnx4 source\bin\debug\nwnx.ini
Debug: Searching for function to hook
Debug: SetLocalString hooked at 0x5172b0
* Loading plugins...
Debug: Enumerating plugins in current directory
* Disabling general protection fault error dialog.
* NWNX4 activated.
Trace: (TRACE_VERBOSE) OnDisconnect()
* NWNX4 shutting down...
* NWNX4 shutdown successfull.
|
I will take another look later; perhaps add some additional logging. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Wed Jan 31, 2007 10:08 Post subject: |
|
|
I think this is an example of when NWNX (i.e. the hooking) works, right ? _________________ Papillon |
|
Back to top |
|
|
|