QGLWindowSurface destructor destroys used contexts but QGLContext destructor doesn't clear its pointer which is stored in cached QGLTextureGlyphCache. In Qt4.8 QGLTextureGlyphCache implementation is QGLContextGroupResourceBase based but QGLContextGroupResourceBase::cleanupResources never executes QGLTextureGlyphCache::freeResource because group thinks that context is still shared, although it has been destroyed for good. In Qt4.7 QGLTextureGlyphCache wasn't QGLContextGroupResourceBase based. Example attached.
Crash can be reproduced with glglyphcache_crash example. Run example, Show Window2 -> Delete Window1 -> Show Window1 -> crash
Crash occurs in QGL2PaintEngineExPrivate::drawCachedGlyphs which calls cache->width() which in turn refers to destroyed context
In addition to Windows and Symbian, crash happens on all platforms which use QGLWindowSurface implementation (Meego and some others but haven't tested on them)