Page MenuHome

Memory leak when linking Grease Pencil objects to scene
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Linux-5.3.0-7625-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.44

Blender Version
Broken: version: 2.83 (sub 2), branch: master, commit date: 2020-02-07 22:49, hash: rBa010d9720455
Worked: (optional)

Short description of error
Memory leak after linking Grease Pencil objects to scene. Seems to be happening when the scene updates while editing an object or playing animation or just moving viewport camera.

Exact steps for others to reproduce the error

  1. open attached file

  1. play animation
  2. look at memory usage

[Based on the default startup or an attached .blend file (as simple as possible)]

Event Timeline

Ankit (ankitm) added a subscriber: Ankit (ankitm).EditedSun, Feb 9, 12:36 AM

On Operating system: Darwin-18.6.0-x86_64-i386-64bit 64 Bits, I get:

Read blend: /Users/ankit/Downloads/memory_leak.blend
read file /Users/ankit/Downloads/memory_leak.blend
  Version 283 sub 2 date 2020-02-07 22:49 hash a010d9720455
Info: Read packed library:  '//../../../media/dmitriy/Main2/Alyx_Unreal4/GAMEFILES_NEW/Other/Concept Art/CA v2/ca_suit1.blend', parent '<direct>'
Segmentation fault: 11

So please add a portable file.

Ankit (ankitm) changed the task status from Needs Triage to Needs Information from User.Sun, Feb 9, 12:37 AM
Ray molenkamp (LazyDodo) changed the task status from Needs Information from User to Confirmed.Sun, Feb 9, 1:44 AM

most of it seems to leak in gpencil_populate_datablock

Line #, Process, Type, Stack, Count, Impacting Size (B), Size (MB)
23, , ,   |    |    |    |    |    |    |- blender.exe!drw_engines_cache_populate, 3709, 17,070,775, 16.280
24, , ,   |    |    |    |    |    |    |    blender.exe!GPENCIL_cache_populate, 3709, 17,070,775, 16.280
25, , ,   |    |    |    |    |    |    |    blender.exe!gpencil_add_draw_data, 3709, 17,070,775, 16.280
26, , ,   |    |    |    |    |    |    |    blender.exe!gpencil_populate_datablock, 3709, 17,070,775, 16.280

@Ray molenkamp (LazyDodo) This is going to be totally changed in the refactor, so we need test if the leak is in greasepencil-refactor branch

Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Bug".Wed, Feb 19, 2:10 PM

Tested with refactored version and I'm unable to detect any memory leak, so we can consider as solved in the refactored code.