OpenGL: black screen and hang on attachTo()

I have an issue with the OpenGLContext::attachTo method.

As soon as I use it, I get a blackscreen and my app crashes a few seconds after. Note that I’ve the same issue on iOS (it’s crashes after a few seconds, often immediately)

Here’s the code I used (based on an empty introjucer project):

[code]
MainAppWindow::MainAppWindow()
: DocumentWindow (JUCEApplication::getInstance()->getApplicationName(),
Colours::lightgrey,
0)
{
setOpaque(true);
setTitleBarHeight(0);
setFullScreen(true);
setVisible (true);
openGLContext.setComponentPaintingEnabled(true);
openGLContext.attachTo(*this);

}[/code]

Edit : I’m testing with an Android 2.2 device (and on iOS 6)

A stack trace showing where it crashes would be kinda helpful…

In fact it isn’t really a crash, the application just hangs forever, so I got an “application not responding” warning. (I’ll edit the topic name)

Edit: I tested with another android device and it doesn’t happen. So it may be related to the android 2.2 api.