Stange Exceptions with Delegates

Trevor Parscal trevorparscal at hotmail.com
Fri Jan 11 14:40:00 PST 2008


Im experiencing a very strange behavior with delegates. When using some OpenGL functions in a delegate my program will give me

object.Exception: Access Violation
- when there's a Cout call at the begining and end of the delegate

object.Exception: Win32 Exception
- when it's only OpenGL calls in the delegate

The strangest part is that the Cout calls will succeed in printing to the console, meaning the access violation isn't in the OpenGL calls. I also placed some Cout calls before and after the actual calling of the delegate, and the first prints, while the second (post delegate calling) never does.

So what could be happening between the last call inside of a delegate and the delegate being done?

Are there any other methods of tracking down the problem?



More information about the Digitalmars-d mailing list