Author Topic: Cant get current precursors to run  (Read 7070 times)

Offline Recon

  • Lieutenant
  • ***
  • Posts: 60
  • Karma: +1/-0
    • View Profile
Cant get current precursors to run
« on: December 22, 2006, 05:55:29 am »
Yep still here, have not seen precursors on my machine in a long time.
got current everthing and it all seems to compile ok. I get this when i run it in the debuger.

mec@mec-desktop:~/development/precursors$ gdb ./precursors
GNU gdb 6.4-debian
Copyright 2005 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 "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /home/mec/development/precursors/precursors
[Thread debugging using libthread_db enabled]
[New Thread -1214236992 (LWP 10464)]
preClient version 0.3.4 Build 1084 by G33X Nexus Entertainment.
SCF_NOTIFY: class crystalspace.cegui.wrapper (from /home/mec/development/CS/cscegui.so) has already been registered in a different context: '{none}' vs. '{none}' (from /home/mec/development/CS/cegui.so); this message appears only in debug builds
WARNING: could not load plugin 'crystalspace.sound.render.software'
WARNING: could not load plugin 'crystalspace.sound.loader.multiplexer'
WARNING: could not load plugin 'crystalspace.modelconverter.multiplexer'
WARNING: could not load plugin 'crystalspace.mesh.crossbuilder'

crystalspace.canvas.glx2d:
  Opening GLX2D
  Creating Context
  Video driver GL/X version (direct renderer)
  Visual ID: 0x00000023, 24bit TrueColor
  R8:G8:B8:A8,
  level 0, double buffered

crystalspace.canvas.openglcommon.driverdb:
  Applied: Broken ATI point sprites (NV)

crystalspace.canvas.openglcommon:
  OpenGL renderer: GeForce 6600 LE/AGP/SSE2 (vendor: NVIDIA Corporation)
  version 2.0.2 NVIDIA 87.62
  Using windowed mode at resolution 1024x768.
  Pixel format: Color: 24 Alpha: 8 Depth: 24 Stencil: 8 AccumColor: 48
  AccumAlpha: 16 MultiSamples: 0
  Multisample: disabled

gne.Precursors:
  Joystick support enabled. Loading joystick plugin.

crystalspace.device.joystick.linux:
  No operable joystick found


crystalspace.pluginmgr.loadplugin:
  failed to initialize plugin 'crystalspace.device.joystick.linux'

gne.Precursors:
  Attempt to load plugin 'crystalspace.device.joystick.linux' failed
start BehaviorLaver
end construct BehaviorLaver

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1214236992 (LWP 10464)]
0xb773319e in csArrayElementHandler<csGLSuperLightmap*>::Construct (address=0xa91f9fe8, src=@0xbfd558ec)
    at array.h:114
114     array.h: No such file or directory.
        in array.h
(gdb)

will try hunt this down myself for laughs but not much to go on yet.

So, is this to old array problem that was supposed to be fixed or a new one?
regards and merry chirstmass


Offline Recon

  • Lieutenant
  • ***
  • Posts: 60
  • Karma: +1/-0
    • View Profile
Re: Cant get current precursors to run
« Reply #1 on: December 22, 2006, 10:42:58 am »
output from precorsorded

Code: [Select]
mec@mec-desktop:~/development/precursors$ ./precursorsded
Precursors dedicated server version 0.3.4 Build 1084 by G33X Nexus Entertainment.
SCF_NOTIFY: class crystalspace.cegui.wrapper (from /home/mec/development/CS/cscegui.so) has already been registered in a different context: '{none}' vs. '{none}' (from /home/mec/development/CS/cegui.so); this message appears only in debug builds
WARNING: Canvas driver couldn't find a font server plugin!  This is normal if you don't want one (warning displays only in debug mode)
WARNING: could not load plugin 'crystalspace.modelconverter.multiplexer'
WARNING: could not load plugin 'crystalspace.mesh.crossbuilder'
WARNING: csConsoleOutput: Unable to locate iFontServer
start BehaviorLaver
end construct BehaviorLaver
end init content manager
NOTIFY: Loading the server.
NOTIFY: Starting server on port 60600.
NOTIFY: Starting the server.
NOTIFY: Creating level entity...
NOTIFY: Loading level '/precursors/levels/flightsim'...
NOTIFY: Start loading level.
DLERROR (/home/mec/development/CS/glshader_cg.so): /usr/lib/libCgGL.so: undefined symbol: glVertexPointer
SCF_WARNING: factory returned a null instance for crystalspace.graphics3d.shader.glcg
        if error messages are not self explanatory, recompile CS with CS_DEBUG
