• Stephan Bergmann's avatar
    Don't keep gGlobalGlyphCache, gTextureCache around until exit · d0241ea8
    Stephan Bergmann yazdı
    Those static variables had been introduced with
    56c5a0ba "tdf#94682 limit the number of textures
    for the glyph texture atlas" and dea885f8
    "opengl: cache native widget textures also for Windows", but at least the
    clang-cl build crashed on exit from soffice.bin with
    
    > Exception thrown at 0x00007FFF3906AA84 (opengl32.dll) in soffice.bin: 0xC0000005: Access violation reading location 0x0000000000000898.
    >  opengl32.dll!glGetString() Unknown
    >  epoxy.dll!epoxy_glGetString_dispatch_table_rewrite_ptr(unsigned int name) Line 46456 C
    >  epoxy.dll!epoxy_glGetString_dispatch_table_thunk(unsigned int name) Line 46456 C
    >  epoxy.dll!epoxy_is_desktop_gl() Line 299 C
    >  epoxy.dll!gl_provider_resolver(const char * name, const gl_provider * providers, const unsigned short * entrypoints) Line 7323 C
    >  epoxy.dll!epoxy_glDeleteTextures_resolver() Line 14646 C
    >  epoxy.dll!epoxy_glDeleteTextures_dispatch_table_rewrite_ptr(int n, const unsigned int * textures) Line 45813 C
    >  epoxy.dll!epoxy_glDeleteTextures_dispatch_table_thunk(int n, const unsigned int * textures) Line 45813 C
    >  vcllo.dll!TextureState::unbindAndDelete(unsigned int nTexture) Line 59 C++
    >  vcllo.dll!ImplOpenGLTexture::~ImplOpenGLTexture() Line 182 C++
    >  [External Code]
    >  vcllo.dll!PackedTextureAtlasManager::~PackedTextureAtlasManager() Line 129 C++
    >  vcllo.dll!GlobalGlyphCache::~GlobalGlyphCache() Line 67 C++
    >  [External Code]
    >  vcllo.dll!??__FgGlobalGlyphCache@GlyphCache@@0V?$unique_ptr@UGlobalGlyphCache@@U?$default_delete@UGlobalGlyphCache@@@std@@@std@@A@YAXXZ() Line 48 C++
    >  [External Code]
    
    resp.
    
    > Exception thrown at 0x00007FFF3A5AAA84 (opengl32.dll) in soffice.bin: 0xC0000005: Access violation reading location 0x0000000000000898.
    >  opengl32.dll!glGetString() Unknown
    >  epoxy.dll!epoxy_glGetString_dispatch_table_rewrite_ptr(unsigned int name) Line 46456 C
    >  epoxy.dll!epoxy_glGetString_dispatch_table_thunk(unsigned int name) Line 46456 C
    >  epoxy.dll!epoxy_is_desktop_gl() Line 299 C
    >  epoxy.dll!gl_provider_resolver(const char * name, const gl_provider * providers, const unsigned short * entrypoints) Line 7323 C
    >  epoxy.dll!epoxy_glDeleteTextures_resolver() Line 14646 C
    >  epoxy.dll!epoxy_glDeleteTextures_dispatch_table_rewrite_ptr(int n, const unsigned int * textures) Line 45813 C
    >  epoxy.dll!epoxy_glDeleteTextures_dispatch_table_thunk(int n, const unsigned int * textures) Line 45813 C
    >  vcllo.dll!TextureState::unbindAndDelete(unsigned int nTexture) Line 59 C++
    >  vcllo.dll!ImplOpenGLTexture::~ImplOpenGLTexture() Line 182 C++
    >  [External Code]
    >  vcllo.dll!OpenGLTexture::~OpenGLTexture() Line 313 C++
    >  [External Code]
    >  vcllo.dll!TextureCombo::~TextureCombo() Line 51 C++
    >  [External Code]
    >  vcllo.dll!std::pair<ControlCacheKey, std::unique_ptr<TextureCombo, std::default_delete<TextureCombo> > >::~pair() Line 145 C++
    >  [External Code]
    >  vcllo.dll!o3tl::lru_map<ControlCacheKey, std::unique_ptr<TextureCombo, std::default_delete<TextureCombo> >, ControlCacheHashFunction>::~lru_map() Line 34 C++
    >  vcllo.dll!??__FgTextureCache@?A@@YAXXZ() Line 738 C++
    >  [External Code]
    
    Change-Id: I0198f657f5d59314c5f662c214504ed3e1523567
    Reviewed-on: https://gerrit.libreoffice.org/36801Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    d0241ea8
winlayout.hxx 7.54 KB