exception

classic Classic list List threaded Threaded
14 messages Options
Raphael Raphael
Reply | Threaded
Open this post in threaded view
|

exception

I have an exception when I run osgviewer with yahoo_maps.earth file.
It used to work but since I upgraded osg to 2.8.0 and osgEarth to the current svn version, I have this exception when the application start.
HEre is tha calss stack (I use curl 7.19.2)

  ntdll.dll!DbgBreakPoint()
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
  ntdll.dll!RtlpNtMakeTemporaryKey()  + 0x6737 bytes
  ntdll.dll!RtlpNtMakeTemporaryKey()  + 0x6b74 bytes
  ntdll.dll!RtlValidateHeap()  + 0xe0 bytes
  kernel32.dll!HeapValidate()  + 0x14 bytes
  msvcr80d.dll!_CrtIsValidHeapPointer()  + 0x15a bytes
  msvcr80d.dll!_free_dbg()  + 0x196 bytes
  msvcr80d.dll!_free_dbg()  + 0x4e bytes
  msvcr80d.dll!free()  + 0xe bytes
> osgdb_curld.dll!destroy_thread_sync_data(thread_sync_data * tsd=0x00000000)  Line 137 + 0x7 bytes C
  osgdb_curld.dll!gethostbyname_thread(void * arg=0x00000000)  Line 275 C
  msvcr80d.dll!_beginthreadex()  + 0x221 bytes
  msvcr80d.dll!_beginthreadex()  + 0x1c7 bytes
  kernel32.dll!GetModuleFileNameA()  + 0x1b4 bytes
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: exception

Hi Raphael,

We're you using OSG 2.6 previously? Are you doing a complete rebuild of osgEarth?  Does it work in release mode?  I'm using the version of CURL that comes with Mike Weiblen's 3rd Party dependencies for windows and I'm not seeing that error with OSG 2.8.

Thanks!

Jason



2009/3/25 Raphael (via Nabble) - No Reply <[hidden email]>
I have an exception when I run osgviewer with yahoo_maps.earth file.
It used to work but since I upgraded osg to 2.8.0 and osgEarth to the current svn version, I have this exception when the application start.
HEre is tha calss stack (I use curl 7.19.2)

  ntdll.dll!DbgBreakPoint()
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
  ntdll.dll!RtlpNtMakeTemporaryKey()  + 0x6737 bytes
  ntdll.dll!RtlpNtMakeTemporaryKey()  + 0x6b74 bytes
  ntdll.dll!RtlValidateHeap()  + 0xe0 bytes
  kernel32.dll!HeapValidate()  + 0x14 bytes
  msvcr80d.dll!_CrtIsValidHeapPointer()  + 0x15a bytes
  msvcr80d.dll!_free_dbg()  + 0x196 bytes
  msvcr80d.dll!_free_dbg()  + 0x4e bytes
  msvcr80d.dll!free()  + 0xe bytes
> osgdb_curld.dll!destroy_thread_sync_data(thread_sync_data * tsd=0x00000000)  Line 137 + 0x7 bytes C
  osgdb_curld.dll!gethostbyname_thread(void * arg=0x00000000)  Line 275 C
  msvcr80d.dll!_beginthreadex()  + 0x221 bytes
  msvcr80d.dll!_beginthreadex()  + 0x1c7 bytes
  kernel32.dll!GetModuleFileNameA()  + 0x1b4 bytes



View message @ http://n2.nabble.com/exception-tp2535377p2535377.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Raphael Raphael
Reply | Threaded
Open this post in threaded view
|

Re: exception

I used OSG 2.6 previsouly. With my current version, you guessed right : it works in release but not in debug. I tried to use curl in static and dll mode. Same result. I've done a complete rebuild, no effect on my debug crash.
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: exception

Hi Raphael,

Just a guess, but see what happens if you link against curlib.lib in debug mode instead of curllibD.lib.  CURL is a C library, so this should be fine.  This should tell you if there is a problem with the debug build of your curl library.

Thanks!

Jason

On Wed, Mar 25, 2009 at 6:44 PM, Raphael (via Nabble) - No Reply <[hidden email]> wrote:
I used OSG 2.6 previsouly. With my current version, you guessed right : it works in release but not in debug. I tried to use curl in static and dll mode. Same result. I've done a complete rebuild, no effect on my debug crash.


View message @ http://n2.nabble.com/exception-tp2535377p2535438.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Raphael Raphael
Reply | Threaded
Open this post in threaded view
|

Re: exception

There is still the problem when I link with the release version of curl.
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: exception

Hi Raphael,
Did you build the CURL library yourself?  Try using Mike's pre-built dependencies which are available via SVN at: https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/3rdParty_win32binaries_vs80sp1/