WARNING: could not load plugin 'crystalspace.graphics3d.shader.glcg'
NOTIFY: Loading region 'space2'.
NOTIFY: Stop loading level.

« Last Edit: December 24, 2006, 09:37:49 am by Recon »

Offline Recon

  • Lieutenant
  • ***
  • Posts: 60
  • Karma: +1/-0
    • View Profile
Re: Cant get current precursors to run
« Reply #2 on: December 22, 2006, 11:42:11 am »
I'v run it down to this line in preClient.cpp ( around line 430 )

 cegui->Initialize ();


Offline contingencyplan

  • Villain
  • Ivory-Tower Theorist
  • Admiral
  • *****
  • Posts: 977
  • Karma: +1/-0
  • Must I sin once, and repent forever?
    • View Profile
    • My Blog
Re: Cant get current precursors to run
« Reply #3 on: December 22, 2006, 12:31:26 pm »
When you're looking to debug something, learning how to use gdb (or any debugger) can be very helpful. A quick tutorial:

Before you start, you must make sure you configured Precursors (and preferably other libs, like CrystalSpace and CEL) with --enable-debug. If you didn't pass that switch to configure before compiling, do a jam distclean, re-run configure, passing it the --enable-debug switch, and run jam again. Yes, it takes a while, but it's necessary to get the debugging information inserted into the code.

After compiling everything with debugging enabled, we want to load the program (precursors, in this case) into the gdb debugger. To start gdb from the command-line, simply execute
Code: [Select]
gdb precursors

This will load the precursors program into gdb. Now, simply enter the command run at the gdb prompt. Wait for it to crash (providing it input if necessary); when it does, gdb will stop and re-display the gdb prompt.

A backtrace shows the stack trace of function calls leading up to the crash. This is often very useful, and by default should be posted / pastebinned with any bug report or help request. The backtrace command is simply bt.

Other gdb commands, like setting breakpoints and printing variable values can also be very helpful. Use the help command to learn more, or ask questions here or in chat.

An alternative is to use an IDE that has support for gdb built-in. I use Eclipse CDT for most of my RaptorNL and Precursors work (when I am actually working on the projects), and it lets me do things like see variable values by simply mousing over the variable name. Setting breakpoints and such are also easier when doing it graphically. What IDE do you use? I might be able to help you configure it to work with gdb, if it doesn't already.

Trust me, even though I still use couts and printfs for debugging, the debugger is often a much better and less trial-and-error starting point. Learn to use it, and you'll love it forever.
We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true. 
    ~Robert Wilensky

It is not bigotry to be certain we are right; but it is bigotry to be unable to imagine how we might possibly have gone wrong.
    ~GK Chesterton

Men never do evil so completely and cheerfully as when they do it from a religious conviction.
    ~Blaise Pascal

Offline Recon

  • Lieutenant
  • ***
  • Posts: 60
  • Karma: +1/-0
    • View Profile
Re: Cant get current precursors to run
« Reply #4 on: December 22, 2006, 08:36:08 pm »
I dont know what is wrong, where is the end of a compile a debug run and an error trace. As far as i can see the call to
  cegui->Initialize ();

is wrong as the api defines

 iCEGUI::Initialize ( iScript * script = 0 )

but then the "= 0 " , I really dont understand. So i was thinking i would try the released version instead of te svn versions and see if i could get that to work.



Code: [Select]

config.status: executing Jamconfig commands
config.status: Jamconfig is unchanged
configure: creating ./config.status
config.status: creating Jamfile
config.status: creating installers/default.apspec
config.status: creating installers/default.nsi
config.status: creating docs/precursors.Doxyfile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing Jamconfig commands
config.status: Jamconfig is unchanged
configure:

Please note that this project uses Jam as its build tool,
therefore you must type 'jam' to build the project.

Jam home: http://www.perforce.com/jam/jam.html
Jam source: ftp://ftp.perforce.com/jam/

