Crash if you change the workspace when the script warning is displayed. #118765

Closed
opened 2024-02-26 22:39:27 +01:00 by ugorek · 7 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-02-26 15:01, hash: bace4c9a293c
Worked: ?

Short description of error

>	blender.exe!ui_handle_menus_recursive(bContext * C, const wmEvent * event, uiPopupBlockHandle * menu, int level, const bool is_parent_inside, const bool is_parent_menu, const bool is_floating) Line 11475	C++
 	blender.exe!ui_popup_handler(bContext * C, const wmEvent * event, void * userdata) Line 11723	C++
 	blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, const bool always_pass) Line 834	C++
 	blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3326	C++
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3445	C++
 	blender.exe!wm_event_do_handlers(bContext * C) Line 4072	C++
 	blender.exe!WM_main(bContext * C) Line 638	C++
 	blender.exe!main(int argc, const char * * __formal) Line 579	C++

Exact steps for others to reproduce the error

  1. Remove your \4.2\config\startup.blend (optional?)
  2. Open Blender
  3. Factory settings (optional?)
  4. Scripting workspace
  5. New
  6. Register checkbox
  7. Layout workspace
  8. Shift + drag to create new window
  9. Save Startup File
  10. Save File
  11. Exit.
  12. Open saved file.
  13. Security-alert on second window?
  14. Then change your workspace.
  15. Wait ~1 second.
  16. Crash!

It is quite possible that the attached file will not serve to replicate the problem. You must follow the steps exactly so that the popup appears in the second window (not in the main window).

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33 **Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-02-26 15:01, hash: `bace4c9a293c` Worked: ? **Short description of error** ``` > blender.exe!ui_handle_menus_recursive(bContext * C, const wmEvent * event, uiPopupBlockHandle * menu, int level, const bool is_parent_inside, const bool is_parent_menu, const bool is_floating) Line 11475 C++ blender.exe!ui_popup_handler(bContext * C, const wmEvent * event, void * userdata) Line 11723 C++ blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, const bool always_pass) Line 834 C++ blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3326 C++ blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3445 C++ blender.exe!wm_event_do_handlers(bContext * C) Line 4072 C++ blender.exe!WM_main(bContext * C) Line 638 C++ blender.exe!main(int argc, const char * * __formal) Line 579 C++ ``` <video src="/attachments/6802b726-a0da-4f0b-9fd8-43156538e6b9" title="24.02.29 20.00.00.mp4" controls></video> **Exact steps for others to reproduce the error** 1. Remove your `\4.2\config\startup.blend` (optional?) 2. Open Blender 3. Factory settings (optional?) 4. Scripting workspace 5. New 6. Register checkbox 7. Layout workspace 8. Shift + drag to create new window 9. Save Startup File 10. Save File 11. Exit. 12. Open saved file. 13. Security-alert on second window? 14. Then change your workspace. 15. Wait ~1 second. 16. Crash! It is quite possible that the attached file will not serve to replicate the problem. You must follow the steps exactly so that the popup appears in the second window (not in the main window).
ugorek added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-02-26 22:39:27 +01:00

Hi @ugorek,

Thank you for reporting this issue. I have tried reproducing the issue using the .blend file I attached, but I was unable to encounter the crash.

To further investigate the issue, could you please provide us with a .blend file that consistently triggers the crash?

Hi @ugorek, Thank you for reporting this issue. I have tried reproducing the issue using the .blend file I attached, but I was unable to encounter the crash. To further investigate the issue, could you please provide us with a .blend file that consistently triggers the crash?
938 KiB
Germano Cavalcante added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-02-27 15:28:24 +01:00
Author

I noticed that in your file you created a full copy of the window by bpy.ops.wm.window_new_main()?
To repeat the bug, you need to create just a new window, or use shift and drag through the corner of area.
@mano-wii

I noticed that in your file you created a full copy of the window by `bpy.ops.wm.window_new_main()`? To repeat the bug, you need to create just a new window, or use shift and drag through the corner of area. @mano-wii
Germano Cavalcante added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2024-02-28 15:58:07 +01:00

Could you please provide a .blend file that consistently triggers the crash?
I'm confused on the steps as I'm not sure if it is possibly to change the workspace in a window that isn't the main one.~

EDIT:
Oh, I didn't see the attachment in last comment

