PlaneShift

  • Status Closed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Engine
  • Assigned To No-one
  • Operating System
  • Severity Medium
  • Priority
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: PlaneShift
Opened by Kaerli Stronwylle - 02.06.2008
Last edited by Lanarel - 19.07.2009

FS#1651 - SVN art broken

2 different bugs in 1:
With SVN trunk server as of May 31 + SVN art from around same date (May 31-June 1): “spawn npcroom” after loading the npcroom yields a crash when the server tries to load “cubem” in place of “enkim”.
Also, the “weapons#doubleaxe01a” model from SVN art causes thingldr to crash.

I don’t have a BT atm for the first crash…I pastebin’ed it, but it’s probably gone now.
BT for 2nd crash (VC8):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


thingldr.dll!CS::Plugin::ThingLoader::csThingLoader::ParsePoly3d(iDocumentNode * node=0x03c04638, iLoaderContext * ldr_context=0x03c02440, iEngine * engine=0x00b634f0, float default_texlen=1.0000000, iThingFactoryState * thing_fact_state=0x03c04b80, int vt_offset=0×00000000, bool & poly_delete=false, iMeshWrapper * mesh=0×00000000, bool & baduv=false) Line 606 C++
thingldr.dll!CS::Plugin::ThingLoader::csThingLoader::LoadThingPart(iThingEnvironment * te=0x03c047b8, iDocumentNode * node=0x03c028b0, iLoaderContext * ldr_context=0x03c02440, iObjectRegistry * object_reg=0x00aef6e8, iReporter * reporter=0x00b6c058, iSyntaxService * synldr=0x00b67168, CS::Plugin::ThingLoader::ThingLoadInfo & info={…}, iEngine * engine=0x00b634f0, int vt_offset=0×00000000, bool isParent=true, iMeshWrapper * mesh=0×00000000, bool & baduv=false) Line 1120 C++
thingldr.dll!CS::Plugin::ThingLoader::csThingFactoryLoader::Parse(iDocumentNode * node=, iStreamSource * formal=, iLoaderContext * ldr_context=, iStreamSource * formal=) Line 1324 + 0×37 bytes C++
csparser.dll!CS::Plugin::csparser::csLoader::LoadMeshObjectFactory(iLoaderContext * ldr_context=0x03c02440, iMeshFactoryWrapper * stemp=0x03c024b8, iMeshFactoryWrapper * parent=0×00000000, iDocumentNode * node=0x03c02378, csReversibleTransform * transf=0×00000000, iStreamSource * ssource=0×00000000) Line 2629 + 0×35 bytes C++
csparser.dll!CS::Plugin::csparser::csLoader::Load(iDocumentNode * node=0x032b3648, iCollection * collection=0×00000000, bool searchCollectionOnly=true, bool checkDupes=false, iStreamSource * ssource=0×00000000, const char * override_name=0×00000000, iMissingLoaderData * missingdata=0×00000000, unsigned int keepFlags=0×00000000) Line 726 + 0×20 bytes C++
psserver.exe!gemObject::InitMesh(const char * name=0x00452bc2, const char * factname=0x0257f6cc, const char * filename=0×03366548, const csVector3 & pos={…}, const float rotangle=0.00000000, iSector * room=0x027ac008, const char * action=0x00452bc2) Line 813 C++
psserver.exe!gemObject::gemObject(const char * name=0x022205c0, const char * factname=0x018aef48, const char * filename=0x03365f28, unsigned int myInstance=0×00000000, iSector * room=0x027ac008, const csVector3 & pos={…}, float rotangle=0.00000000, int clientnum=0×00000000, unsigned int id=0xffffffff) Line 639 + 0×26 bytes C++
psserver.exe!gemActiveObject::gemActiveObject(const char * name=0x022205c0, const char * factname=0×00000000, const char * filename=0x03365f28, unsigned int myInstance=0×00000000, iSector * room=0x027ac008, const csVector3 & pos={…}, float rotangle=0.00000000, int clientnum=0×00000000, unsigned int id=0×00000001) Line 1239 + 0×44 bytes C++
psserver.exe!gemItem::gemItem(csWeakRef<psItem> item={…}, const char * factname=0x018aef48, const char * filename=0x03365f28, unsigned int instance=0×00000000, iSector * room=0×00000000, const csVector3 & pos={…}, float rotangle=0.00000000, int clientnum=0×00000000, unsigned int id=0×00000001) Line 1436 + 0×53 bytes C++
psserver.exe!EntityManager::CreateItem(psItem * & iteminstance=, bool transient=) Line 877 + 0×73 bytes C++
psserver.exe!SpawnManager::RepopulateItems(psSectorInfo * sectorinfo=0×00000000) Line 604 + 0x1c bytes C++
psserver.exe!com_spawn(char * sector=0x0257f99a) Line 516 C++
psserver.exe!execute_line(const char * cmd=0×02823684, csString * buffer=0×00000000) Line 149 + 0xa bytes C++
psserver.exe!psServerConsoleCommand::Trigger() Line 140 C++
psserver.exe!EventManager::ProcessEventQueue() Line 97 C++
psserver.exe!EventManager::Run() Line 207 + 0×7 bytes C++
psserver.exe!CS::Threading::Implementation::`anonymous namespace’::proxyFunc(void * param=0x0012fd84) Line 107 C++
msvcr80.dll!781329bb()
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr80.dll]
msvcr80.dll!78132a47()
kernel32.dll!7c80b683()
The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
3037 PlaneShift  FS#3037 - Provide art allowing trunk to work, and update build guide for t  High Lanarel, Andrew Dai
100%
Closed by  Lanarel
19.07.2009 18:32
Reason for closing:  
Additional comments about closing:  

Closed in favour of new and more general report  bug 3037 

Andreas Heinchen commented on 03.06.2008 18:25

I can confirm this one on linux. here is what i have found out so far …

Tue Jun 3 20:18:58 2008, PS Server: spawn
Tue Jun 3 20:18:58 2008, <src/server/gem.cpp:822 InitMesh SEVERE>
Tue Jun 3 20:18:58 2008, Could not set mesh with factname=enkim and filename=/planeshift/models/enkim/enkim.cal3d. Trying dummy model

crystalspace.maploader.parse.image:

Could not open image file '/planeshift/models/cubo_ref.dds' on VFS!

crystalspace.maploader.parse.texture:

Couldn't load image '/planeshift/models/cubo_ref.dds', using error texture
instead!

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb794da00 (LWP 31272)]
gemObject::Move (this=0x89a4558, pos=@0xbfdeac28, rotangle=0, room=0x890a2e8) at src/server/gem.cpp:864
864 iMovable* iMov = iMesh→GetMovable();
(gdb) bt
#0 gemObject::Move (this=0x89a4558, pos=@0xbfdeac28, rotangle=0, room=0x890a2e8) at src/server/gem.cpp:864
#1 0x0805ba74 in gemObject::InitMesh (this=0x89a4558, name=0xb5a86558 “Smith”, factname=0xbfdea92c “stonebm”,

  filename=0x89a0de0 "/planeshift/models/stonebm/stonebm.cal3d", pos=@0xbfdeac28, rotangle=0, room=0x890a2e8, action=0x0) at src/server/gem.cpp:842

#2 0x0806104f in gemObject (this=0x89a4558, name=0xb5a86558 “Smith”, factname=0x87a74e7 “stonebm”,

  filename=0x89a4510 "/planeshift/models/stonebm/stonebm.cal3d", myInstance=0, room=0x890a2e8, pos=@0xbfdeac28, rotangle=0, clientnum=0, id=5)
  at src/server/gem.cpp:638

#3 0×08067172 in gemActor (this=0x89a4558, chardata=0xb5a85ccc, factname=0x87a74e7 “stonebm”,

  filename=0x89a4510 "/planeshift/models/stonebm/stonebm.cal3d", myInstance=0, room=0x890a2e8, pos=@0xbfdeac28, rotangle=0, clientnum=0, id=5)
  at src/server/gem.cpp:1715

#4 0x08067f16 in gemNPC (this=0x89a4558, chardata=0xb5a85ccc, factname=0x87a74e7 “stonebm”, filename=0x89a4510 “/planeshift/models/stonebm/stonebm.cal3d”,

  instance=0, room=0x890a2e8, pos=@0xbfdeac28, rotangle=0, clientnum=0, id=5) at src/server/gem.cpp:3455

#5 0x080fc011 in EntityManager::CreateNPC (this=0x87fe738, chardata=0xb5a85ccc, instance=0, pos=@0xbfdeac28, sector=0x890a2e8, yrot=0, updateProxList=true)

  at src/server/entitymanager.cpp:745

#6 0x080fc286 in EntityManager::CreateNPC (this=0x87fe738, chardata=0xb5a85ccc, updateProxList=<value optimized out>) at src/server/entitymanager.cpp:727
#7 0x08152de9 in SpawnManager::RepopulateLive (this=0x88997a8, sectorinfo=0×0) at src/server/spawnmanager.cpp:573
#8 0×08114210 in com_spawn (sector=0xbfdeace5 ““) at src/server/command.cpp:514
#9 0x0836a0be in execute_line (cmd=0xbfdeb108 “spawn”, buffer=0×0) at src/common/util/serverconsole.cpp:149
#10 0x0836a29f in ServerConsole::ExecuteScript (

  script=0xb77f91e0 "loadmap podium\nloadmap hyoja2\nloadmap blackflame\nloadmap hyarena\nloadmap hybdr\nloadmap npcroom2\nloadmap bdroad2\nloadmap hydlaa_jayose\nloadmap magicshop\nloadmap bdr2bdoors\nloadmap jayose\nloadmap arena\n"...) at src/common/util/serverconsole.cpp:217

#11 0x0811630f in com_exec (line=0xbfdeb955 “/this/serverscript”) at src/server/command.cpp:1520
#12 0x0836a0be in execute_line (cmd=0xbfdebd78 “exec /this/serverscript”, buffer=0×0) at src/common/util/serverconsole.cpp:149
#13 0x0836a29f in ServerConsole::ExecuteScript (script=0xbfdec584 “exec /this/serverscript”) at src/common/util/serverconsole.cpp:217
#14 0x0808d417 in psServer::MainLoop (this=0x85b3e10) at src/server/psserver.cpp:567
#15 0×08129134 in main (argc=-1217604416, argv=0xbfdeca84) at src/server/main.cpp:83

i made some changes to debug this one:

Index: src/server/gem.cpp

— src/server/gem.cpp (Revision 1683)
+++ src/server/gem.cpp (Arbeitskopie)
@@ -661,6 +661,8 @@

   cel->RemoveEntity(this,gemID);
   delete proxlist;
   proxlist = NULL;

+ /* tell the pcmesh to clear him self before the proplist is destoyed */
+ pcmesh→SetMesh(0);
}

uint gemObject::GetEntityID()
@@ -857,8 +859,12 @@

   // Rotation
   csMatrix3 matrix = (csMatrix3) csYRotMatrix3 (rotangle);

- pcmesh→GetMesh()→GetMovable()→GetTransform().SetO2T (matrix);

+ iMeshWrapper* iMesh = pcmesh→GetMesh();
+ iMovable* iMov = iMesh→GetMovable();
+ csReversibleTransform& rt = iMov→GetTransform();
+ rt.SetO2T (matrix);
+

   this->pos    = pos;
   this->sector = room;

}
@@ -1319,7 +1325,7 @@

               if (guard &&
                   guard != actor->GetCharacterData()->GetCharacterID() &&
                   guardActor &&

- guardActor→RangeTo(item→GetGemObject()) < 5)
+ guardActor→RangeTo(item→GetGemObject()) < RANGE_TO_SELECT)

               {
                   psserver->SendSystemInfo(clientnum,"You notice that the item is being guarded by %s",
                       guardActor->GetCharacterData()->GetCharFullName());

in the debugger it turned out that iMesh is set to 0

Caarrie commented on 03.06.2008 18:30

assigning to zwenze

Andreas Heinchen commented on 05.06.2008 13:28

Found the reason for th above crash and fixed it locally. But this just uncovers another crash in CS. Anyhow, here are my findings:

In gemcpp:line 745 it is tried to find a mesh by name. If that was successfull, the if statement which sets the mesh to the meshwrapper is not taken and the mesh wrapper stays mesh less (pointing to 0). That will cause a crash shortly later as in gemObject::Move the mesh is used without a check for 0.

After adding an else case to assign the mesh to the mesh wrapper another crash occurs deep within cs. Anyhow, here is my patch for this bug.
http://rafb.net/p/ggFg6s53.html http://en.pastebin.ca/1039493

The following might be worth a new bug report on flyspray, but i have not examioned to closely what is going on.

as the crash occurs mat in CS::Plugin::ThingLoader::csThingLoader::ParsePoly3d() is 0
19 CS::Plugin::ThingLoader::csThingLoader::ParsePoly3d() /home/andreas/psspace/cs/plugins/mesh/thing/persist/standard/thingldr.cpp:606 0xb5889ae4
18 CS::Plugin::ThingLoader::csThingLoader::LoadThingPart() /home/andreas/psspace/cs/plugins/mesh/thing/persist/standard/thingldr.cpp:1119 0xb588c9d0
17 CS::Plugin::ThingLoader::csThingFactoryLoader::Parse() /home/andreas/psspace/cs/plugins/mesh/thing/persist/standard/thingldr.cpp:1323 0xb588e6cb
16 CS::Plugin::csparser::csLoader::LoadMeshObjectFactory() /home/andreas/psspace/cs/plugins/csparser/csloader.cpp:2629 0xb76b20f6
15 CS::Plugin::csparser::csLoader::Load() /home/andreas/psspace/cs/plugins/csparser/csloader.cpp:726 0xb76b8dc2
14 gemObject::InitMesh() /home/andreas/psspace/planeshift/src/server/gem.cpp:812 0x0805c587
13 gemObject() /home/andreas/psspace/planeshift/src/server/gem.cpp:638 0x0806105f
12 gemActiveObject() /home/andreas/psspace/planeshift/src/server/gem.cpp:1242 0x080613a2
11 gemItem() /home/andreas/psspace/planeshift/src/server/gem.cpp:1439 0×08061453
10 EntityManager::CreateItem() /home/andreas/psspace/planeshift/src/server/entitymanager.cpp:876 0x080fb56f
9 SpawnManager::RepopulateItems() /home/andreas/psspace/planeshift/src/server/spawnmanager.cpp:604 0x081535b2
8 com_spawn() /home/andreas/psspace/planeshift/src/server/command.cpp:515 0×08114234
7 execute_line() /home/andreas/psspace/planeshift/src/common/util/serverconsole.cpp:149 0x0836a63e
6 ServerConsole::ExecuteScript() /home/andreas/psspace/planeshift/src/common/util/serverconsole.cpp:217 0x0836a81f
5 com_exec() /home/andreas/psspace/planeshift/src/server/command.cpp:1520 0x0811631f
4 execute_line() /home/andreas/psspace/planeshift/src/common/util/serverconsole.cpp:149 0x0836a63e
3 ServerConsole::ExecuteScript() /home/andreas/psspace/planeshift/src/common/util/serverconsole.cpp:217 0x0836a81f
2 psServer::MainLoop() /home/andreas/psspace/planeshift/src/server/psserver.cpp:567 0x0808d427
1 main() /home/andreas/psspace/planeshift/src/server/main.cpp:83 0x081296b4

UPDATE

Bug discovered and fixed independly by Xordan in the meantime

Project Manager
Lanarel commented on 19.07.2009 18:32

Will close this one in favour of 3037.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing