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 
 
1.69 Crash after load - std::length_error
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Fri Aug 08, 2008 22:33    Post subject: Reply with quote

Ah, I see the issue. I have never used install.sh and was under the impression it was the standard GNU 'install' replacement script, rather than being an actual build-and-install script. I've updated it for the new plugins subdirectory. I also set it to create the 'compiled' directory automatically. Please do another checkout and try now.

Thanks,
Acaos
Back to top
View user's profile Send private message
weldieran



Joined: 05 Aug 2005
Posts: 71

PostPosted: Sat Aug 09, 2008 2:27    Post subject: Reply with quote

acaos wrote:
Ah, I see the issue. I have never used install.sh and was under the impression it was the standard GNU 'install' replacement script, rather than being an actual build-and-install script. I've updated it for the new plugins subdirectory. I also set it to create the 'compiled' directory automatically. Please do another checkout and try now.

Thanks,
Acaos


yep, that did it Smile

However, weapons.so doesn't seem to be functional yet and server crashes with segmentation fault just after INIT. I removed weapons.so just to be sure it wasn't the cause, and same result. Thought it might be hashset acting up again, but not the case, even with hashset removed, still segfault.



Quote:

NWNX2lib: Init
NWNX2lib: org SetString() at 0x81f41b4, new SetString() at 0x1641e2
NWNX2lib: org GetObj() at 0x81f40bc, new GetObj() at 0x163b42
* Parsing configuration...
NWN Extender v2.7-beta4
(c) 2004 by the APS/NWNX Linux Conversion Group
(c) 2007-2008 by virusman
Based on the Win32 version (c) 2003 by Ingmar Stieger (Papillon)
and Jeroen Broekhuizen
visit us at http://www.avlis.org

* Searching for signatures...
* Loading modules...
FIXES plugin registered.
FUNCTIONS plugin registered.
CHAT plugin registered.
LETO plugin registered.
RESETPLUGIN plugin registered.
TMI plugin registered.
ERROR: dlopen: ./nwnx_weapons.so: ./nwnx_weapons.so: undefined symbol: Table_WeaponOfChoice
STRUCTS plugin registered.
RESMAN plugin registered.
ODBC plugin registered.
HASHSET plugin registered.
PROFILER plugin registered.
MNX plugin registered.
EVENTS plugin registered.
* NWNX2 activated.
Neverwinter Nights Server
Build:8109
Copyright BioWare Corp 1998-2004

Server: Loading...
Server: Running...

Server: Loading module "test".............
Server: Module loaded
INIT(S): valid ret=0x082041ec
./runtest2: line 16: 7373 Segmentation fault



onModuleLoad this module does some heavy db query and hashset work, not much more than that.

Using the nwnx_easy files, i was able to produce a stable server by swapping the hashset out from my live hashset.so. By "stable" I mean that it didn't crash, but it also was not handling our hashset and database queries properly at all (due to those custom functions that I failed to reintegrate I think)
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Sat Aug 09, 2008 3:27    Post subject: Reply with quote

Please remove the profiler plugin. It's not compatible with 1.69. The weapons plugin is still really beta; I'll fix that table bug though.

Thanks,
Acaos
Back to top
View user's profile Send private message
weldieran



Joined: 05 Aug 2005
Posts: 71

PostPosted: Sat Aug 09, 2008 3:38    Post subject: Reply with quote

acaos wrote:
Please remove the profiler plugin. It's not compatible with 1.69. The weapons plugin is still really beta; I'll fix that table bug though.

Thanks,
Acaos


ahh i see, ok, profiler and hashset both gone, still seg fault.

So i removed odbc, no more segfault.

I was thinking that even without our small modifications to your ODMBC, it should still be 'stable'. The calls that the module make to those custom functions should just get ignored right? not segfault?

But perhaps those custom calls being made by the module is causing the unupdated ODMBC plugin to segfault?
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Sat Aug 09, 2008 3:44    Post subject: Reply with quote

I fixed a crasher in ODBC as well. I had to add 'result = NULL' to the plugins/db/dbmyqsl.cpp file in the DbMySql::DbMySql function. It was uninitialized and causing crashes. Could you be missing that?

Acaos
Back to top
View user's profile Send private message
weldieran



Joined: 05 Aug 2005
Posts: 71

PostPosted: Sat Aug 09, 2008 4:01    Post subject: Reply with quote

