Mario Lüttich wrote:
> I use now the Daily Build and i have new problems. If I start my 
> program the Error is:
>
> "Managed Debugging Assistant 'LoaderLock' has detected a problem in 
> 'D:\\Projects\Debug\test.exe'.
> Additional Information: Attempting managed execution inside OS Loader 
> lock. Do not attempt to run managed code inside a DllMain or image 
> initialization function since doing so can cause the application to 
> hang."
It sound like you are compiling for .NET/CLR in some way, using the /clr 
switch. Otherwise you shouldn't get stuff about 'managed' things (which 
is MS-speak for their .NET virtual machine doing stuff).

Are you building managed/.net stuff? If so, can you try doing a regular 
win32 exe build? (I know OpenSG works with Java, which is a bit less 
intrusive, but I haven't tried .NET yet..)

Also, can you provide a stack trace to the function causing that 
problem? (it might have some unknown opensg functions in it, if you run 
in release, but it'd still be interesting to see what part of the OS 
calls OpenSG which then fails.)
> No I found the Problem does not occur if I use opensg in debug mode. 
> (OSGBaseD.lib OSGSystemD.lib  OSGWindowWin32D.lib) I think if my dll 
> is initialized then the opensg is initialized and opensg sets a thread 
> lock and the init function is never left. 
Hm? The message above seems to indicate a problem in a debug build, but 
here you say it does not occur in debug? What is the right thing?

Please check that you do not call call osginit from DLLMain. That 
probably a very bad thing to do. (I'm guessing here..)

If you do, try calling it from a static variable initializer function 
outside dllmain, i.e.:

static bool init = osginit(), true;
void dllmain() { .. }

Because dllmain will be called _before_ any static variables are 
initialized, and the OS is quite picky about what can be done in there. 
(See Win32 SDK docs for DLLMain)

Cheers,
/Marcus

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to