Thread problem

Hopefully this will be a simple question to answer.

I have a derived CWinThread class and in my InitInstance() I call some 3rd party library which appears to be crashing with an access violation in the function below:

Why is this occurring?

Thanks!


static void _callthreadstartex(void)

{

_ptiddata ptd; /* pointer to thread's _tiddata struct */

/* must always exist at this point */

ptd = _getptd();

/*

* Guard call to user code with a _try - _except statement to

* implement runtime errors and signal support

*/

__try {

_endthreadex (

( (unsigned (__CLR_OR_STD_CALL *)(void *))(((_ptiddata)ptd)->_initaddr) )

( ((_ptiddata)ptd)->_initarg ) ) ;

}

__except ( _XcptFilter(GetExceptionCode(), GetExceptionInformation()) )

{

/*

* Should never reach here

*/

_exit( GetExceptionCode() );

} /* end of _try - _except */

}
[1064 byte] By [Rigel] at [2007-11-20 1:15:16]
# 1 Re: Thread problem
Not enough information to even guess. What does your code look like?

Viggy
MrViggy at 2007-11-9 13:59:00 >
# 2 Re: Thread problem
Hey MrViggy,

Yeah, let me regather my thoughts and I'll be back to repost with a more detailed explanation.

Thanks.
Rigel at 2007-11-9 14:00:10 >
# 3 Re: Thread problem
Actually... false alarm.

It appears that there is possibly something wrong with the 3rd party libraries. I've contacted the vendor.

Thanks
Rigel at 2007-11-9 14:01:09 >
# 4 Re: Thread problem
Sounds to me like the third party libraries may not be completely thread-safe. It's good that you contacted them.

-Greg Dolley
greg_dolley at 2007-11-9 14:02:03 >