Fullscreen crashes Blender on Mac OS X #46202

Closed
opened 2015-09-22 00:28:45 +02:00 by Timo Takala · 10 comments

Mac OS X, 10.9.5
MacBook Pro
with external display (crashes without too)

Broken: 2.76 RC1 & 2.76 hash: 034cc85 (buildbot Sept. 21)
Worked: 2.75a

Blender crashes on entering (or exiting) fullscreen mode.

I tried this a few times. Sometimes I am able to enter fullscreen mode, but get a crash on exit. If I load factory settings I am able to switch to fullscreen mode and back once, but crash on the next try. Also, It seems that if I press the hotkey Alt-F11 (or, since I'm on a laptop, Fn-Alt-F11) I'm more likely to get a crash than if I use the window menu option.

Mac OS X, 10.9.5 MacBook Pro with external display (crashes without too) Broken: 2.76 RC1 & 2.76 hash: 034cc85 (buildbot Sept. 21) Worked: 2.75a Blender crashes on entering (or exiting) fullscreen mode. I tried this a few times. Sometimes I am able to enter fullscreen mode, but get a crash on exit. If I load factory settings I am able to switch to fullscreen mode and back once, but crash on the next try. Also, It seems that if I press the hotkey Alt-F11 (or, since I'm on a laptop, Fn-Alt-F11) I'm more likely to get a crash than if I use the window menu option.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Timo-1

Added subscriber: @Timo-1

#46261 was marked as duplicate of this issue

#46261 was marked as duplicate of this issue

Added subscribers: @ideasman42, @brecht

Added subscribers: @ideasman42, @brecht

@ideasman42, this seems to be happening since 3056add though the underlying problem is older.

* thread #1: tid = 0x54abf, 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113
   110
   111 		if (link == NULL) return;
   112
-> 113 		if (link->next) link->next->prev = link->prev;
   114 		if (link->prev) link->prev->next = link->next;
   115
   116 		if (listbase->last == link) listbase->last = link->prev;
(lldb) bt all
* thread #1: tid = 0x54abf, 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113
    frame #1: 0x0000000100017235 blender`wm_event_do_handlers(C=0x0000000104f00228) + 2277 at wm_event_system.c:2503
    frame #2: 0x000000010000b86e blender`WM_main(C=0x0000000104f00228) + 30 at wm.c:487
    frame #3: 0x0000000100006f10 blender`main(argc=1, argv=0x00007fff5fbff710) + 1504 at creator.c:1935
    frame #4: 0x0000000100006924 blender`start + 52

Recursive calls to wm_event_do_handlers() means the same event gets handled and freed twice. I think BLI_remlink(&win->queue, event); should be moved to the start of the loop to avoid that, but then the last event before quitting Blender always leaks.

I can look into it further this evening but feel free to fix it before that.

@ideasman42, this seems to be happening since 3056add though the underlying problem is older. ``` * thread #1: tid = 0x54abf, 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113 110 111 if (link == NULL) return; 112 -> 113 if (link->next) link->next->prev = link->prev; 114 if (link->prev) link->prev->next = link->next; 115 116 if (listbase->last == link) listbase->last = link->prev; (lldb) bt all * thread #1: tid = 0x54abf, 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) * frame #0: 0x00000001010cd887 blender`BLI_remlink(listbase=0x0000000104f34ba8, vlink=0x00000001159b3e88) + 71 at listbase.c:113 frame #1: 0x0000000100017235 blender`wm_event_do_handlers(C=0x0000000104f00228) + 2277 at wm_event_system.c:2503 frame #2: 0x000000010000b86e blender`WM_main(C=0x0000000104f00228) + 30 at wm.c:487 frame #3: 0x0000000100006f10 blender`main(argc=1, argv=0x00007fff5fbff710) + 1504 at creator.c:1935 frame #4: 0x0000000100006924 blender`start + 52 ``` Recursive calls to `wm_event_do_handlers()` means the same event gets handled and freed twice. I think `BLI_remlink(&win->queue, event);` should be moved to the start of the loop to avoid that, but then the last event before quitting Blender always leaks. I can look into it further this evening but feel free to fix it before that.

Id like to look into this, but cant redo the error in X11. Even when commenting the #ifdef defined(__APPLE__) || defined(WIN32), Its not crashing when changing to full-screen, tested quickly switching many times.

Id like to look into this, but cant redo the error in X11. Even when commenting the `#ifdef defined(__APPLE__) || defined(WIN32)`, Its not crashing when changing to full-screen, tested quickly switching many times.

This issue was referenced by 1cae9c4af4

This issue was referenced by 1cae9c4af480e2ab674901c0933be3286f2ae2ca

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Avoiding the memory leak is a bit painful, P262 is as simple as I could get it but it's still too messy.

Instead I've just removed the code to do recursive event handling during window live resize. We can handle notifiers and redraw the windows, but events we can handle after live resize. There might be a bunch of mouse move events or even key presses batched up in the queue, but the event handling should be able to handle that fine.

Avoiding the memory leak is a bit painful, [P262](https://archive.blender.org/developer/P262.txt) is as simple as I could get it but it's still too messy. Instead I've just removed the code to do recursive event handling during window live resize. We can handle notifiers and redraw the windows, but events we can handle after live resize. There might be a bunch of mouse move events or even key presses batched up in the queue, but the event handling should be able to handle that fine.

Added subscriber: @hairygoatface

Added subscriber: @hairygoatface
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#46202
No description provided.