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 
 
A Segfault

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



Joined: 28 Nov 2007
Posts: 135

PostPosted: Mon Nov 10, 2008 6:40    Post subject: A Segfault Reply with quote

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
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Mon Nov 10, 2008 18:38    Post subject: Reply with quote

Check the logs directory. One of the text files in there should tell you what's ballsing up.
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Mon Nov 10, 2008 23:11    Post subject: Reply with quote

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
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Nov 12, 2008 3:22    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed Nov 12, 2008 8:37    Post subject: Reply with quote

JumpToLimbo may not be compatible with 1.69. I'll test it.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Nov 12, 2008 8:37    Post subject: Reply with quote

awesome. cause this script weill help me ooooooohhh so much
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed Nov 12, 2008 8:53    Post subject: Reply with quote

Please post the contents of nwnx_fn.txt log file.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Nov 12, 2008 9:13    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed Nov 12, 2008 9:40    Post subject: Reply with quote

Test this version with your script:
http://data.virusman.ru/nwn/nwnx_functions-1.9.0.rar
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Nov 12, 2008 9:41    Post subject: Reply with quote

ummm...is this a precompiled .so?

EDIT::
i mean just drop in the .so and try. since i ahve everything else
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Nov 12, 2008 9:48    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed Nov 12, 2008 9:53    Post subject: Reply with quote

Right.. it was the wrong file. Please re-download.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Wed Nov 12, 2008 9:59    Post subject: Reply with quote

that worked perfectly...my script isnt, lol, but the function now works and the segfault is gone
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 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