Here is keyas example code: http://www.purebasic.fr/english/viewtop ... 13&t=64688
And this is the error which occurs approximately after one minute runtime.

This error is reproducable on my system.
Copy keyas code into the IDE, change the path and filename to an existing picture in line 88 and start the programm. After the window appears and the two pictures are shown click into the PB IDE and scroll up and down a few lines. After this get up and make a cup of coffee for example or just wait a while. Without any further intervention the program will crash.
As there are no POKEs or other direct memory access in the code, I think the error have nothing to do with the main function of the programm.