Actrivating Sun Position Addon causes not freed memory error #105201

Open
opened 2024-02-27 06:09:17 +01:00 by metanamo · 8 comments

System Information
Operating system: Linux-6.1.77-2-MANJARO-x86_64-with-glibc2.39 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 545.29.06

Blender Version
Broken: version: 4.0.2, branch: makepkg (modified), commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: (just discovered error)

Addon Information
Name: Sun Position (3, 5, 4)
Author: Michael Martin, Damien Picard

Short description of error
Activating Sun Position shows error on quit.

Blender quit
Error: Not freed memory blocks: 4, total unfreed memory 0.000458 MB
GLShader len: 120 0x7f039795c938
GLShaderInterface len: 240 0x7f039796b4f8
GLShaderInterface len: 64 0x7f0396b6e8b8
name_buffer len: 56 0x7f0396b6e938

Exact steps for others to reproduce the error

  • Activate addon
  • Close Blender
  • Happens at any startup scene
**System Information** Operating system: Linux-6.1.77-2-MANJARO-x86_64-with-glibc2.39 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 545.29.06 **Blender Version** Broken: version: 4.0.2, branch: makepkg (modified), commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: (just discovered error) **Addon Information** Name: Sun Position (3, 5, 4) Author: Michael Martin, Damien Picard **Short description of error** Activating Sun Position shows error on quit. Blender quit Error: Not freed memory blocks: 4, total unfreed memory 0.000458 MB GLShader len: 120 0x7f039795c938 GLShaderInterface len: 240 0x7f039796b4f8 GLShaderInterface len: 64 0x7f0396b6e8b8 name_buffer len: 56 0x7f0396b6e938 **Exact steps for others to reproduce the error** - Activate addon - Close Blender - Happens at any startup scene
metanamo added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-02-27 06:09:17 +01:00
Member

I can only reproduce the error with --debug-memory:

blender --factory-startup --debug-memory --addons sun_position

Not sure why the error appears by default on your side, is it a debug build?

I can only reproduce the error with `--debug-memory`: `blender --factory-startup --debug-memory --addons sun_position` Not sure why the error appears by default on your side, is it a debug build?
Damien Picard added
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-02-27 09:05:50 +01:00
Author

Thank you for your time Damien.

Without debug I get this error message:

Blender quit
Error: Not freed memory blocks: 4, total unfreed memory 0.000458 MB

Thank you for your time Damien. Without debug I get this error message: Blender quit Error: Not freed memory blocks: 4, total unfreed memory 0.000458 MB
Member

I simplified the add-on and can still reproduce the error with this stub, but I’m not sure what’s causing the error. I don’t think it’s specific to Sun Position though.

Can you reproduce with this?

I simplified the add-on and can still reproduce the error with [this stub](/attachments/9f535987-dc27-4975-9b93-b403900e8a89), but I’m not sure what’s causing the error. I don’t think it’s specific to Sun Position though. Can you reproduce with this?
Author

Python: Traceback (most recent call last): File "/home/edgarm/Downloads/untitled.blend/__init__.py", line 8, in <module> ImportError: attempted relative import with no known parent package

`Python: Traceback (most recent call last): File "/home/edgarm/Downloads/untitled.blend/__init__.py", line 8, in <module> ImportError: attempted relative import with no known parent package `
Member

I think you opened the __init__.py file in a text editor in Blender? The zip file I attached is meant to be installed as an add-on through the preferences.

I think you opened the `__init__.py` file in a text editor in Blender? The zip file I attached is meant to be installed as an add-on through the preferences.
Author

I installed your sript and started Blender with:
blender --addons sun_position

Traceback (most recent call last):
File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 158, in surface_update
addon_prefs = context.preferences.addons[package].preferences
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'bpy_prop_collection[key]: key "sun_position" not found'
File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 155, in surface_update
Traceback (most recent call last):
File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 118, in analemmas_update
addon_prefs = context.preferences.addons[package].preferences
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'bpy_prop_collection[key]: key "sun_position" not found'
File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 115, in analemmas_update
Traceback (most recent call last):
File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 98, in north_update
addon_prefs = context.preferences.addons[package].preferences
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'bpy_prop_collection[key]: key "sun_position" not found'
File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 95, in north_update
Traceback (most recent call last):
File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 56, in sun_update
move_sun(context)
File "/usr/share/blender/4.0/scripts/addons/sun_position/sun_calc.py", line 58, in move_sun
addon_prefs = context.preferences.addons[package].preferences
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'bpy_prop_collection[key]: key "sun_position" not found'
File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 52, in sun_update
Traceback (most recent call last):
File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 30, in lat_long_update
sun_update(self, context)
File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 56, in sun_update
move_sun(context)
File "/usr/share/blender/4.0/scripts/addons/sun_position/sun_calc.py", line 58, in move_sun
addon_prefs = context.preferences.addons[package].preferences
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'bpy_prop_collection[key]: key "sun_position" not found'
File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 27, in lat_long_update

I installed your sript and started Blender with: `blender --addons sun_position` Traceback (most recent call last): File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 158, in surface_update addon_prefs = context.preferences.addons[__package__].preferences ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "sun_position" not found' File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 155, in surface_update Traceback (most recent call last): File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 118, in analemmas_update addon_prefs = context.preferences.addons[__package__].preferences ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "sun_position" not found' File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 115, in analemmas_update Traceback (most recent call last): File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 98, in north_update addon_prefs = context.preferences.addons[__package__].preferences ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "sun_position" not found' File "/usr/share/blender/4.0/scripts/addons/sun_position/draw.py", line 95, in north_update Traceback (most recent call last): File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 56, in sun_update move_sun(context) File "/usr/share/blender/4.0/scripts/addons/sun_position/sun_calc.py", line 58, in move_sun addon_prefs = context.preferences.addons[__package__].preferences ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "sun_position" not found' File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 52, in sun_update Traceback (most recent call last): File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 30, in lat_long_update sun_update(self, context) File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 56, in sun_update move_sun(context) File "/usr/share/blender/4.0/scripts/addons/sun_position/sun_calc.py", line 58, in move_sun addon_prefs = context.preferences.addons[__package__].preferences ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "sun_position" not found' File "/usr/share/blender/4.0/scripts/addons/sun_position/properties.py", line 27, in lat_long_update
Author

When I install the SunPosition addon first and restart Blender without options I get the regular Error:

Blender quit
Error: Not freed memory blocks: 4, total unfreed memory 0.000458 MB

When I install the SunPosition addon first and restart Blender without options I get the regular Error: Blender quit Error: Not freed memory blocks: 4, total unfreed memory 0.000458 MB
Member

Thanks, that confirms the issue doesn’t come from the add-on itself. I opened a new bug report on the Blender repository.

Thanks, that confirms the issue doesn’t come from the add-on itself. I opened a new bug report on the Blender repository.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#105201
No description provided.