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 
 
NWNX Crashing on one Module due to nwnx_chat

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Balanor



Joined: 13 Jun 2005
Posts: 29

PostPosted: Mon May 09, 2011 0:49    Post subject: NWNX Crashing on one Module due to nwnx_chat Reply with quote

I am using the nwnx_chat among other plugins. However, when I launch NWNX on one machine, NWServer ends up crashing seconds after the module fully loads *unless* I move the nwnx_chat.dll from the NWN folder or otherwise do not load that plugin. I have been trying to figure this out for hours and only getting more and more frustrated. My testing has confirmed the following –

1. I am using the nwnx-2.7-beta4-win32-full version of NWNX and the NWNX.ini file reads like this:
Code:
; NWNX2 configuration file
; These are the default values for NWNX2. Values specified on the command line take precedence.

[NWNX]
ServerPort = 5121
ModuleName = "ProblemModule"
WatchdogProcess = yes
UpdateIntervalProcess = 5
WatchdogGamespy = no
UpdateIntervalGamespy = 20
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5

[CHAT]
chat_script=fky_chat
server_script=fky_chat_srv

2. This only happens for one module. All others work fine when launched via NWNX, however no other modules have the fky_chat script in them.

3. I have discovered that if I change the fky_chat script in the problem module to just a shell (only set to void main() {} ) then NWNX will actually load the module.

4. HOWEVER, if I copy this module over to another test server that has the exact same plugins loading for NWNX and the same configuration in the NWNX.ini file, this module loads fine there without having to make any change to the fky_chat script.

Based on all this testing, it appears I have a problem with the nwnx_chat.dll (or NWNX?) on one machine. However, I have tried copying that plugin and all NWNX dlls from the two other working machines I have and even re-downloading them all here and the problem still remains.

Does anyone have ANY idea WTF is wrong with this one machine?! It runs Windows Vista Ultimate on SP2. I really need it working on this machine as it is my primary dev box. I am at wits end and out of ideas - ANY help is greatly appreciated.
Back to top
View user's profile Send private message
werehound



Joined: 17 Aug 2010
Posts: 41

PostPosted: Mon May 09, 2011 0:59    Post subject: Reply with quote

No answers but: Vista has given me a massive headache with nwnx_chat.

It doesn't cause my server to crash on load, but sending system messages, or tells to players causes it to crash instantly and without warning. I've been unable to diagnose or fix it myself. I've had to run my server with nwnx_chat disabled.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon May 09, 2011 5:05    Post subject: Reply with quote

