Page MenuHome

Blender exit with code `-6` with message `Attempt to free NULL pointer`.
Closed, ResolvedPublic

Description

System Information
Tested operating system:

  • Ubuntu 16.04.6, GNU/Linux 4.4.0-161-generic x86_64
  • macOS 10.14.6 Darwin 18.7.0

Tested graphics card and CPU:

  • NVIDIA GTX 1080Ti, AMD Radeon RX580
  • Any CPU

Blender Version
Broken: 2.79b and 2.80 downloaded from the Blender website.

Short description of error

Quit the Blender will produce exit code -6 with message Attempt to free NULL pointer.
This is the file which cause the error.

Exact steps for others to reproduce the error

  • Open Blender in terminal (for logging purpose).
  • Load this file.
  • Open the the Image Viewer (which list all the images in the file) or just render the file (the render is normal).
  • This line of log appear in the terminal: IMB_ibImageFromMemory: NULL pointer.
  • Quit the blender, the program quits with exit code -6 with this line of log (in terminal): Attempt to free NULL pointer.

If you render the file above on headless mode, no image is saved to the directory. This will make the flamenco render job failed if you are using Blender Cloud.

The bug may come the library called BGERTPS which is made for Blender Game Engine. [This function] (https://github.com/martijnberger/blender/blob/master/source/blender/imbuf/intern/readimage.c#L104) produce the error above.

Event Timeline

Germano Cavalcante (mano-wii) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.

I can reproduce the problem.
Simply open and close the attached file.
I'm not sure what is causing this problem, but I suppose it involves data block management.

Bastien Montagne (mont29) lowered the priority of this task from Confirmed, Medium to Needs Information from User.Oct 1 2019, 5:13 PM

@Germano Cavalcante (mano-wii) please investigate a minimum before assigning, that has again nothing to do with data management, that’s a mere corrupted .blend file.

@Hai Vu (aperture147) we require a small and simple .blend file, not a 600MB one, and a way to reproduce the issue. Here your monster .blend is corrupted somehow, one of the packedfile struct gets a NULL data pointer when reading it, which is not supposed to happen ever. So unless you can provide us with a way to recreate such corruption, we won't be able to do anything to the root of the issue.

In the mean time, I’ll add some sanity checks in reading code to detect/cleanup such cases...

Hai Vu (aperture147) added a comment.EditedOct 2 2019, 1:42 PM

Thanks for your quick fix! I'm trying to figure how the packedfile be NULL and I will send the result for you as soon as I can