mec@mec-desktop:~/development/precursors$ jam Warning: no rules for file type .cpp~ defined (at file <src!Common!BehaviourLaye r>Level.cpp~).
Warning: no rules for file type .cpp~ defined (at file <src!Common!BehaviourLaye r>BehaviourLayer.cpp~).
Warning: no rules for file type .cpp~ defined (at file <src!Common!ContentManage r>ContentManager.cpp~).
...found 749 target(s)...
mec@mec-desktop:~/development/precursors$ gdb ./precursors
GNU gdb 6.4-debian
Copyright 2005 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 "i486-linux-gnu"...Using host libthread_db library "/ lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /home/mec/development/precursors/precursors
[Thread debugging using libthread_db enabled]
[New Thread -1214208320 (LWP 13412)]
preClient version 0.3.4 Build 1084 by G33X Nexus Entertainment.
created PreClient
SCF_NOTIFY: class crystalspace.cegui.wrapper (from /home/mec/development/CS/csce gui.so) has already been registered in a different context: '{none}' vs. '{none} ' (from /home/mec/development/CS/cegui.so); this message appears only in debug b uilds
Start PreClient
WARNING: could not load plugin 'crystalspace.sound.render.software'
WARNING: could not load plugin 'crystalspace.sound.loader.multiplexer'
WARNING: could not load plugin 'crystalspace.modelconverter.multiplexer'
WARNING: could not load plugin 'crystalspace.mesh.crossbuilder'
 end preclient
Star preClient::Application ()

crystalspace.canvas.glx2d:
  Opening GLX2D
  Creating Context
  Video driver GL/X version (direct renderer)
  Visual ID: 0x00000023, 24bit TrueColor
  R8:G8:B8:A8,
  level 0, double buffered

crystalspace.canvas.openglcommon.driverdb:
  Applied: Broken ATI point sprites (NV)

crystalspace.canvas.openglcommon:
  OpenGL renderer: GeForce 6600 LE/AGP/SSE2 (vendor: NVIDIA Corporation)
  version 2.0.2 NVIDIA 87.62
  Using windowed mode at resolution 1024x768.
  Pixel format: Color: 24 Alpha: 8 Depth: 24 Stencil: 8 AccumColor: 48
  AccumAlpha: 16 MultiSamples: 0
  Multisample: disabled

gne.Precursors:
  Joystick support enabled. Loading joystick plugin.

crystalspace.device.joystick.linux:
  No operable joystick found


crystalspace.pluginmgr.loadplugin:
  failed to initialize plugin 'crystalspace.device.joystick.linux'

gne.Precursors:
  Attempt to load plugin 'crystalspace.device.joystick.linux' failed
End plugins preClient::Application ()
Start blcpp preClient::Application ()
start BehaviorLaver
end construct BehaviorLaver
End blcpp preClient::Application ()
Start Content loader preClient::Application ()
end init content manager
contentManager->LoadDefaults ();
                cegui->Initialize ();
*** glibc detected *** free(): invalid pointer: 0xbfb5b2f0 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1214208320 (LWP 13412)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7adf9a1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7ae12b9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7b1387a in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7b19fd4 in malloc_usable_size () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7b1cca9 in realloc () from /lib/tls/i686/cmov/libc.so.6
#6  0xb772d109 in CS::Memory::AllocatorMalloc::Realloc (this=0xbfb5b2c4,
    p=0xbfb5b2f0, newSize=0) at cssysdef.h:615
#7  0xb773edac in csArrayElementHandler<csGLSuperLightmap*>::ResizeRegion<CS::Me mory::AllocatorPointerWrapper<csGLSuperLightmap*, CS::Memory::AllocatorMalloc> >  (alloc=@0xbfb5b2c4, mem=0xbfb5b2f0, relevantcount=3216356072,
    oldcount=138682648, newcount=0) at array.h:136
#8  0xb773ee10 in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLig htmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::InternalSetCapaci ty (this=0xbfb5b2b8, n=0) at array.h:410
#9  0xb773ee87 in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLig htmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::AdjustCapacity (
    this=0xbfb5b2b8, n=3216356073) at array.h:423
#10 0xb773eeab in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLig htmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::SetSizeUnsafe (
    this=0xbfb5b2b8, n=3216356073) at array.h:436
#11 0xb773f04f in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLig htmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::Push (
---Type <return> to continue, or q <return> to quit---
    this=0xbfb5b2b8, what=@0xbfb5b14c) at array.h:710
#12 0xb773478c in csGLTextureManager::CreateSuperLightmap (this=0xbfb5b1a4,
    w=-1078611532, h=-1078611536)
    at plugins/video/render3d/opengl/gl_txtmgr.cpp:1435
