'layout.prop_search' causes the application to write memory after the end of the heap bufer #79162

Closed
opened 2020-07-22 15:52:00 +02:00 by Zachary · 10 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 950M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-21 17:02, hash: b453e9e3a4

Short description of error
Getting a KeyError when trying to use Cube Surfer addon.
Worked late 2019 and code hasn't changed.
Looks like layout.prop_search is adding a space in front of name and causing a KeyError.
cube_surfer_error_2.jpg

Exact steps for others to reproduce the error

  1. Open blender
  2. Copy, Past and Run the script below
  3. Go to Hello World Panel in the object properties
  4. Search an object
    Should cause a KeyError and not let anything else draw in panel
import bpy

        
class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        obj = context.object
        self.layout.prop_search(obj, "test", context.scene, "objects", text="")


def register():
    bpy.utils.register_class(HelloWorldPanel)

    bpy.types.Object.test = bpy.props.StringProperty()


if __name__ == "__main__":
    register()
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 950M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-21 17:02, hash: `b453e9e3a4` **Short description of error** Getting a KeyError when trying to use Cube Surfer addon. Worked late 2019 and code hasn't changed. Looks like `layout.prop_search` is adding a space in front of name and causing a KeyError. ![cube_surfer_error_2.jpg](https://archive.blender.org/developer/F8713763/cube_surfer_error_2.jpg) **Exact steps for others to reproduce the error** 1. Open blender 2. Copy, Past and Run the script below 3. Go to `Hello World Panel` in the object properties 4. Search an object Should cause a KeyError and not let anything else draw in panel ``` import bpy class HelloWorldPanel(bpy.types.Panel): """Creates a Panel in the Object properties window""" bl_label = "Hello World Panel" bl_idname = "OBJECT_PT_hello" bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "object" def draw(self, context): obj = context.object self.layout.prop_search(obj, "test", context.scene, "objects", text="") def register(): bpy.utils.register_class(HelloWorldPanel) bpy.types.Object.test = bpy.props.StringProperty() if __name__ == "__main__": register() ```
Author

Added subscriber: @AFWS

Added subscriber: @AFWS

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Germano Cavalcante self-assigned this 2020-07-22 19:29:35 +02:00

Cube Surfer does not appear to be an official addon maintained by blender.
It has its own tracker, but apparently the site is down. (http://pyroevil.com/)
In this case try to contact the author of the addon.

Closing since this bug tracker does not provide support for unofficial addons.

Cube Surfer does not appear to be an official addon maintained by blender. It has its own tracker, but apparently the site is down. (http://pyroevil.com/) In this case try to contact the author of the addon. Closing since this bug tracker does not provide support for unofficial addons.
Author

@mano-wii

I don't think this is a addon issue. I added a blend with code. Not seeing anything in it that adds spaces in front of name and cause KeyError. That has to be some issue with layout.prop_search code or something.

Steps

1: Run Script
2: Go to Hello World Panel
3: Click the plus button
4: On object select Cube
5: Should cause a KeyError and not let anything else draw in panel

cube_surfer_error.blend

@mano-wii I don't think this is a addon issue. I added a blend with code. Not seeing anything in it that adds spaces in front of name and cause KeyError. That has to be some issue with `layout.prop_search` code or something. Steps 1: Run Script 2: Go to Hello World Panel 3: Click the plus button 4: On object select Cube 5: Should cause a KeyError and not let anything else draw in panel [cube_surfer_error.blend](https://archive.blender.org/developer/F8714228/cube_surfer_error.blend)

Changed status from 'Archived' to: 'Needs Triage'

Changed status from 'Archived' to: 'Needs Triage'
Germano Cavalcante changed title from PropertyGroup or layout.prop_search adding space and causing KeyError to 'layout.prop_search' causes the application to write memory after the end of the heap bufer 2020-07-23 03:15:54 +02:00
Germano Cavalcante removed their assignment 2020-07-23 03:15:54 +02:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

I can confirm the bug

I can confirm the bug

This issue was referenced by 67002402bd

This issue was referenced by 67002402bd60d701acaf9e22801bc4411ded21d7

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2020-07-23 09:35:43 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 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#79162
No description provided.