# OpenGL Crash - Windows JUCE 8.0.10

**URL:** <https://forum.juce.com/t/opengl-crash-windows-juce-8-0-10/67327>\
**Category:** Windows\
**Created:** [October 9, 2025, 8:14pm UTC](https://forum.juce.com/t/opengl-crash-windows-juce-8-0-10/67327 "2025-10-09T20:14:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![officialnsa](https://avatars.discourse-cdn.com/v4/letter/o/ecb155/32.png) [@officialnsa](https://forum.juce.com/u/officialnsa)\
**Post date:** [October 9, 2025, 8:14pm UTC](https://forum.juce.com/t/opengl-crash-windows-juce-8-0-10/67327/1 "2025-10-09T20:14:59Z")

</div>

Hi everyone,

On our branch that incorporates the JUCE 8.0.10 update, we’re experiencing a nasty crash. Upon disabling the OpenGL renderer, our app immediately crashes. This was not an issue when using the last JUCE update we incorporated into our main branch, which is 8.0.3. I have `.dmp` files from the crash, but as our code is proprietary I cannot post those on this public forum. I will gladly forward these `.dmp` files to the JUCE team directly.

One thing to note-we do have small modifications in our JUCE branch. The most pertinent here would be the fact that we manually disabled the Direct2D renderer due to [performance issues outlined in a previous post of mine](https://forum.juce.com/t/direct2d-causes-considerable-performance-drop/64009). My next step is to disable these modifications and see if that changes anything; I will report back once I do.

## Offending code

```auto
void OpenGLTexture::create (const int w, const int h, const void* pixels, GLenum type, bool topLeft)
{
    ownerContext = OpenGLContext::getCurrentContext();
    /* ... */

    if (textureID == 0)
    {
        /* ... */
        /* ownerContext is not checked but is nullptr here - dereference crashes */
        auto glMagFilter = (GLint) (ownerContext->texMagFilter == OpenGLContext::linear ? GL_LINEAR : GL_NEAREST);
        /* ... */
    }
    else
    {
        /* ... */
    }

```

## Stack Trace

```auto
juce::OpenGLTexture::create(int, int, const void *, unsigned int, bool)
juce::OpenGLTexture::loadImage(const juce::Image &)
juce::OpenGLRendering::NonShaderContext::~NonShaderContext()
juce::OpenGLRendering::NonShaderContext::~NonShaderContext()
[Inline Frame] std::default_delete<juce::LowLevelGraphicsContext>::operator()(juce::LowLevelGraphicsContext *)
[Inline Frame] std::unique_ptr<juce::LowLevelGraphicsContext,std::default_delete<juce::LowLevelGraphicsContext>>::~unique_ptr()
[Inline Frame] juce::Graphics::~Graphics()
juce::detail::StandardCachedComponentImage::paint(juce::Graphics &)
[Inline Frame] juce::Component::paintWithinParentContext(juce::Graphics &)
juce::Component::paintComponentAndChildren(juce::Graphics &)
[Inline Frame] juce::Component::paintWithinParentContext(juce::Graphics &)
juce::Component::paintComponentAndChildren(juce::Graphics &)
[Inline Frame] juce::Component::paintWithinParentContext(juce::Graphics &)
juce::Component::paintComponentAndChildren(juce::Graphics &)
[Inline Frame] juce::Component::paintWithinParentContext(juce::Graphics &)
juce::Component::paintComponentAndChildren(juce::Graphics &)
[Inline Frame] juce::Component::paintWithinParentContext(juce::Graphics &)
juce::Component::paintComponentAndChildren(juce::Graphics &)
[Inline Frame] juce::Component::paintWithinParentContext(juce::Graphics &)
juce::Component::paintComponentAndChildren(juce::Graphics &)
[Inline Frame] juce::Component::paintEntireComponent(juce::Graphics &, bool)
juce::ComponentPeer::handlePaint(juce::LowLevelGraphicsContext &)
juce::GDIRenderContext::performPaint(HDC __*, HRGN__ *, int, tagPAINTSTRUCT &)
juce::GDIRenderContext::handlePaintMessage()
[Inline Frame] juce::HWNDComponentPeer::handlePaintMessage()
juce::HWNDComponentPeer::peerWindowProc(HWND __*, unsigned int, unsigned__ int64, __int64)
juce::HWNDComponentPeer::windowProc(HWND __*, unsigned int, unsigned__ int64, __int64)

```

---

<div class="post-metadata">

**Author:** ![officialnsa](https://avatars.discourse-cdn.com/v4/letter/o/ecb155/32.png) [@officialnsa](https://forum.juce.com/u/officialnsa)\
**Post date:** [October 9, 2025, 8:31pm UTC](https://forum.juce.com/t/opengl-crash-windows-juce-8-0-10/67327/2 "2025-10-09T20:31:09Z")

</div>

Update: Undoing all changes related to D2D and rendering in our JUCE branch does not resolve this crash.

---

<div class="post-metadata">

**Author:** ![attila](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/attila/32/11206_2.png) [@attila](https://forum.juce.com/u/attila)\
**Post date:** [October 10, 2025, 10:03am UTC](https://forum.juce.com/t/opengl-crash-windows-juce-8-0-10/67327/3 "2025-10-10T10:03:01Z")

</div>

Can you compile and reproduce with entirely unmodified JUCE code? The most effective way of pinpointing this issue would be a git bisect, but that could be painful if you have other modifications on your branch.

We’ve also had Direct2D performance improvements since 8.0.3, but that’s an aside here.

I’ll reach out in private about the .dmp file.