#13 0xb6402d5a in csCEGUIRenderer::Initialize (this=0xb639f010, script=0x0)
    at plugins/gui/cegui/ceguirenderer.cpp:60
#14 0x0806d19f in Precursors::preClient::Application ()
#15 0x0807ca68 in csApplicationFramework::Start ()
    at libs/cstool/csapplicationframework.cpp:71
#16 0x0807cc3a in csApplicationFramework::Main (this=0xbfb5bd90, argc=1,
    argv=0xbfb5bed4) at libs/cstool/csapplicationframework.cpp:131
#17 0x08068abc in main ()
(gdb)
« Last Edit: December 24, 2006, 09:38:28 am by Recon »

Offline Recon

  • Lieutenant
  • ***
  • Posts: 60
  • Karma: +1/-0
    • View Profile
Re: Cant get current precursors to run
« Reply #5 on: December 24, 2006, 09:32:17 am »
well I give up, cant get it to run after many many rebuilds of everthing. I will give it another try after CSv1 is released.

versions
CS    :26113
CEL   :2505
CEGUI :1462
PRE   :1084

Code: [Select]
(gdb) run
Starting program: /home/mec/development/precursors/precursors
[Thread debugging using libthread_db enabled]
[New Thread -1213892928 (LWP 28318)]
preClient version 0.3.4 Build 1084 by G33X Nexus Entertainment.
created PreClient
Start PreClient
WARNING: could not load plugin 'crystalspace.sound.render.software'
WARNING: could not load plugin 'crystalspace.sound.loader.multiplexer'
WARNING: could not load plugin 'crystalspace.modelconverter.multiplexer'
WARNING: could not load plugin 'crystalspace.mesh.crossbuilder'
 end preclient
Star preClient::Application ()

crystalspace.canvas.glx2d:
  Opening GLX2D
  Creating Context
  Video driver GL/X version (direct renderer)
  Visual ID: 0x00000023, 24bit TrueColor
  R8:G8:B8:A8,
  level 0, double buffered

crystalspace.canvas.openglcommon.driverdb:
  Applied: Broken ATI point sprites (NV)

crystalspace.canvas.openglcommon:
  OpenGL renderer: GeForce 6600 LE/AGP/SSE2 (vendor: NVIDIA Corporation)
  version 2.0.2 NVIDIA 87.62
  Using windowed mode at resolution 1024x768.
  Pixel format: Color: 24 Alpha: 8 Depth: 24 Stencil: 8 AccumColor: 48
  AccumAlpha: 16 MultiSamples: 0
  Multisample: disabled

gne.Precursors:
  Joystick support enabled. Loading joystick plugin.

crystalspace.device.joystick.linux:
  No operable joystick found


crystalspace.pluginmgr.loadplugin:
  failed to initialize plugin 'crystalspace.device.joystick.linux'

gne.Precursors:
  Attempt to load plugin 'crystalspace.device.joystick.linux' failed
End plugins preClient::Application ()
Start blcpp preClient::Application ()
start BehaviorLaver
end construct BehaviorLaver
End blcpp preClient::Application ()
Start Content loader preClient::Application ()
end init content manager
contentManager->LoadDefaults ();
                cegui->Initialize ();
Assertion failed: *(CookieType*)p == startCookie
Location:         libs/csutil/ptmalloc_wrap.cpp:127
Message:          Memory block has wrong cookie (was probably allocated in another module)
Call stack:
/home/mec/development/CS/gl3d.so [0xb771c47b]
/home/mec/development/CS/gl3d.so [0xb772e120]
/home/mec/development/CS/gl3d.so [0xb772e184]
/home/mec/development/CS/gl3d.so [0xb772e1fb]
/home/mec/development/CS/gl3d.so [0xb772e21f]
/home/mec/development/CS/gl3d.so [0xb772e3c3]
/home/mec/development/CS/gl3d.so [0xb7723b00]
/home/mec/development/CS/cegui.so [0xb634ed5a]
/home/mec/development/precursors/precursors(Precursors::preClient::Application()+0x1530) [0x80994e4]
/home/mec/development/precursors/precursors [0x80ac69c]
/home/mec/development/precursors/precursors [0x80ac86e]
/home/mec/development/precursors/precursors(csApplicationRunner<Precursors::preClient>::Run(int, char**)+0x34) [0x8095a28]
/home/mec/development/precursors/precursors(main+0x5d) [0x80953d5]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7b18ea2]
/home/mec/development/precursors/precursors(__gxx_personality_v0+0x71) [0x80952f9]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread -1213892928 (LWP 28318)]
CS::Debug::AssertMessage (expr=0xb77bc754 "*(CookieType*)p == startCookie",
    filename=0xb77bc735 "libs/csutil/ptmalloc_wrap.cpp", line=127,
    msg=0xb77bc6ec "Memory block has wrong cookie (was probably allocated in another module)")
    at libs/csutil/csassert.cpp:75
