Hard crash when pressing backspace while mouse hovers over Editor-type button. #37795

Closed
opened 2013-12-12 20:58:11 +01:00 by Andrew · 14 comments

System Information
Ubuntu 12.04.3
Core i5 3320-m
HD4000
Nvidia NVS 5200m

Blender Version
Broken: Blender 2.68.0 r58536
Worked: unknown

Short description of error
Blender hard crashes in Scripting view when mouse is hovering over Editor-Type button and hitting backspace.

Exact steps for others to reproduce the error

  • Open Blender, reset to factory settings if necessary.
  • Change to Scripting view using "Choose Scene Layout" button
  • Move mouse cursor to "Editor type" button and hover.
    • This bug doesn't appear in the 3d-view window, but seems to happen for others
  • Hit backspace while mouse is hovering over button. Blender hard-crashes.

This bug appears whether I use the Nvidia card (with optirun) or with the HD4000 graphics.

cat /tmp/blender.crash.txt

Blender 2.68 (sub 0), Revision: 58536

backtrace

blender() [0xf6ccd7]
blender() [0xf6cf15]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fdf4490f4a0]
blender(ED_render_scene_update+0xe1) [0x10be5d1]
blender(DAG_ids_check_recalc+0x6a) [0x15056ca]
blender(BKE_scene_update_tagged+0xb6) [0x149bdd6]
blender(wm_event_do_notifiers+0x494) [0xf86c04]
blender(WM_main+0x20) [0xf743e0]
blender(main+0x368) [0xf6f2c4]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fdf448fa76d]
blender() [0xeabf25]

**System Information** Ubuntu 12.04.3 Core i5 3320-m HD4000 Nvidia NVS 5200m **Blender Version** Broken: Blender 2.68.0 r58536 Worked: unknown **Short description of error** Blender hard crashes in Scripting view when mouse is hovering over Editor-Type button and hitting backspace. **Exact steps for others to reproduce the error** - Open Blender, reset to factory settings if necessary. - Change to Scripting view using "Choose Scene Layout" button - Move mouse cursor to "Editor type" button and hover. - This bug doesn't appear in the 3d-view window, but seems to happen for others - Hit backspace while mouse is hovering over button. Blender hard-crashes. This bug appears whether I use the Nvidia card (with optirun) or with the HD4000 graphics. > cat /tmp/blender.crash.txt # Blender 2.68 (sub 0), Revision: 58536 # backtrace blender() [0xf6ccd7] blender() [0xf6cf15] /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fdf4490f4a0] blender(ED_render_scene_update+0xe1) [0x10be5d1] blender(DAG_ids_check_recalc+0x6a) [0x15056ca] blender(BKE_scene_update_tagged+0xb6) [0x149bdd6] blender(wm_event_do_notifiers+0x494) [0xf86c04] blender(WM_main+0x20) [0xf743e0] blender(main+0x368) [0xf6f2c4] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fdf448fa76d] blender() [0xeabf25]
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @everyday

Added subscriber: @everyday
Bastien Montagne self-assigned this 2013-12-12 22:40:41 +01:00

Added subscribers: @ideasman42, @brecht

Added subscribers: @ideasman42, @brecht

@brecht or @ideasman42 can you please validate this one-liner fix? tmp.diff

Issue is that in some rare cases, like that TypeEditor button, the region stored in but->active data after value has been reset is no more valid (does not always crash, but sanitizer always yells at interface_handler.c:5818). And I don’t think we need the redraw call here anyway, in all tests I made refresh happened without it (RNA handles this I guess)…

@brecht or @ideasman42 can you please validate this one-liner fix? [tmp.diff](https://archive.blender.org/developer/F39148/tmp.diff) Issue is that in some rare cases, like that TypeEditor button, the region stored in but->active data after value has been reset is no more valid (does not always crash, but sanitizer always yells at interface_handler.c:5818). And I don’t think we need the redraw call here anyway, in all tests I made refresh happened without it (RNA handles this I guess)…

I don't think it can be assumed in general that the RNA callback is there to redraw the region, usually it would be but I'm not sure. For this particular case you can move ED_region_tag_redraw above ui_set_but_default and it should stop the crash.

I don't think it can be assumed in general that the RNA callback is there to redraw the region, usually it would be but I'm not sure. For this particular case you can move ED_region_tag_redraw above ui_set_but_default and it should stop the crash.

Ah, good hint, thx! :)

Ah, good hint, thx! :)
Bastien Montagne was unassigned by Campbell Barton 2013-12-13 08:07:12 +01:00
Campbell Barton self-assigned this 2013-12-13 08:07:12 +01:00

Added subscriber: @mont29

Added subscriber: @mont29

This is a tricky one, don't think a small change will work, the button is freed too and accessed later (the other crash is in code I added), so claiming this one, will see if freeing a button can be better supported.

This is a tricky one, don't think a small change will work, the button is freed too and accessed later (the other crash is in code I added), so claiming this one, will see if freeing a button can be better supported.

Yep, realized that later yesterday, that’s why I did not commit the fix…

Maybe we should try to use something similar to ui_apply_but_func() (comment here says: "these functions [i.e. apply funcs of the button] are postponed and only executed after all other handling is done, i.e. menus are closed, in order to avoid conflicts with these functions removing the buttons we are working with", seems pretty similar to that issue?).

Yep, realized that later yesterday, that’s why I did not commit the fix… Maybe we should try to use something similar to ui_apply_but_func() (comment here says: "these functions [i.e. apply funcs of the button] are postponed and only executed after all other handling is done, i.e. menus are closed, in order to avoid conflicts with these functions removing the buttons we are working with", seems pretty similar to that issue?).

The way most operator buttons work is to apply as an after-func. This button runs an operator immediately though.

I was thinking a fix could be to make the operator call happen after handling the event (but without having to make the button into an operator-button).

The way most operator buttons work is to apply as an after-func. This button runs an operator immediately though. I was thinking a fix could be to make the operator call happen after handling the event (but without having to make the button into an operator-button).

This issue was referenced by blender/blender-addons-contrib@aab587817c

This issue was referenced by blender/blender-addons-contrib@aab587817c55f5c53672efe3b1fc4a0e953cb97e

This issue was referenced by aab587817c

This issue was referenced by aab587817c55f5c53672efe3b1fc4a0e953cb97e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit aab587817c.

Closed by commit aab587817c.
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
5 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#37795
No description provided.