Hi Antonio,

> Hello,
> 
> 
>>Hi,
>>
>>I'm trying to make my application "crash save". As
>>you might know, the loader sometimes crashes when
>>loading corrupt files or it sometimes just happens
>>with obj or 3ds files. So I tried to wrap all the
>>loader stuff in try catch statements, but they
>>didn't help either. As I'm not a try-catch guru,
>>I don't really know what's happening. Some reading
>>on google suggests me that it might also depend on
>>how the lib/app was compiled. Has anybody here a
>>deeper insight about the issue? I just would like
>>to avoid those hard crashes..... (BTW, I'm talking
>>about windows...).
> 
> 
> I tried to debug the application and here's what
> I found:
> 
> The loader crashes in osgsimplescenemanager.cpp
> in the method "readProgress(void * OSG_CHECK_ARG(data))"
> 
> The funny thing is that there's somehow a race condition,
> if I set a breakpoint and step through the method it does
> not crash, if I don't set a breakpoint it does! Also disabling
> the setReadProgressCB in my application resolves the problem.
> 
> Perhaps the input stream is closed and removed while the
> readProgress thread is sleeping in it's while loop?
> 
> I am loading an obj file with "Invalid d entry in blabla.mtl"
> 
> Any ideas? 

yes the threading code is a bit unsafe. You should add the callback via
setReadProgressCB(progress, false) this won't create a extra thread but 
it is not implemented for all loaders yet only for osb and wrl. I can 
implement the remaining loaders on friday.

Andreas

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to