acaos wrote:
I fixed a crasher in ODBC as well. I had to add 'result = NULL' to the plugins/db/dbmyqsl.cpp file in the DbMySql::DbMySql function. It was uninitialized and causing crashes. Could you be missing that?

Acaos


Yep, i've got that in this checkout
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Sat Aug 09, 2008 6:02    Post subject: Reply with quote

We're using the latest ODBC on Higher Ground without issues. Is there any chance you could get a core dump? You should be able to if you do ulimit -c unlimited before running NWN.

Acaos
Back to top
View user's profile Send private message
max196



Joined: 26 Jun 2008
Posts: 30

PostPosted: Sat Aug 09, 2008 20:51    Post subject: Reply with quote

the funcs plugin can't be compiled

all the plugin seems to be correctly compliled included weapons plugin, except funcs plugin

maybe because funcs/makefile.in missing?
Back to top
View user's profile Send private message
max196



Joined: 26 Jun 2008
Posts: 30

PostPosted: Sat Aug 09, 2008 20:58    Post subject: Reply with quote

the nwnx_weapons.so plugin is giving the following error while starting the server:

ERROR: dlopen: ./nwnx_weapons.so: ./nwnx_weapons.so: undefined symbol: CNWSCreature__GetRelativeWeaponSize
Back to top
View user's profile Send private message
weldieran



Joined: 05 Aug 2005
Posts: 71

PostPosted: Sat Aug 09, 2008 22:19    Post subject: Reply with quote

hmmm this is a hairy mess.

maybe instead I should look at what needs to be done to make nwnx function with 1.69, then try updating my old nwnx source to work with 1.69? Is there any documentation on that?

then again, perhaps its all just because the module is making calls to the ODBC plugin and the ODBC plugin just doesn't have those custom performance functions in place to handle it.....
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Sat Aug 09, 2008 22:46    Post subject: Reply with quote

max196 wrote:
the funcs plugin can't be compiled

all the plugin seems to be correctly compliled included weapons plugin, except funcs plugin

maybe because funcs/makefile.in missing?


The funcs plugin isn't linked into the main build yet. You'll have to cd to it and compile it manually.

Acaos
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Sat Aug 09, 2008 22:47    Post subject: Reply with quote

max196 wrote:
the nwnx_weapons.so plugin is giving the following error while starting the server:

ERROR: dlopen: ./nwnx_weapons.so: ./nwnx_weapons.so: undefined symbol: CNWSCreature__GetRelativeWeaponSize


This sounds like you're using the weapons plugin with an older NWNX Core. Is that the case?
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Sat Aug 09, 2008 22:48    Post subject: Reply with quote

weldieran wrote:
hmmm this is a hairy mess.

maybe instead I should look at what needs to be done to make nwnx function with 1.69, then try updating my old nwnx source to work with 1.69? Is there any documentation on that?


We're using the current NWNX Core from the trunk on Higher Ground with 1.69 with no issues.

Quote:
then again, perhaps its all just because the module is making calls to the ODBC plugin and the ODBC plugin just doesn't have those custom performance functions in place to handle it.....


There definitely shouldn't be a crash just from not having a particular function, but I will check and make sure that error case is handled properly.

I can probably fix the crash if you can get me a core dump. That would be the fastest way to debug it. Or, if you don't feel comfortable doing that and you have GDB installed, the best thing to do would be:

Code:

% ulimit -c unlimited
% (start up NWN)
-- NWN crashes
% ls core* (find the core file)
% gdb nwserver (core file)
% back
% list
% quit


And paste me the output of that GDB session.

Could you go into your setup a bit more? Are you trying to combine the current NWNX code with older plugins, or older NWNX base code with current plugins?

Acaos
Back to top
View user's profile Send private message
weldieran



Joined: 05 Aug 2005
Posts: 71

PostPosted: Sun Aug 10, 2008 0:09    Post subject: Reply with quote

acaos wrote:
And paste me the output of that GDB session.

Could you go into your setup a bit more? Are you trying to combine the current NWNX code with older plugins, or older NWNX base code with current plugins?

Acaos


Here's the GDB output:

Quote:

