Author Topic: How to use gdb in C::B?  (Read 20829 times)

sethjackson

  • Guest
Re: How to use gdb in C::B?
« Reply #15 on: November 26, 2005, 03:36:46 am »
I placed the comment " / / " in the line where the debbuger stops, int the class MapaCtrl exactly in that line:

Code
    ...

  seletorMapa = cena->createOctTreeTriangleSelector(nivelMalha->getMesh(0), nivelNodo, 128); //the chash is in that line!!!
    ...

:wink:

with relationship to the " sleep ", sorry, that is a test that I am doing and I posted with the code, please ignore that line.. :)

Thanks for the answer,

                Selles



Ok about the sleep part. :)

Umm what are the function values at that moment?

selles

  • Guest
Re: How to use gdb in C::B?
« Reply #16 on: November 27, 2005, 12:56:39 am »
the 1st argument is the mesh 3d that is the map scene(was loaded from a file)
the 2nd argument is the node which the mesh map is attachedin the scene manager
the 3rd argument is the minimal polygons per node.

so, I have created the triangle selector for the mesh map, this allows the engine to do the collision.

note that there are a statement "ITriangleSelector* seletor." in the begin of the  namespace Cente3D but outside any class..

in MapaCtrl class was done te detection of the scene (mesh map) for the collision, continuing, in the AtorLocal class was created a collision response for the collision of a actor (player) with the scene..for that, note that the seletor pointer was used, therefore seletor is a global pointer..I already to inherit that pointer, but hte program not compile.

that is the codeline use the seletor pointer.

Code

                                      ...

       ISceneNodeAnimator* nodoAnim = cena->createCollisionResponseAnimator(seletorAtor, nodo,
                                                                                                                vector3df(raio.X,
                                                                                                                              raio.Y,
                                                                                                                              raio.Z),
                                                                                                               vector3df(0.0f, -1.0f ,0.0f),
                                                                                                               vector3df(0.0f, -raio.Y, 0.0f));

                                      ...



the collision probably run of transparent way  in a internal loop..

thanks,

Selles

sethjackson

  • Guest
Re: How to use gdb in C::B?
« Reply #17 on: November 27, 2005, 01:50:05 am »
I meant what are the function values?. An example would be nivelNodo and the value would be 1. Sorry I'm confusing sometimes. :)

selles

  • Guest
Re: How to use gdb in C::B?
« Reply #18 on: November 28, 2005, 04:15:31 pm »
oh, I was who didn't understand your question  :oops: ..sorry

I have added the pointer in watch, and in exact moment of the error, the values are:

seletorMapa = (struct ITriangleSelector*) 0xbaadf00d
nivelMalha = (struct IAnimatedMesh*) 0x0
nivelNodo = (struct ISceneNode*) 0x0

also sorry the slowness in posting here, it is that am very close of a condition of an athlete for here :lol:

thanks,

Selles

sethjackson

  • Guest
Re: How to use gdb in C::B?
« Reply #19 on: November 28, 2005, 04:43:55 pm »
Ok are nivelMaha and nivelNodo supposed to be 0? That is all I can think of unless selectorMapa is supposed to be 0.

Quote
also sorry the slowness in posting here, it is that am very close of a condition of an athlete for here :lol:

Off topic but what sport(s) do you play?

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: How to use gdb in C::B?
« Reply #20 on: November 28, 2005, 04:45:49 pm »
Code
    ...
  seletorMapa = cena->createOctTreeTriangleSelector(nivelMalha->getMesh(0), nivelNodo, 128); //the chash is in that line!!!
    ...
I have added the pointer in watch, and in exact moment of the error, the values are:

seletorMapa = (struct ITriangleSelector*) 0xbaadf00d
nivelMalha = (struct IAnimatedMesh*) 0x0
nivelNodo = (struct ISceneNode*) 0x0

Well, there's your problem: your line includes nivelMalha->getMesh(0), but nivelMalha is 0x0. This means you're dereferencing a null pointer, which is pretty much never a good thing to do ;).

Ok are nivelMaha and nivelNodo supposed to be 0? That is all I can think of unless selectorMapa is supposed to be 0.

As seen above, at the very least nivelMalha isn't supposed to be.

selles

  • Guest
Re: How to use gdb in C::B?
« Reply #21 on: November 28, 2005, 06:45:19 pm »
 no understand..

the application is right, it is compiling, the mesh appear usually, how that is possible?   :?

thanks,

Selles


sethjackson

  • Guest
Re: How to use gdb in C::B?
« Reply #22 on: November 28, 2005, 06:52:08 pm »
no understand..

the application is right, it is compiling, the mesh appear usually, how that is possible?   :?

thanks,

Selles



You don't understand? Or do I misunderstand. :)

selles

  • Guest
Re: How to use gdb in C::B?
« Reply #23 on: November 28, 2005, 07:35:34 pm »
no, no Seth,

I made a joke ..I wanted to say that am working a lot  :lol: :lol: :lol:

Selles

sethjackson

  • Guest
Re: How to use gdb in C::B?
« Reply #24 on: November 28, 2005, 07:43:16 pm »
no, no Seth,

I made a joke ..I wanted to say that am working a lot  :lol: :lol: :lol:

Selles


Haha  I get it now. :lol:

selles

  • Guest
Re: How to use gdb in C::B?
« Reply #25 on: November 28, 2005, 11:26:31 pm »

no understand..

the application is right, it is compiling, the mesh appear usually, how that is possible? :?

thanks,

Selles



You don't understand? Or do I misunderstand. :)

 I understood what is happening, I tell that because I don't understand how do it can work when it usually rotates and not to work when it rotates for the debug?

 eccentric.. ?!

thanks,

Selles

sethjackson

  • Guest
Re: How to use gdb in C::B?
« Reply #26 on: November 29, 2005, 02:45:54 am »
Yes that is very odd...  :?

selles

  • Guest
Re: How to use gdb in C::B?
« Reply #27 on: November 29, 2005, 08:07:03 pm »
Well..It should be some mistake of GDB or of the compiler. . in my code this doesn't make sense to be

 thanks to you I understood those mistakes and I will always verify the pointers when there are like this mistakes..

Thank you,

           Selles

« Last Edit: November 29, 2005, 08:09:47 pm by selles »