Hello Sadi,
Sadi Tanis wrote:
> Hello Carsten,
>
> thank you for the quick answer. I realized that comparing a special
> string with the full name of a node does not do what I want at the end.
> So I have fixed it now by giving the method a second input. Know
> "generateJointList" compares a substring at the beginning of each name
> with a given string. And only the matches are inserted in the list. For
> this the idea with casting was great :)
> But at the end I have jet an error message :( :
>
> Unbehandelte Ausnahme bei 0x7c3417fb (msvcr71.dll) in 01hello.exe:
> 0xC0000005: Zugriffsverletzung-Leseposition 0x00000000.
>
> I know for certain that the matter is my generateJointList method but
> why. For me it seems correct now. Any hints where to change something?
are there Nodes in your scene that do not have a name ?
In that case getName would return NULL, which is not valid as input for
the std::string constructor.
You need to compare the pointer returned by getName against NULL first
and only if it is different can use it.
This type of runtime error is normally relatively easy to find if you
run your program in a debugger and when it crashes look at the backtrace
(or call stack, i.e. the sequence of functions that was called when the
error occurred). With that you can then examine the arguments to
functions and find where the NULL pointer dereference came from.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users