SourceForge has been redesigned. Learn more.

#456 Memory/Thread leak in 2.9.x Raytracer

Luke S

Raytracer fails to release/destroy some worker threads when anitialiasing is enabled.

To reproduce:
Load a scene file.
Attach a profiler to JVM.
Start Raytaracer. Enable antialiasing.
In profiler, observe thread count increase by 2*HWcores + 1.
When frame finishes rendering, threads decrease by HWcores +1
Closing render preview does NOT release threads.

Repeats for each rendered frame, whether initiated as single frame render or as part of a movie render.

Threads are visible in profiler (JvisualVM) under threads, and in thread dump, but NOT heap dump. Thread state is listed as 'watitng'
Memory allocated memory per thread depends on render settings. Basic settings start at ~6MB/thread and go up.

Over long rendering sessions, or in JVMs with limited resources, this can add up to an OOM Error, Or can prevent GC from running, which causes an application freeze.


  • Luke S

    Luke S - 2012-12-31

    ThreadDump, showing 'orpahn' threads. Taken after 3 single frame renders.

  • Luke S

    Luke S - 2012-12-31

    Forgot ot mention - Manualy initiated full GC also does not clear these threads.

  • Luke S

    Luke S - 2013-04-07
    • status: open --> closed-fixed
  • Luke S

    Luke S - 2013-04-07

    Fixed as of v 3.0ea2.


Log in to post a comment.