75          }
(gdb) bt
#0  CS::Debug::AssertMessage (expr=0xb77bc754 "*(CookieType*)p == startCookie",
    filename=0xb77bc735 "libs/csutil/ptmalloc_wrap.cpp", line=127,
    msg=0xb77bc6ec "Memory block has wrong cookie (was probably allocated in another module)")
    at libs/csutil/csassert.cpp:75
#1  0xb776803b in ptrealloc (P=0x822c060, n=140070240) at libs/csutil/ptmalloc_wrap.cpp:125
#2  0xb771c47b in CS::Memory::AllocatorMalloc::Realloc (this=0xbfaa9cd4, p=0x822c060, newSize=140070240)
    at cssysdef.h:665
#3  0xb772e120 in csArrayElementHandler<csGLSuperLightmap*>::ResizeRegion<CS::Memory::AllocatorPointerWrapper<csGLSuperLightmap*, CS::Memory::AllocatorMalloc> > (alloc=@0xbfaa9cd4, mem=0x822c060,
    relevantcount=3215629928, oldcount=3215629788, newcount=3256243032) at array.h:136
#4  0xb772e184 in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLightmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::InternalSetCapacity (this=0xbfaa9cc8, n=3256243032) at array.h:410
#5  0xb772e1fb in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLightmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::AdjustCapacity (this=0xbfaa9cc8, n=3215629929) at array.h:423
#6  0xb772e21f in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLightmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::SetSizeUnsafe (this=0xbfaa9cc8, n=3215629929) at array.h:436
#7  0xb772e3c3 in csArray<csGLSuperLightmap*, csArrayElementHandler<csGLSuperLightmap*>, CS::Memory::AllocatorMalloc, csArrayCapacityDefault>::Push (this=0xbfaa9cc8, what=@0xbfaa9b5c) at array.h:710
#8  0xb7723b00 in csGLTextureManager::CreateSuperLightmap (this=0xbfaa9bb4, w=-1079338044, h=-1079338048)
    at plugins/video/render3d/opengl/gl_txtmgr.cpp:1435
#9  0xb634ed5a in csCEGUIRenderer::Initialize (this=0xb62eb010, script=0x0)
    at plugins/gui/cegui/ceguirenderer.cpp:60
#10 0x080994e4 in Precursors::preClient::Application (this=0xbfaaa810) at src/Client/preClient.cpp:436
#11 0x080ac69c in csApplicationFramework::Start () at libs/cstool/csapplicationframework.cpp:71
#12 0x080ac86e in csApplicationFramework::Main (this=0xbfaaa810, argc=1, argv=0xbfaaa984)
    at libs/cstool/csapplicationframework.cpp:131
#13 0x08095a28 in csApplicationRunner<Precursors::preClient>::Run (argc=1, argv=0xbfaaa984)
    at csapplicationframework.h:441
#14 0x080953d5 in main (argc=1, argv=0xbfaaa984) at src/Client/main.cpp:55
(gdb)



« Last Edit: December 24, 2006, 09:39:32 am by Recon »

Offline Morgul

  • GNE Founder
  • Godlike Fuzzy Dice
  • Grand Admiral
  • **********
  • Posts: 2086
  • Karma: +21/-4
  • Godlike Fuzzy Dice
    • View Profile
    • G33X Nexus Entertainment
Re: Cant get current precursors to run
« Reply #6 on: December 25, 2006, 07:19:42 pm »
the memory block issue means you haven't disabled ptmalloc with the command: --disable-ptmalloc.
"Just because my math may tell lies doesn't mean that I don't understand the quantum mechanics of it all." --Caenus

The popular videogame "Doom" is based loosely around the time Satan borrowed two bucks from Vin Diesel and forgot to pay him back.

"In the beginning there was nothing. And it exploded." --Terry Pratchett