Pressing Shift + NumBlock with custom keyboard layout is crashing Blender on macOS #121425

Open
opened 2024-05-04 23:10:29 +02:00 by Christoph-Walter · 7 comments

System Information
Operating system: macOS 14.4.1
Graphics card: Apple M2 Pro

Blender Version
Broken: Blender 3.6.11 LTS
and also Blender 4.1.1

Short description of error
Pressing Shift plus any key on the NumBlock (except Enter or Num Lock) is instantly crashing Blender.

Exact steps for others to reproduce the error

  • Install this custom keyboard layout PC_DE.keylayout by following these instructions:
    • Download the keylayout file
    • Open Finder and go to your user folder
    • Press Command + Shift + . to show hidden folders
    • Open the hidden Library/Keyboard Layout folder
    • Paste the keylayout file in that folder
    • Reboot your Mac
    • Open macOS System Preferences
    • Scroll down in preferences and select Keyboard
    • Find the Text Input -> Input Sources section and select Edit
    • Press the + button the bottom right to add a new keyboard layout
    • Scroll down the list of keyboard and select Other -> PC-Tastatur, Deutsch and click Add
    • Apply the changes.
  • Change to the new keyboard by selecting the letter or keyboard icon in the top bar and selecting the new keyboard layout.
  • Open Blender and press press Shift + e.g. 1 on the Numpad. Blender should crash.
**System Information** Operating system: macOS 14.4.1 Graphics card: Apple M2 Pro **Blender Version** Broken: Blender 3.6.11 LTS and also Blender 4.1.1 **Short description of error** Pressing Shift plus any key on the NumBlock (except Enter or Num Lock) is instantly crashing Blender. **Exact steps for others to reproduce the error** - Install this custom keyboard layout ![PC_DE.keylayout](/attachments/83545e2c-8310-46dd-b3c0-fea308bc0842) by following these instructions: - Download the keylayout file - Open Finder and go to your user folder - Press `Command + Shift + .` to show hidden folders - Open the hidden `Library/Keyboard Layout` folder - Paste the keylayout file in that folder - Reboot your Mac - Open macOS System Preferences - Scroll down in preferences and select `Keyboard` - Find the `Text Input -> Input Sources` section and select `Edit` - Press the `+` button the bottom right to add a new keyboard layout - Scroll down the list of keyboard and select `Other -> PC-Tastatur, Deutsch` and click `Add` - Apply the changes. - Change to the new keyboard by selecting the letter or keyboard icon in the top bar and selecting the new keyboard layout. - Open Blender and press press Shift + e.g. 1 on the Numpad. Blender should crash.
Christoph-Walter added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-05-04 23:10:30 +02:00
Christoph-Walter changed title from Pressing Shift + NumBlock is crashing Blender 3.6.11 LTS on macOS to Pressing Shift + NumBlock is crashing Blender on macOS 2024-05-05 01:02:13 +02:00
Member

I am personally unable to reproduce this issue. Can you share the crash log with us?


There are a few things you can try to try and track down the issue:

There may be some issue with a configuraiton setting or a addon. To test if this is the case, can you load factory settings and test again? To do this:

  1. Select from the top of Blender File -> Defaults -> Load Factory Settings
  2. Then test to see if you can reproduce the issue. Report back with the results.

Do you have any third party apps that interact with your keyboard? If so, can you try closing them and seeing if that stops the crashing?

System Information
Operating system: macOS-14.2.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Pro 1.2
Blender version: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: e1743a0317bc

