Hello,
for my application I have a worker and a gui thread. I know EW is not thread safe and I never should call a GUI method from a other thread.
But for my application I need to use a worker thread to initialize some hardware timer, use spi, work with interrupts and a lot of other thinks. But only for a short time. If I want to do this I send my GUIThread to the waiting status. If I have collected my values from my ADC, I set osThreadSignal an continue with the GUI Thread. But after the next touch event the Code runs into a exception handler.
GraphicsCanvas GraphicsCanvas_AttachBitmap( GraphicsCanvas _this, XHandle aBitmap )
{
XInt32 noOfFrames;
XPoint frameSize;
XInt32 frameDelay;
if ( _this->Super1.bitmap != 0 )
{
EwThrow( EwLoadString( &_Const0004 ));
return 0;
}
This code is part of the Graphics.c. Here my code ends at the EwThrow.
I am not really sure why this exception is triggered. I don't use any parts of the GUI. There is no exchange with the GUI at the moment. Or there are some GUI internal timer which creates some problems? Is it not allowed to send the GUI in waiting status at the end of the while loop?
Kind regards
Alex