The Try/Catch block doesn't help because, as I said, no exception is thrown but a window pops up.
In the meantime, however, I was able to solve the problem:
In Visual C#, when a bitmap is assigned, depending on current usage of memory and other factors, the process of actually constructing the bitmap may be deferred, sometimes until the assigned bitmap is referenced for the first time.
In order to be able to still produce that bitmap at that later time, Visual C# blocks the original source of the bitmap, be it a file or a stream or whatever, because it still depends on that source in order to construct the bitmap.
In our case, some thread probably tried to access such a blocked source and thus caused that GDI+ error.
The workaround is to construct a second bitmap immediately after the GetChartBitmap() call in order to force Visual C# to actually construct the bitmap immediately after assigning it. The second step is then to set the first Bitmap to NULL in order to let Visual C# free its source.
The code to avoid the GDI+ error is as follows:
CODE:
Please log in to see this code.
With this trick we could avoid the GDI+ error and so far didn't have it again.
For a complete discussion of this issue see:
https://support.microsoft.com/en-us/kb/814675