I am personally unable to reproduce this issue. Can you share the [crash log](https://docs.blender.org/manual/en/latest/troubleshooting/crash.html#macos) with us? --- There are a few things you can try to try and track down the issue: There may be some issue with a configuraiton setting or a addon. To test if this is the case, can you load factory settings and test again? To do this: 1. Select from the top of Blender `File -> Defaults -> Load Factory Settings` 2. Then test to see if you can reproduce the issue. Report back with the results. Do you have any third party apps that interact with your keyboard? If so, can you try closing them and seeing if that stops the crashing? **System Information** Operating system: macOS-14.2.1-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 Pro 1.2 Blender version: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: `e1743a0317bc`
Alaska added
Status
Needs Information from User
Platform
macOS
and removed
Status
Needs Triage
labels 2024-05-05 02:46:57 +02:00

There is no change with factory settings.
There is nothing interacting with my keyboard. I am using an ordinary qwertz keyboard with windows keys by Fujitsu, not an Apple keyboard.

There is no change with factory settings. There is nothing interacting with my keyboard. I am using an ordinary qwertz keyboard with windows keys by Fujitsu, not an Apple keyboard.
Member

If I understand the crash log correctly, the crash is occuring when processing keyboard inputs (which is expected based on the information provided). This eliminates other things like add-ons being the cause.

However, I'm not sure how to progress from here because my knowledge in this area of code is limited and I can't reproduce the issue.

@lichtwerk can you test this on your Mac?

If I understand the crash log correctly, the crash is occuring when processing keyboard inputs (which is expected based on the information provided). This eliminates other things like add-ons being the cause. However, I'm not sure how to progress from here because my knowledge in this area of code is limited and I can't reproduce the issue. @lichtwerk can you test this on your Mac?
Alaska added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2024-05-06 03:03:58 +02:00
Member

Hi, as far as I understand, crash initiated from GHOST_SystemCocoa::processEvents in main thread.
I don't really know much about _CFThrowFormattedException/__NSCFString characterAtIndex. Something related to "string formatting"? Do you use different keyboard layout or language as input?
Have you been experiencing this crash from a long time or started to happen recently (maybe after OS update)?

Still might be better to check with factory defaults: File > Defaults > Load Factory Settings

Hi, as far as I understand, crash initiated from `GHOST_SystemCocoa::processEvents` in main thread. I don't really know much about `_CFThrowFormattedException/__NSCFString characterAtIndex`. Something related to "string formatting"? Do you use different keyboard layout or language as input? Have you been experiencing this crash from a long time or started to happen recently (maybe after OS update)? Still might be better to check with factory defaults: `File > Defaults > Load Factory Settings`
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-05-06 07:54:53 +02:00

I have not been using Blender much recently so I don't know at which point this bug was introduced. I know Blender worked fine until some time last year. I just testet the older Blender version 2.79 and now it is also crashing after pressing shift + NumPad. So something else is going on.

I found out that Blender is not crashing when I change the keyboard layout. I am using the attached german keyboard layout. I still think it is a bug because keyboard input should not crash an application.

I have not been using Blender much recently so I don't know at which point this bug was introduced. I know Blender worked fine until some time last year. I just testet the older Blender version 2.79 and now it is also crashing after pressing shift + NumPad. So something else is going on. I found out that Blender is not crashing when I change the keyboard layout. I am using the attached german keyboard layout. I still think it is a bug because keyboard input should not crash an application.
Member

Using the attached keyboard layout, I can confirm the crash.

I ran a debug build of Blender to see if I could identify the cause, but my knowledge in this area is limited.

[NSApp sendEvent:event]; Error: "-[__NSCFConstantString characterAtIndex:]: Range or index out of bounds"

Looking at the backtrace in the debug build, it seems the issue is occurring inside CoreFoundation, which is a library provided by Apple. And based on the fact the issue is now occurring in Blender 2.79 for you, I would suspect the issue first started occurring after a OS update.


On a side note, the keyboard layout provided can be inspected with a tool called Ukulele. According to Ukulele, when you press Shift + Something on the numpad, nothing is supposed to happened.

And looking at the file directly, no action is defined for shift + something on the numpad. So I'm not 100% sure what's going on here.

Using the attached keyboard layout, I can confirm the crash. I ran a debug build of Blender to see if I could identify the cause, but my knowledge in this area is limited. ``` [NSApp sendEvent:event]; Error: "-[__NSCFConstantString characterAtIndex:]: Range or index out of bounds" ``` Looking at the backtrace in the debug build, it seems the issue is occurring inside `CoreFoundation`, which is a library provided by Apple. And based on the fact the issue is now occurring in Blender 2.79 for you, I would suspect the issue first started occurring after a OS update. ---- On a side note, the keyboard layout provided can be inspected with a tool called Ukulele. According to Ukulele, when you press `Shift + Something on the numpad`, nothing is supposed to happened. And looking at the file directly, no action is defined for `shift + something on the numpad`. So I'm not 100% sure what's going on here.
Alaska added
Status
Confirmed
Module
User Interface
and removed
Status
Needs Information from User
labels 2024-05-07 05:46:09 +02:00
Alaska changed title from Pressing Shift + NumBlock is crashing Blender on macOS to Pressing Shift + NumBlock with custom keyboard layout is crashing Blender on macOS 2024-05-07 05:46:26 +02:00
Member

Thanks @Alaska . We can ask MacOS maintainers to take a look :)

Thanks @Alaska . We can ask [MacOS maintainers](https://projects.blender.org/blender/blender/wiki/Module:%20Platforms,%20Builds,%20Tests%20&%20Devices#:~:text=macOS,Farsthary%20%40brecht) to take a look :)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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#121425
No description provided.