Fix #121015: Abnormal termination on exit after playback on MacOS #121242
No reviewers
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#121242
Loading…
Reference in New Issue
No description provided.
Delete Branch "iss/blender:121015"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Caused by thread being joinable when class was destroyed.
Join thread in destructor without trying to close the audio device,
since this is done in it's destructor.
@blender-bot build
@blender-bot build
@ -51,2 +51,4 @@
bool m_delayed_close_finished{false};
/**
* Terminate thread without closing devide. Used when class is destroyed.
Minor: "device", not "devide"
This approach introduces up to 1 sec delay before Blender can be closed, which is undesirable. In a more ideal implementation destructor will notify the thread that it needs to be stopped. One of the ways to do so is to use
conditional_variable
. Some PoC:Perhaps this
/ 10
logic can also be removed then, and potentially it could become more explicit what the thread is being notified about (in the PoC notification means "please stop ASAP").@Sergey Nice, did not know that you could timeout wait on condition. More elegant than bool definitely. I did not observe any delays here, but also wasn't looking for them, so there definitely could be.
Seems you've Blender-specific code style to the audaspace code. Please restore the original formatting, as it is something that would need to be done to accept the patch to upstream, and would also make it much easier to see the actual functional functional changes.
Forgot to mention, it is also usually a very good idea to look at your own patches after submossion or update, to verify nothing unforeseen happened, and the patch includes exactly what you intent.
I did apply formatting on upstream patch. Do you want to merge this patch to our main? If so, I will update the patch, otherwise I can close it.
Fix 121015: Abnormal termination on exit after playback on MacOSto Fix #121015: Abnormal termination on exit after playback on MacOSI am not sure what do you mean by that.
The audaspace upstream used tabs for indentation, and
{
on a new line. I do not see this changed in neither of upstream version of audaspace on Github, nor in the bundled version of it in our blender.git. This patch does replace tabs with spaces, moves{
to the same line as class/function, and half-indents visibility modifier. I do not think this is intended, and if it really is, it should not be done as part of a bugfix, and should not be done for a single file.If by this patch you mean this specific PR (#121242), then I can not answer you that just yet, as I can not give proper review.
That I have applied formatting in https://github.com/audaspace/audaspace/pull/23
I don't have good workflow when working on Audaspace code in our repository. In this case I copy files to their repo and apply clang format there. I am paranoid, that if I copy their clang format to our repo I will accidentally add it commit and push.
I've heared, that clang format should support specifying path to format file in some future release, perhaps future is now, but did not check.
You should be able to copy audaspace's
.clang-format
to ourextern/audaspace
. This will allow editors to pick it up. Formake format
it might need to be added explicitly, as I don't think any of the extern libraries are covered there. Still unclear why blender-specific style appeared in a file inextern
though.For the review it is a bit strange to have same code submitted to two repositories. Unless there are bottlenecks in the upstream review we can just move the review there.
@ -51,2 +52,4 @@
bool m_delayed_close_finished{false};
/**
* Thread condition to terminate immediately. Used when class is destroyed.
It does not help that much to document when something is used, as it quite easy to see by checking usage of a variable. What is less obvious to figure out is what something is used for. So here it will be more clear to say
Used when class is destroyed to notify thread that it needs to stop as soon as possible.
Well it's not high prio issue, but if is too annoying, we may want to fix it in our repo. Ideally I would only make patch for upstream, but not sure when it will be merged.
Even though the report is not officially marked as High Priority it is quite a bad one. Seeing a "Blender Crashed" message every time you close Blender is not something we should be allowing for much longer.
Thanks for the updates. Seems to work good!
With the
a5ba4032e0
landed I think we can close this. The fixe from Joerg is more complete to keep everything thread-safe.Pull request closed