# gdb nwserver core.20047
GNU gdb Red Hat Linux (6.5-8.fc6rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".


warning: Can't read pathname for load map: Input/output error.
Reading symbols from /home/user/nwn/nwnx2.so...done.
Loaded symbols for ./nwnx2.so
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/user/nwn/nwnx_fixes.so...done.
Loaded symbols for ./nwnx_fixes.so
Reading symbols from /home/user/nwn/nwnx_functions.so...done.
Loaded symbols for ./nwnx_functions.so
Reading symbols from /home/user/nwn/nwnx_chat.so...done.
Loaded symbols for ./nwnx_chat.so
Reading symbols from /home/user/nwn/nwnx_leto.so...done.
Loaded symbols for ./nwnx_leto.so
Reading symbols from /home/user/nwn/LetoScript.so...done.
Loaded symbols for ./LetoScript.so
Reading symbols from /home/user/nwn/nwnx_resetplugin.so...done.
Loaded symbols for ./nwnx_resetplugin.so
Reading symbols from /home/user/nwn/nwnx_tmi.so...done.
Loaded symbols for ./nwnx_tmi.so
Reading symbols from /home/user/nwn/nwnx_structs.so...done.
Loaded symbols for ./nwnx_structs.so
Reading symbols from /home/user/nwn/nwnx_resman.so...done.
Loaded symbols for ./nwnx_resman.so
Reading symbols from /home/user/nwn/nwnx_odbc.so...done.
Loaded symbols for ./nwnx_odbc.so
Reading symbols from /usr/lib/mysql/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/mysql/libmysqlclient.so.15
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libssl.so.6...done.
Loaded symbols for /lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /lib/libcom_err.so.2...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libkrb5support.so.0...done.
Loaded symbols for /usr/lib/libkrb5support.so.0
Reading symbols from /home/user/nwn/nwnx_hashset.so...done.
Loaded symbols for ./nwnx_hashset.so
Reading symbols from /home/user/nwn/nwnx_mnx.so...done.
Loaded symbols for ./nwnx_mnx.so
Reading symbols from /home/user/nwn/nwnx_events.so...done.
Loaded symbols for ./nwnx_events.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Core was generated by `/home/user/nwn/nwserver -module test -maxclients 2 -pvp 1 -servervault 1 -e'.
Program terminated with signal 11, Segmentation fault.
#0 0x00427913 in CNWNXmysql::OnRequest () from ./nwnx_odbc.so


My live setup is 1.68 on an old version of nwnx. The old nwnx was modified slightly with those performance tweaks I mentioned in the "db" plugin. So now I'm just trying to update to 1.69 using your repository checkout, not making any modifications at all yet. The module, onLoad, executes a number of database queries then pipes the data from the queries into various hashsets.
Back to top
View user's profile Send private message
max196



Joined: 26 Jun 2008
Posts: 30

PostPosted: Sun Aug 10, 2008 0:15    Post subject: Reply with quote

acaos wrote:
max196 wrote:
the nwnx_weapons.so plugin is giving the following error while starting the server:

ERROR: dlopen: ./nwnx_weapons.so: ./nwnx_weapons.so: undefined symbol: CNWSCreature__GetRelativeWeaponSize


This sounds like you're using the weapons plugin with an older NWNX Core. Is that the case?


NWNX2lib: Init
NWNX2lib: org SetString() at 0x81f41b4, new SetString() at 0x9e1f00
NWNX2lib: org GetObj() at 0x81f40bc, new GetObj() at 0x9e1f28
* Parsing configuration...
NWN Extender v2.7-beta4
(c) 2004 by the APS/NWNX Linux Conversion Group
(c) 2007-2008 by virusman
Based on the Win32 version (c) 2003 by Ingmar Stieger (Papillon)
and Jeroen Broekhuizen
visit us at http://www.avlis.org

* Loading modules...
RESETPLUGIN plugin Registerred.
FIXES plugin Registerred.
HASHSET plugin Registerred.
TMI plugin Registerred.
ODBC plugin Registerred.
EVENTS plugin Registerred.
LETO plugin Registerred.
STRUCTS plugin Registerred.
FUNCTIONS plugin Registerred.
MNX plugin Registerred.
ERROR: dlopen: ./nwnx_weapons.so: ./nwnx_weapons.so: undefined symbol: CNWSCreature__GetRelativeWeaponSize
* NWNX2 activated.
Neverwinter Nights Server
Build:8109
Copyright BioWare Corp 1998-2004

Server: Loading...
Server: Running...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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