Probably a silly question - since it works on another machine - but are you running the chat_init (can't remember the exact name atm) script?

Edit:
Add
Code:

[CHAT]
LogLevel=2

to your nwnx.ini to get some more information in the nwnx_chat log (I think 2 is the highest; you can try 10 just in case)
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Balanor



Joined: 13 Jun 2005
Posts: 29

PostPosted: Mon May 09, 2011 17:19    Post subject: Reply with quote

Thanks for the replies. As it turned out, I got frustrated enough I just shut the system down and walked away (nevermind that I had rebooted several times during my troubleshooting to see if that made a difference too). Anyway, last night when I turned it back on and tried with chat logging enabled as Max suggested NWNX loaded up the module on that machine with no problems.

I guess I'll just chalk this up to gremlins....and hope and pray it never happens again.

Thanks again.
Back to top
View user's profile Send private message
Balanor



Joined: 13 Jun 2005
Posts: 29

PostPosted: Tue May 10, 2011 1:52    Post subject: Reply with quote

The problem has returned, of course. I've continued to mess with what settings I can find, and I even completely reinstalled NWN on that machine to no avail. I figured out though, that if I set ignore_silent=1 in the NWNX.ini, the module will load on this machine. However, when I then try logging in the server immediately crashes with the following being the results in the verbose nwn_chat.log.

Code:
NWNX Chat version 0.3.4 for Windows.
(c) 2005-2006 by dumbo (dumbo@nm.ru)
(c) 2006-2008 virusman (virusman@virusman.ru)
Settings:
chat_script: fky_chat
server_script: fky_chat_srv
max_msg_len: 1024
processnpc: 0
ignore_silent: 0

! ChatProc hooked at 43ca00.
! RunProc located at 5bf9d0.
! GetIDProc located at 452f70.

o CHAT: mode=D, from_oID=00005FCA, msg='NW_I_AM_DEAD', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=00005FCA, msg='NW_ATTACK_MY_TARGET', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=00005FCC, msg='NW_I_AM_DEAD', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=00005FCC, msg='NW_ATTACK_MY_TARGET', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=0000621D, msg='NW_I_AM_DEAD', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=0000621D, msg='NW_ATTACK_MY_TARGET', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=00007213, msg='NW_I_AM_DEAD', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=00007213, msg='NW_ATTACK_MY_TARGET', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=0000A582, msg='NW_I_AM_DEAD', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=0000A582, msg='NW_ATTACK_MY_TARGET', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=00005FCB, msg='NW_I_AM_DEAD', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=00005FCB, msg='NW_ATTACK_MY_TARGET', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=0000621E, msg='NW_I_AM_DEAD', to_ID=FFFFFFFF
o CHAT: mode=D, from_oID=0000621E, msg='NW_ATTACK_MY_TARGET', to_ID=FFFFFFFF
o GETID: oID='7fffffff        ', ID=0


If I do not set ignore_silent=1, then the NWServer app crash that I explained in my first post occurs right after the first (identical) line that starts with 'o CHAT' is logged in these results, and no additional lines are written to the nwn_chat.log in the case of an immeidate server crash.

Just to answer Max's question, I am not using a script called chat_init. The script for this plugin in my module is called fky_chat, and I do use it extensively (voice commands via Tells are one of the primary methods I use to test and debug things which is why I am so desperate to get this working on the dev box).

Can anyone help?
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Tue May 10, 2011 16:33    Post subject: Reply with quote

You're right, it's not chat_init. the function's called InitSpeech() - should be in fky_chat_inc.nss - and needs to be called in OnModuleLoad.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Balanor



Joined: 13 Jun 2005
Posts: 29

PostPosted: Thu May 12, 2011 3:01    Post subject: Reply with quote

OK - thanks for the clarification. I did confirm the InitSpeech() function is being called on module load.
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Thu May 12, 2011 4:37    Post subject: Reply with quote

From the last line of the chatlog it seems in Speech_OnClientEnter (which gets the player id), the entering object/player is invalid (0x7FFFFFFF = OBJECT_INVALID) ... which is kinda weird since only (valid) players can trigger the OnClientEnter event...
..uhm..yea..

But as it works on a different computer the problem has to be somewhere else.
- Is the machine on which it crashes Vista 64bit?
- What OS are the others?
- Do they both use the same nwnx plugins (remove all but nwnx_chat.dll)

That's all I can think of atm.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Balanor



Joined: 13 Jun 2005
Posts: 29

PostPosted: Fri May 13, 2011 2:07    Post subject: Reply with quote

The machine this is crashing on is 32bit Vista. The other two machines I've tested this on and it works are Windows XP (the live server) and 32bit Windows Server 2008. Both of them have the same NWNX.ini and same plugins as this machine and will run the server fine with just the nwnx_chat.dll loading.

I reinstalled NWN again, rebooted after the install of it and again after installing the 1.69 patch, did *no* additional configuration changes and simply copied in the necessary NWNX dlls to run it along with the nwnx_chat.dll only, and the crash still occurs...

What really upsets me even more is it worked on this machine before, however I recently reformatted it to fix other issues and now this headache arose.
Back to top
View user's profile Send private message
Balanor



Joined: 13 Jun 2005
Posts: 29

PostPosted: Sat May 14, 2011 6:01    Post subject: Reply with quote

Unbelievable. I’ll spare most of the gory details and cussing I went through to get this to work, but I finally got it working. On the almost nonexistent chance that this problem may end up affecting others, I’ll explain how I fixed the issue so that if anyone experiencing this problem reads this you won’t have to spent 15+ hours of your life too trying to fix this f-ed up issue.

First, I re-downloaded the SIMTools NWNX2_and_plugins_for_1.69.rar file and noticed that the timestamps on some of the .dlls in that .rar were different than those I had on my machine. So I re-copied them from that file to the NWN folder. I didn’t try launching NWNX right away afterward, so I can’t necessarily confirm that this may have helped fix the issue, but it’s one of the last steps I took.

Next, I basically decided to load up the nwnx.ini file with configurations for everything I could think of for NWNX - even if I didn’t have or was using the .dll for them. So I changed the NWNX file to look like this:

Code:
; NWNX2 configuration file
; These are the default values for NWNX2. Values specified on the command line take precedence.

[NWNX]
ServerPort = 5121
ModuleName = "ProblemModule"
WatchdogProcess = yes
UpdateIntervalProcess = 5
WatchdogGamespy = no
UpdateIntervalGamespy = 20
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5

[ODBC2]
; Log file
MaxLogSize = 512 ; in KByte
LogLevel = 2 ; 0=nothing, 1=only errors, 2=everything

; Use these two settings for the SQLite internal database
source = sqlite
file   = sqlite.db


; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely
hookscorco = true

[PROFILER]
MaxLogSize = 512 ; in KByte
LogLevel = 1 ; 1=overall statistics, 2=full script callstack

[CHAT]
chat_script=fky_chat
server_script=fky_chat_srv
;ignore_silent=1
;LogLevel=2

[FUNCS]
;Last_Skill_Number is the id of the last skill in skills.2da
Last_Skill_Number=28
;debugLevel: 1 should only show basic information, 2 should include errors and 3 should log pretty much everything
debugLevel=1
;Set this to 1 to use the CustomTrapGeometry functions
HOOK_CustomTrapGeometry=1

[FIXES]
;hide_charlist_all = 1           # If used, comment the three below
hide_charlist_dms = 1            # Should be self-explanatory
hide_charlist_levels = 1
hide_charlist_portraits = 0       
copy_vars = 1                    # Copy local variables on stack split and on store transaction, fire OnDisturbed when you merge a stack from a placeable
compare_vars = 0                 # If set to 1, items with different local vars don't stack
keep_hidden_in_conversation = 0  # If set to 1, creatures don't unhide when they start a conversation
;hp_limit = -10                  # Negative HP limit - values up to -127 are allowed
;cap_ability_inc = 30
;cap_atkbonus_inc = 40
;cap_skill_inc = 50
;cap_ability_dec = 30
;cap_atkbonus_dec = 40
;cap_skill_dec = 50
;debuglevel = 3                  # For troubleshooting 7/2009


After changing the NWNX.ini to the above, NWNX launched my problem module without crashing! I was able to login and verify voice commands were working too. However, what I really, really don’t understand is what happened next:
Finally, I decided to take out everything I didn’t use one at a time - with NWNX successfully loading the module each time I removed more of the excess configuration. Eventually, I had returned the nwnx.ini to the SAME configuration as I had it when I tried to launch NWNX the first time and the problem first occurred. Once I did this and launched NWNX...it STILL worked and loaded the module without issues.
Yeah...WTF?!?! Why is it working now?!?

I have verified this time that it still works after a computer reboot, too.

If anyone can riddle me why this scenario worked I’ll buy them a virtual drink of their choice. But either way, this has been one heckuva nightmare. So if anyone in the future gets any help from this thread to alleviate a similar/same problem, then it will make me feel like all the time I wasted on this wasn’t such as waste after all.

And Max - thanks for the help trying to troubleshoot this with me. Much appreciated.


Last edited by Balanor on Sat May 14, 2011 7:29; edited 1 time in total
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat May 14, 2011 6:37    Post subject: Reply with quote

nwnx.ini doesn't have anything to do with this.
It's more likely that the DLLs you had were old or bugged (maybe madCHook.dll).
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support 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