View previous topic :: View next topic |
Author |
Message |
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Mon Nov 10, 2008 6:40 Post subject: A Segfault |
|
|
With the script below being fired OnModLoad, i am getting the following message when observing the booting in PuTTy. I have no idea how to fix this
Quote: | Server: Module loaded
NWNX!INIT enforcement disabled, using 0x082041ec
NWNX!INIT enforcement disabled, using 0x08203e79
/home/account/.nwserver.temp.ltXVD17101: line 33: 17136 Segmentation fault ./nwserver -port 5122 -dmpassword xxxxxxx -oneparty 0 -pvp 0 -difficulty 2 -elc 0 -ilr 0 -reloadwhenempty 0 -maxclients 32 -servervault 1 -maxlevel 40 -gametype 0 -autosaveinterval 0 -publicserver 0 -interactive -servername Module -module "Module"
+ unset LD_PRELOAD
+ mv logs.0 logs.0.20081109233507
+ /bin/sleep 10 |
Code: | void StoreCreatures( object oArea)
{ if( !GetIsObjectValid( oArea) || (GetArea( oArea) != oArea)) return;
int iWP = 1;
location lALoc = Location( oArea, Vector( 5.0, 5.0, 0.0), 0.0);//creature holding room
object oObj = GetNearestObjectToLocation( OBJECT_TYPE_WAYPOINT, lALoc);
while( GetIsObjectValid( oObj))
{ int n = 1;
object oSpawn = GetNearestCreature( CREATURE_TYPE_IS_ALIVE, TRUE, oObj, 1, CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC);
while( GetIsObjectValid( oSpawn) && (GetDistanceBetween( oSpawn, oObj) < 4.5))
{ if( !GetIsPC( oSpawn))
{ object oMaster = GetMaster( oSpawn);
while( GetIsObjectValid( oMaster) && !GetIsPC( oMaster) && GetIsObjectValid( GetMaster( oMaster))) oMaster = GetMaster( oMaster);
if( !GetIsPC( oMaster))
{ WriteTimestampedLogEntry( "Storing " +GetName( oSpawn));
SetLocalObject( oArea, GetTag( oObj) +"_" +IntToString( n), oSpawn);
JumpToLimbo( oSpawn);
}
}
oSpawn = GetNearestCreature( CREATURE_TYPE_IS_ALIVE, TRUE, oObj, ++n, CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC);
}
oObj = GetNearestObjectToLocation( OBJECT_TYPE_WAYPOINT, lALoc, ++iWP);
}
}
|
|
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Mon Nov 10, 2008 18:38 Post subject: |
|
|
Check the logs directory. One of the text files in there should tell you what's ballsing up. |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Mon Nov 10, 2008 23:11 Post subject: |
|
|
well in nwnx2.ini, there is only one call to JumpToLimbo and then the file just stops
Code: | ret=0x082041ec
name='NWNX!FUNCTIONS!JUMP_TO_LIMBO'
value=' '
gobj=0x11cc3000
* Library FUNCTIONS!JUMP_TO_LIMBO found: 00AAD2C0
* OnRequest address: 0000000D |
and in nwserverlog.ini, it tries 6 times to work the same creature before the file just ends. Now this creature listed below, there is only one in the whole area named this. So it kept trying the same creature
Code: | [Sun Nov 9 23:32:31] Storing Maug Sergeant
[Sun Nov 9 23:32:44] Loading Module: Module
[Sun Nov 9 23:32:50] Storing Maug Sergeant
[Sun Nov 9 23:33:02] Loading Module: Module
[Sun Nov 9 23:33:09] Storing Maug Sergeant
[Sun Nov 9 23:33:21] Loading Module: Module
[Sun Nov 9 23:33:27] Storing Maug Sergeant
[Sun Nov 9 23:33:39] Loading Module: Module
[Sun Nov 9 23:33:46] Storing Maug Sergeant
[Sun Nov 9 23:35:09] Loading Module: Module
[Sun Nov 9 23:35:15] Storing Maug Sergeant |
EDIT::
the reason i think it tried so many times to redo the same creature was thru each time the module tried to load back to back. it faults the second it tries to do it once
Last edited by Extreme on Wed Nov 12, 2008 3:24; edited 1 time in total |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Nov 12, 2008 3:22 Post subject: |
|
|
i tried a few times and looked thru the logs and it now only tries to JumpToLimbo the first creature and then the module shuts down with the same segfault message mentioned above. Is there something an issue in my JumpToLimbo commands? How can i fx this |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Nov 12, 2008 8:37 Post subject: |
|
|
JumpToLimbo may not be compatible with 1.69. I'll test it. |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Nov 12, 2008 8:37 Post subject: |
|
|
awesome. cause this script weill help me ooooooohhh so much |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Nov 12, 2008 8:53 Post subject: |
|
|
Please post the contents of nwnx_fn.txt log file. |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Nov 12, 2008 9:13 Post subject: |
|
|
this is all there is
Code: | NWNX Functions V.1.8.9
(c) 2004 by the APS/NWNX Linux Conversion Group
Based on the Win32 version (c) 2003 by Ingmar Stieger (Papillon)
(c) by virusman, 2006-2008
visit us at http://www.nwnx.org
* Module loaded successfully.
|
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Nov 12, 2008 9:41 Post subject: |
|
|
ummm...is this a precompiled .so?
EDIT::
i mean just drop in the .so and try. since i ahve everything else |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Nov 12, 2008 9:48 Post subject: |
|
|
that .so was older then the one i had. the one i had was dated 7/25 and i just replaced it with 7/14 (after making a backup).
the result was the same. this is from the PuTTy
Code: | Server: Module loaded
NWNX!INIT enforcement disabled, using 0x082041ec
NWNX!INIT enforcement disabled, using 0x08203e79
/home/account/.nwserver.temp.INyFYd5353: line 33: 5392 Segmentation fault ./nwserver -port 5122 -dmpassword xxxxxxx -oneparty 0 -pvp 0 -difficulty 2 -elc 0 -ilr 0 -reloadwhenempty 0 -maxclients 32 -servervault 1 -maxlevel 40 -gametype 0 -autosaveinterval 0 -publicserver 0 -interactive -servername Module -module "Module"
+ unset LD_PRELOAD
+ mv logs.0 logs.0.20 |
nwserverlog
Code: | [Wed Nov 12 02:44:33] Loading Module: Tregonia
[Wed Nov 12 02:44:39] Storing Maug Sergeant |
EDIT::
the version in the _fn still says 1.8.9? I overwrote the .so? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Nov 12, 2008 9:53 Post subject: |
|
|
Right.. it was the wrong file. Please re-download. |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Wed Nov 12, 2008 9:59 Post subject: |
|
|
that worked perfectly...my script isnt, lol, but the function now works and the segfault is gone |
|
Back to top |
|
|
|