I assume you're using Visual Studio 2005 SP1, so these binaries should be ok.

Jason

On Wed, Mar 25, 2009 at 6:57 PM, Raphael (via Nabble) - No Reply <[hidden email]> wrote:
There is still the problem when I link with the release version of curl.


View message @ http://n2.nabble.com/exception-tp2535377p2535480.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Raphael Raphael
Reply | Threaded
Open this post in threaded view
|

Re: exception

it still doesn't work
Raphael Raphael
Reply | Threaded
Open this post in threaded view
|

Re: exception

I am looking for differences between release and debug version.
Using Dependency Walker, I found that in osgdb_earth dll, at the first level of dependent dll, the release version depends on Openthreads whereas the debug version doesn't depend on it. Is it normal ?
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: exception

Hi Raphael,

osgdb_earth should depend indirectly on OpenThreads in both debug and release because the plugin depends on osg.dll, which itself depends on OpenThreads.  Do other OSG apps that you have run fine in debug with 2.8? 

Are you sure osgEarth and OpenSceneGraph are linking against the same version of CURL?

Thanks,

Jason

On Thu, Mar 26, 2009 at 7:13 PM, Raphael (via Nabble) - No Reply <[hidden email]> wrote:
I am looking for differences between release and debug version.
Using Dependency Walker, I found that in osgdb_earth dll, at the first level of dependent dll, the release version depends on Openthreads whereas the debug version doesn't depend on it. Is it normal ?


View message @ http://n2.nabble.com/exception-tp2535377p2541602.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Raphael Raphael
Reply | Threaded
Open this post in threaded view
|

Re: exception

Yes, OpenSceneGraph and osgearth both link against the same version of CURL. OpenSceneGraph seems to work ok. The exception is raised in curl "hostthre.c", I end up in Curl_wait_for_resolv function which is playing with threads.
But I think I have something slightly different from your what you say : in release, osgdb_earth depends directly from Openthreads (through the atomic::opertor++ ). In debug, the dependency is indirect.
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: exception

Hi Raphael,

Are you using the default OSG settings in CMake or are you explicitly turning on Atomic operators?  My OpenThreads::Config has _OPENTHREADS_ATOMIC_USE_MUTEX defined, is your's using _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED?

You may want to try not using atomic operators and see if that helps, I'm not sure how to enable/disable them in CMake, but I believe you can.

Jason

On Thu, Mar 26, 2009 at 7:57 PM, Raphael (via Nabble) - No Reply <[hidden email]> wrote:
Yes, OpenSceneGraph and osgearth both link against the same version of CURL. OpenSceneGraph seems to work ok. The exception is raised in curl "hostthre.c", I end up in Curl_wait_for_resolv function which is playing with threads.
But I think I have something slightly different from your what you say : in release, osgdb_earth depends directly from Openthreads (through the atomic::opertor++ ). In debug, the dependency is indirect.



View message @ http://n2.nabble.com/exception-tp2535377p2541767.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Raphael Raphael
Reply | Threaded
Open this post in threaded view
|

Re: exception

I used _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED. I changed to _OPENTHREADS_ATOMIC_USE_MUTEX but I still have the debug exception.
It's weird.
raphael raphael
Reply | Threaded
Open this post in threaded view
|

Re: exception

I finally found...
osg Cmake links with the release version of curl, even in debug mode. In a previous mail, I said I tried to use the release version of curl in osgEarth too, and it didn't work. In fact I had to use the debug version of curl in osg !
Maybe it would be a good thing to synchronize the two projects.  I was also wondering about the _OPENTHREADS_ATOMIC_USE_MUTEX option : do we have to use it (because this is not the default option).
Thank you for your good advice !
 
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: exception

Hi Rapheal,

Great to hear you got it working!

You shoudln't need to use the _OPENTHREADS_ATOMIC_USE_MUTEX if the interlocked stuff is working well for you, I was just taking a guess:)

As for syncing the versions of CURL between the projects, it's really up to you to decide which version of 3rd party dependencies to use and to keep them in sync.  The same goes for any of the 3rd party depends like expat and GDAL.

Thanks!

Jason

On Fri, Mar 27, 2009 at 11:04 AM, raphael (via Nabble) - No Reply <[hidden email]> wrote:
I finally found...
osg Cmake links with the release version of curl, even in debug mode. In a previous mail, I said I tried to use the release version of curl in osgEarth too, and it didn't work. In fact I had to use the debug version of curl in osg !
Maybe it would be a good thing to synchronize the two projects.  I was also wondering about the _OPENTHREADS_ATOMIC_USE_MUTEX option : do we have to use it (because this is not the default option).
Thank you for your good advice !
 


View message @ http://n2.nabble.com/exception-tp2535377p2544722.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.