Himmelweiss
Joined: 05 Mar 2010 Posts: 7
|
Posted: Fri Mar 05, 2010 7:55 Post subject: NWNX2 Linux scorco FETCHMODE problem |
|
|
I can store and retrieve an henchman object without any problems. But as soon i try to use FETCHMODE for a persistent chest it only retrieves the first row/item and then crashes the server. It seems that FETCHMODE doesn't get fired or something. Well it does but returns 7f0000 for the next item object and then crashes the server.
As stated in the topic i'm using linux server with direct mysql connect.
installed:
nwnx-2.7-beta4-linux.rar
nwnx_odbc-0.3-static-sqlite.rar
nwnx_tmi 1.0
OS:
Debian 5.0
CPU:
P4 3Ghz, 3GB RAM
nwnx2.ini
Code: |
[NWNX]
disablenwnxinit=n #Set to "y" to not enforce the NWNX!INIT requirement
[Debug]
debuglevel=2 #Set to 1 or higher to output successively
# # verbose debug information
[LogDir]
logdir=logs.0 #Set to the relative root of the log directory.
[ODBC2]
source = mysql
server = 127.0.0.1
user = ******
pwd = ******
db = nwn
hookscorco = true
|
The crash error i get on the server
Code: |
./nwnstartup.sh: line 21: 5332 Segmention fault /etc/nwn/nwserver
|
Sometimes the error shows up as
Code: |
*** glibc detected *** /etc/nwn/nwserver: double free or corruption (!prev): 0x16fea7e0 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb7e0e624]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e10826]
/etc/nwn/nwserver[0x830cdd6]
/etc/nwn/nwserver[0x81c2b28]
/etc/nwn/nwserver[0x8119285]
/etc/nwn/nwserver[0x8096161]
/etc/nwn/nwserver[0x80a0530]
/etc/nwn/nwserver(strftime+0x1063)[0x804bbe7]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7db6455]
/etc/nwn/nwserver(read+0x4d)[0x804b191]
======= Memory map: ========
08048000-081f4000 r-xp 00000000 08:01 3522572 /etc/nwn/nwserver
081f4000-081f5000 rwxp 001ac000 08:01 3522572 /etc/nwn/nwserver
081f5000-0825f000 r-xp 001ad000 08:01 3522572 /etc/nwn/nwserver
0825f000-08260000 rwxp 00217000 08:01 3522572 /etc/nwn/nwserver
08260000-082d9000 r-xp 00218000 08:01 3522572 /etc/nwn/nwserver
082d9000-082da000 rwxp 00291000 08:01 3522572 /etc/nwn/nwserver
082da000-0832f000 r-xp 00292000 08:01 3522572 /etc/nwn/nwserver
0832f000-083d0000 rwxp 002e6000 08:01 3522572 /etc/nwn/nwserver
083d0000-0dc54000 rwxp 083d0000 00:00 0
0e70b000-18333000 rwxp 0e70b000 00:00 0 [heap]
b3fd4000-b3fd5000 ---p b3fd4000 00:00 0
b3fd5000-b4c56000 rwxp b3fd5000 00:00 0
b4e00000-b4e21000 rwxp b4e00000 00:00 0
b4e21000-b4f00000 ---p b4e21000 00:00 0
b4fc8000-b62e6000 rwxp b4fc8000 00:00 0
b632f000-b63ce000 rwxp b632f000 00:00 0
b6434000-b64b5000 rwxp b6434000 00:00 0
b64b5000-b64c5000 r-xp 00000000 08:01 1736740 /lib/i686/cmov/libresolv-2.7.so
b64c5000-b64c7000 rwxp 0000f000 08:01 1736740 /lib/i686/cmov/libresolv-2.7.so
b64c7000-b64c9000 rwxp b64c7000 00:00 0
b64c9000-b64cd000 r-xp 00000000 08:01 1736738 /lib/i686/cmov/libnss_dns-2.7.so
b64cd000-b64cf000 rwxp 00003000 08:01 1736738 /lib/i686/cmov/libnss_dns-2.7.so
b64cf000-b64d0000 ---p b64cf000 00:00 0
b64d0000-b7190000 rwxp b64d0000 00:00 0
b7190000-b7191000 ---p b7190000 00:00 0
b7191000-b7991000 rwxp b7191000 00:00 0
b7991000-b7a74000 r-xp 00000000 08:01 6013439 /usr/lib/libstdc++.so.6.0.10
b7a74000-b7a77000 r-xp 000e2000 08:01 6013439 /usr/lib/libstdc++.so.6.0.10
b7a77000-b7a79000 rwxp 000e5000 08:01 6013439 /usr/lib/libstdc++.so.6.0.10
b7a79000-b7a7f000 rwxp b7a79000 00:00 0
b7a8c000-b7a96000 r-xp 00000000 08:01 1736741 /lib/i686/cmov/libnss_files-2.7.so
b7a96000-b7a98000 rwxp 00009000 08:01 1736741 /lib/i686/cmov/libnss_files-2.7.so
b7a98000-b7aa4000 r-xp 00000000 08:01 3195789 /etc/nwn/nwnx_tmi.so
b7aa4000-b7aa5000 rwxp 0000b000 08:01 3195789 /etc/nwn/nwnx_tmi.so
b7aa5000-b7ba6000 rwxp b7aa5000 00:00 0
b7ba6000-b7bf1000 r-xp 00000000 08:01 3195811 /etc/nwn/nwnx_odbc.so
b7bf1000-b7cd3000 rwxp 0004a000 08:01 3195811 /etc/nwn/nwnx_odbc.so
b7cd3000-b7cd5000 rwxp b7cd3000 00:00 0
b7cd5000-b7ce1000 r-xp 00000000 08:01 1728515 /lib/libgcc_s.so.1
b7ce1000-b7ce2000 rwxp 0000b000 08:01 1728515 /lib/libgcc_s.so.1
b7ce2000-b7d92000 r-xp 00000000 08:01 6014252 /usr/lib/libstdc++.so.5.0.7
b7d92000-b7d97000 rwxp 000af000 08:01 6014252 /usr/lib/libstdc++.so.5.0.7
b7d97000-b7d9c000 rwxp b7d97000 00:00 0
b7d9c000-b7d9e000 r-xp 00000000 08:01 1736733 /lib/i686/cmov/libdl-2.7.so
b7d9e000-b7da0000 rwxp 00001000 08:01 1736733 /lib/i686/cmov/libdl-2.7.so
b7da0000-b7ef5000 r-xp 00000000 08:01 1736736 /lib/i686/cmov/libc-2.7.so
b7ef5000-b7ef6000 r-xp 00155000 08:01 1736736 /lib/i686/cmov/libc-2.7.so
b7ef6000-b7ef8000 rwxp 00156000 08:01 1736736 /lib/i686/cmov/libc-2.7.so
b7ef8000-b7efb000 rwxp b7ef8000 00:00 0
b7efb000-b7f10000 r-xp 00000000 08:01 1736727 /lib/i686/cmov/libpthread-2.7.so
b7f10000-b7f12000 rwxp 00014000 08:01 1736727 /lib/i686/cmov/libpthread-2.7.so
b7f12000-b7f15000 rwxp b7f12000 00:00 0
b7f15000-b7f39000 r-xp 00000000 08:01 1736717 /lib/i686/cmov/libm-2.7.so
b7f39000-b7f3b000 rwxp 00023000 08:01 1736717 /lib/i686/cmov/libm-2.7.so
b7f3f000-b7f40000 rwxp b7f3f000 00:00 0
b7f40000-b7f42000 r-xp 00000000 08:01 1728871 /lib/libnss_mdns4_minimal.so.2
b7f42000-b7f43000 rwxp 00001000 08:01 1728871 /lib/libnss_mdns4_minimal.so.2
b7f43000-b7f48000 rwxp b7f43000 00:00 0
b7f48000-b7f5b000 r-xp 00000000 08:01 7070071 /etc/nwn/nwnx2.so
b7f5b000-b7f5c000 rwxp 00012000 08:01 7070071 /etc/nwn/nwnx2.so
b7f5c000-b7f5f000 rwxp b7f5c000 00:00 0
b7f5f000-b7f60000 r-xp b7f5f000 00:00 0 [vdso]
b7f60000-b7f7a000 r-xp 00000000 08:01 1728885 /lib/ld-2.7.so
b7f7a000-b7f7c000 rwxp 0001a000 08:01 1728885 /lib/ld-2.7.so
bf96a000-bf97f000 rwxp bffeb000 00:00 0 [stack]
./nwnstartup.sh: line 21: 5316 Abort /etc/nwn/nwserver
|
the on open script of the chest (only 1 item shows up in the chest)
Code: |
string sSQL = "SELECT Object FROM "+sTable+" WHERE ChestTag='"+sTag+"' ";
SetLocalString(GetModule(), "NWNX!ODBC!SETSCORCOSQL", sSQL);
object oItem = RetrieveCampaignObject("NWNX", "-", GetLocation(OBJECT_SELF), OBJECT_SELF);
while(GetIsObjectValid(oItem))
{
oItem = RetrieveCampaignObject("NWNX", "FETCHMODE", GetLocation(OBJECT_SELF), OBJECT_SELF);
iItem++;
}
SendMessageToPC(GetFirstPC(), "Retrieved " + IntToString(iItem) + " objects from database.");
|
the close part (works fine, everything is stored)
Code: |
object oItem;
string sResRef;
oItem = GetFirstItemInInventory();
while(GetIsObjectValid(oItem))
{
sResRef = GetResRef(oItem);
int iStack = GetItemStackSize(oItem);
string sSQL = "INSERT INTO " + sChestTable + " (ChestTag,ResRef,Object,Stack) VALUES" +
"('"+sChestTag+"','"+sResRef+"',%s,"+IntToString(iStack)+")";
SetLocalString(GetModule(), "NWNX!ODBC!SETSCORCOSQL", sSQL);
StoreCampaignObject("NWNX", "-", oItem);
oItem = GetNextItemInInventory();
}
|
I also receive the SendMessageToPC, but with just 1 Item, so me thinks FETCHMODE is ignored. There are currently only 20 items stored in the DB in a Blob field. So it can't be an TMI error, expecially since i'm using the TMI plugin and it is set to 7000000.
Nothin specular shows up in all the log files, everything normal there, that's why i didn't post it.
I also tried nwnx_fixes.so and nwnx_functions.so plugins, but they didn't help.
Everything works fine with nwnx2 but this, even Get/Set PersistentObject for henchmans and stuff. But if i want to loop with FETCHMODE it just kills my server. |
|