Flash kill WebKit

I build with AppleScript Studio a little application (adding WebKit.framework) that show some web pages in a WebKit window.
All works fine except that application quit immediately as soon as in the page there is a Flash file (es: YouTube videos).
Strange is that 9/10 quit, but 1/10 it work!!!
Is a WebKit bug?

Thanks in advance for any suggestions.

I’ve noticed that application crash when XCode project is open!!! (After when I’ve used the “Build and Go button”) Work fine when its .xcodeproj is closed.
Could it be related to some XCode debug options?