~~Could you please provide a .blend file that consistently triggers the crash?~~ ~~I'm confused on the steps as I'm not sure if it is possibly to change the workspace in a window that isn't the main one.~~~ EDIT: Oh, I didn't see the attachment in last comment
Germano Cavalcante added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-02-29 12:20:28 +01:00

Is weird. But here the warning popup never appears in the window other than the main one.

Is weird. But here the warning popup never appears in the window other than the main one.
Author

:O
This is true.

Here are the very precise steps to reproduce the bug:

  1. Remove your \4.2\config\startup.blend (optional?)
  2. Open Blender
  3. Factory settings (optional?)
  4. Scripting workspace
  5. New
  6. Register checkbox
  7. Layout workspace
  8. Shift + drag to create new window
  9. Save Startup File
  10. Save File
  11. Exit.
  12. Open saved file.
  13. Security-alert on second window?
  14. Then change your workspace.
  15. Wait ~1 second.
  16. Crash!

@mano-wii ^

:O This is true. Here are the very precise steps to reproduce the bug: 1. Remove your `\4.2\config\startup.blend` (optional?) 2. Open Blender 3. Factory settings (optional?) 4. Scripting workspace 5. New 6. Register checkbox 7. Layout workspace 8. Shift + drag to create new window 9. Save Startup File 10. Save File 11. Exit. 12. Open saved file. 13. Security-alert on second window? 14. Then change your workspace. 15. Wait ~1 second. 16. Crash! @mano-wii ^ <video src="/attachments/6802b726-a0da-4f0b-9fd8-43156538e6b9" title="24.02.29 20.00.00.mp4" controls></video>

I was able to replicate it now!
This is the call stack at the time of the crash:

>	blender.exe!ui_handle_menus_recursive(bContext * C, const wmEvent * event, uiPopupBlockHandle * menu, int level, const bool is_parent_inside, const bool is_parent_menu, const bool is_floating) Line 11475	C++
 	blender.exe!ui_popup_handler(bContext * C, const wmEvent * event, void * userdata) Line 11723	C++
 	blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, const bool always_pass) Line 834	C++
 	blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3326	C++
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3445	C++
 	blender.exe!wm_event_do_handlers(bContext * C) Line 4072	C++
 	blender.exe!WM_main(bContext * C) Line 638	C++
 	blender.exe!main(int argc, const char * * __formal) Line 579	C++

I will edit the description to include all steps.

I was able to replicate it now! This is the call stack at the time of the crash: ``` > blender.exe!ui_handle_menus_recursive(bContext * C, const wmEvent * event, uiPopupBlockHandle * menu, int level, const bool is_parent_inside, const bool is_parent_menu, const bool is_floating) Line 11475 C++ blender.exe!ui_popup_handler(bContext * C, const wmEvent * event, void * userdata) Line 11723 C++ blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, const bool always_pass) Line 834 C++ blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3326 C++ blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3445 C++ blender.exe!wm_event_do_handlers(bContext * C) Line 4072 C++ blender.exe!WM_main(bContext * C) Line 638 C++ blender.exe!main(int argc, const char * * __formal) Line 579 C++ ``` I will edit the description to include all steps.
Harley Acheson self-assigned this 2024-03-05 20:15:11 +01:00
Member

Interesting.

My gut feeling is that we should fix this simply.

The larger problem this points to is something we might not want to "fix". When we show a popup block we then will close it if you click anywhere else in that same window. But we don't close popup blocks if you click somewhere in a different window. And that's probably a good thing in many cases. In most cases we should avoid messing with content on other windows.

In this case, and for wm_test_opengl_deprecation_warning, this problem just goes away if we just show these warnings on the main window and not a child. That is the intent anyway, that these be prominent warnings on the main window. It is just an unintended bug that these show on the wrong window in the above circumstances. With that corrected this error can't occur.

Interesting. My gut feeling is that we should fix this simply. The larger problem this points to is something we might not want to "fix". When we show a popup block we then will close it if you click anywhere else in that same window. But we don't close popup blocks if you click somewhere in a different window. And that's probably a good thing in many cases. In most cases we should avoid messing with content on other windows. In this case, and for `wm_test_opengl_deprecation_warning`, this problem just goes away if we just show these warnings on the main window and not a child. That is the intent anyway, that these be prominent warnings on the main window. It is just an unintended bug that these show on the wrong window in the above circumstances. With that corrected this error can't occur.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-05 21:16:50 +01: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
3 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#118765
No description provided.