Hi again,
> >
> > I understand that, however i am under tight time constrains and I
> felt it
> > might be easier to first go the copy-and-paste-way,
>
> ok, where did you copy from (e.g. from which OpenSG class) ?
Iirc I copied from OSGGeometry. I felt it might be wise to copy from a class
that is also derived from NodeCore :-)
>
> > and later "repair" the code. I already did the same thing with the
> include directories,
> > as I have no idea how cmake works and I already had working
> solution/projects. So I
> > added all the OpenSG include paths using a custom property sheet and
> decided
> > to move to cmake when I have time for it.
>
> ok. Short question, how do you compile OpenSG ?. Weird crashes can
> easily be a mismatch of compile time parameters, especially crashes
> that early.
That is correct, however I am using Visual Studio 2008 and I think you can't
do much wrong anymore here as Single-Threaded libraries are long gone. I am
building Multithreaded DLL Debug and the compile time parameters are:
/Od /I <stripped a lot of include paths here> /D "WIN32" /D "_WINDOWS" /D
"_DEBUG" /D "_OSG_HAVE_CONFIGURED_H_" /D "OSG_BUILD_DLL" /D "OSG_DEBUG" /D
"OSG_WITH_GLUT" /D "OSG_WITH_GIF" /D "OSG_WITH_TIF" /D "OSG_WITH_JPG" /D
"GLEW_STATIC" /D "GALE_NO_AUTO_LINK" /D "_EMBEDDED_MANIFEST" /D
"_CRT_SECURE_NO_WARNINGS" /D "_AFXDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd
/Yu"stdafx.h" /Fp"../../intermediate\RibbonGUI/Debug.pch"
/Fo"../../intermediate\RibbonGUI/Debug/"
/Fd"../../intermediate\RibbonGUI/Debug/" /W3 /nologo /c /ZI /TP
/errorReport:prompt
Now as I look at it, I see that all the defines are from the 1.8 build, but
I have no idea what needs to be defined there.
> With the risk of getting another that should have been documented, you
> can easily integrate custom libs into the main OpenSG cmake build
> structure (OSG_EXTRA_EXTERNAL_MODULES). I just committed an example
> that
> uses it and which should be easily adapted :
>
> Examples/CustomIntegration/AlgorithmStage/GPUVolRT/AsAlgorithmStage
>
I don't see how that would help in my case, as I am building an application
(well actually two applications with different GUIs) using OpenSG. But I
will have a look at it.
>
> > Unfortunately now I am at a point where I am not sure I can continue
> that
> > way. My solution compiles finally, but the generated application
> crashes
> > instantly on startup. It looks like the WinMain is about to
> initialize
> > global and static variables, and in the process of initializing the
> > FieldContainerType variable of one of my custom node types it can't
> copy the
> > xml string variable (which I don't use anyway, I left it at the
> default
> > value "").
>
> could you send a stack trace ?.
Of course:
> msvcr90.dll!memcpy(unsigned char * dst=0x02a40020, unsigned char *
src=0x007efe38, unsigned long count=8322716) Line 188 Asm
msvcr90.dll!memcpy_s(void * dst=0x02a40020, unsigned int
sizeInBytes=8322719, const void * src=0x007efe38, unsigned int
count=8322716) Line 67 + 0xc bytes C
msvcp90.dll!std::char_traits<char>::_Copy_s(char *
_First1=0x02a40020, unsigned int _Size_in_bytes=8322719, const char *
_First2=0x007efe38, unsigned int _Count=8322716) Line 583 C++
msvcp90.dll!std::_Traits_helper::copy_s<std::char_traits<char>
>(char * _First1=0x02a40020, unsigned int _Size=8322719, const char *
_First2=0x007efe38, unsigned int _Count=8322716,
std::_Secure_char_traits_tag __formal={...}) Line 714 + 0x11 bytes C++
msvcp90.dll!std::_Traits_helper::copy_s<std::char_traits<char>
>(char * _First1=0x02a40020, unsigned int _Size=8322719, const char *
_First2=0x007efe38, unsigned int _Count=8322716) Line 706 + 0x14 bytes C++
msvcp90.dll!std::basic_string<char,std::char_traits<char>,std::allocator<cha
r> >::assign(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
_Right=",þ~", unsigned int _Roff=0, unsigned int _Count=4294967295) Line
1067 + 0x2c bytes C++
msvcp90.dll!std::basic_string<char,std::char_traits<char>,std::allocator<cha
r> >::basic_string<char,std::char_traits<char>,std::allocator<char> >(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
_Right=",þ~") Line 734 C++
OSGBase.dll!OSG::FieldContainerType::FieldContainerType(const char *
szName=0x005d3238, const char * szParentName=0x005d322c, const char *
szGroupName=0x00000000, const unsigned int uiNameSpace=0,
OSG::FieldContainer * (unsigned __int64)* fPrototypeCreate=0x003ec050, void
(OSG::TypeBase::InitPhase)* fInitMethod=0x003ec820, void
(OSG::TypeBase::InitPhase)* fExitMethod=0x00000000, void
(OSG::ReflexiveContainerType *)* descInsertFunc=0x00000000, bool
bDescsAddable=false, unsigned __int64 bvUnmarkedOnCreate=0,
std::basic_string<char,std::char_traits<char>,std::allocator<char> >
fcdXML=",þ~",
std::basic_string<char,std::char_traits<char>,std::allocator<char> >
typeDoc=<Bad Ptr>) Line 95 + 0xb6 bytes C++
BioSG-test.exe!`dynamic initializer for
'OSG::SecstrucNodeCore::_type''() Line 21 + 0xb9 bytes C++
msvcr90d.dll!_initterm(void (void)* * pfbegin=0x005c8b44, void
(void)* * pfend=0x005c90b4) Line 903 C
BioSG-test.exe!__tmainCRTStartup() Line 501 + 0xf bytes C
BioSG-test.exe!WinMainCRTStartup() Line 403 C
kernel32.dll!752deccb()
[Frames below may be incorrect and/or missing, no symbols loaded for
kernel32.dll]
ntdll.dll!770fd24d()
ntdll.dll!770fd45f()
> Is that really 'one of' or more 'the
> first' ?
I too guessed that it might be the first and walked through the code using
the debugger. It is indeed the first of my nodes, but it is not the first
assignment to a string.
> One easy thing that is always worth a try is to use "foo" as
> the value instead of "".
Is the content of _fcdXML (in FieldContainerType) crucial?
For the record, this is what my definition looks like:
FieldContainerType SecstrucNodeCore::_type(
"SecstrucRenderNode", "NodeCore", NULL, 0,
reinterpret_cast<PrototypeCreateF>(&SecstrucNodeCore::createEmpty),
SecstrucNodeCore::initMethod);
It can't have anything to do with the implementation of createEmpty as far
as I can see. It crashes in the initialize list of FieldContainerType,
before the actual constructor.
> > Maybe I did something wrong when implementing the new nodes. I might
> have to
> > create the fcd files earlier than I thought. By the way, is there a
> tutorial
> > about that? If not, add it to my wish list ;-)
>
> Now that is something where cut&paste makes sense ;).
I guessed as much, but all the attributes in the xml files are undocumented
... ;-)
> > I already read about commitChanges(), but I thought there must be
> something
> > else I have to do. I guess when creating nodes using the fcd
> mechanism
> > everything needed is automatically generated.
> >
>
> what exactly is not working ? The crash mentioned above should have
> nothing to do with it.
No problems here yet, I was just guessing. I need the app to NOT crash
before I can start synchronizing :-)
Aloha, Andi
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users