nakanotti / CocoaInput

A best way to input characters with native mac IM in Minecraft
https://minecraft.curseforge.com/projects/cocoainput
Other
53 stars 8 forks source link

Crash under macOS Sonoma when pressing Caps Lock when chat screen is not enabled #34

Open Jack-Works opened 1 year ago

Jack-Works commented 1 year ago

Describe the bug

Describe the environment

Reproduce Press Caps Lock when the chat screen is not enabled

Logs(URL)

Crashed Thread:        0  Java: Render thread  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x408d880000000000 -> 0xffff880000000000 (possible pointer authentication failure)
Exception Codes:       0x0000000000000001, 0x408d880000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   java [32637]

Thread 0 Crashed:: Java: Render thread Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x18cc2311c __pthread_kill + 8
1   libsystem_pthread.dylib                0x18cc5acc0 pthread_kill + 288
2   libsystem_c.dylib                      0x18cb6aa50 abort + 180
3   libjvm.dylib                           0x1044d5690 os::abort(bool, void*, void const*) + 56
4   libjvm.dylib                           0x10471d994 VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) + 2680
5   libjvm.dylib                           0x10471cf10 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) + 72
6   libjvm.dylib                           0x10471dad8 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) + 36
7   libjvm.dylib                           0x1045f19d0 JVM_handle_bsd_signal + 436
8   libsystem_platform.dylib               0x18cc89a24 _sigtramp + 56
9   libcocoainput.dylib                    0x2d1d2e300 -[DataManager markedRange] + 100
10  AppKit                                 0x1910f82ec -[NSTextInputContext(NSInputContext_WithCompletion) markedRangeWithCompletionHandler:] + 80

Additional context

It crashed in the libcocoainput, not the java part so I don't know how to fix it.

nakanotti commented 1 year ago

I don't have a Mac, so I can't check, but are there any logs related to the call stack?

Jack-Works commented 1 year ago
Thread 0 Crashed:: Java: Render thread Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x1891f711c __pthread_kill + 8
1   libsystem_pthread.dylib                0x18922ecc0 pthread_kill + 288
2   libsystem_c.dylib                      0x18913ea50 abort + 180
3   libjvm.dylib                           0x106c95690 os::abort(bool, void*, void const*) + 56
4   libjvm.dylib                           0x106edd994 VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) + 2680
5   libjvm.dylib                           0x106edcf10 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) + 72
6   libjvm.dylib                           0x106eddad8 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) + 36
7   libjvm.dylib                           0x106db19d0 JVM_handle_bsd_signal + 436
8   libsystem_platform.dylib               0x18925da24 _sigtramp + 56
9   libcocoainput.dylib                    0x2caa62300 -[DataManager markedRange] + 100
10  AppKit                                 0x18d6cc2ec -[NSTextInputContext(NSInputContext_WithCompletion) markedRangeWithCompletionHandler:] + 80
11  TextInputUIMacHelper                   0x21ad9bb00 __TUISelectionRect_block_invoke + 144
12  TextInputUIMacHelper                   0x21ad994b4 -[TUINSCursorUIController updateCursorLocation] + 816
13  TextInputUIMacHelper                   0x21ad9a454 -[TUINSCursorUIController setCursorAccessories:] + 180
14  TextInputUIMacHelper                   0x21ad97a84 -[TUICursorAccessoryAssertionController updateSubjectWithAssertionState] + 820
15  TextInputUIMacHelper                   0x21ad97428 -[TUICursorAccessoryAssertionController createAssertionWithType:accessory:] + 96
16  HIToolbox                              0x193a1a6e4 TUIInputSessionShowSourceIndicator + 1052
17  HIToolbox                              0x193a0a508 __SendTextInputOffsetToPosEvent_WithCompletionHandler_block_invoke + 132
18  HIToolbox                              0x1938aad04 invocation function for block in DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 148
19  AppKit                                 0x18d6cc60c -[NSTextInputContext(NSInputContext_WithCompletion) firstRectForCharacterRange:completionHandler:] + 180
20  AppKit                                 0x18d6c75dc __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.330 + 212
21  AppKit                                 0x18d6c7410 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_4.314 + 284
22  AppKit                                 0x18d6c4264 __178-[NSTextInputContext tryHandleTSMEvent_offsetToPos_markedOrSelRange_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:]_block_invoke.168 + 112
23  AppKit                                 0x18d6c4154 -[NSTextInputContext tryHandleTSMEvent_offsetToPos_markedOrSelRange_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:] + 232
24  AppKit                                 0x18d6c727c __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.309 + 352
25  AppKit                                 0x18cc9189c -[NSTextInputContext handleTSMEvent:completionHandler:] + 1464
26  AppKit                                 0x18cc91278 _NSTSMEventHandler + 332
27  HIToolbox                              0x19383a894 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1228
28  HIToolbox                              0x193839c98 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
29  HIToolbox                              0x193839b28 SendEventToEventTargetWithOptions + 44
30  HIToolbox                              0x193896e30 SendTSMEvent_WithCompletionHandler + 432
31  HIToolbox                              0x193a0b2ec __SendTextInputEvent_WithCompletionHandler_block_invoke + 568
32  HIToolbox                              0x193a0997c SendTextInputEvent_WithCompletionHandler + 1064
33  HIToolbox                              0x193a0a434 SendTextInputOffsetToPosEvent_WithCompletionHandler + 304
34  HIToolbox                              0x193a10d08 CreateSourceIndicatorInfoForTISwitcher_WithCompletionHandler + 200
35  HIToolbox                              0x193a13188 ShowSourceIndicator_TimerHandler + 176
36  CoreFoundation                         0x189327d94 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
37  CoreFoundation                         0x189327a3c __CFRunLoopDoTimer + 972
38  CoreFoundation                         0x189327574 __CFRunLoopDoTimers + 356
39  CoreFoundation                         0x18930aa20 __CFRunLoopRun + 1856
40  CoreFoundation                         0x189309c2c CFRunLoopRunSpecific + 608
41  HIToolbox                              0x193862448 RunCurrentEventLoopInMode + 292
42  HIToolbox                              0x1938620d8 ReceiveNextEventCommon + 220
43  HIToolbox                              0x193861fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
44  AppKit                                 0x18cae4f90 _DPSNextEvent + 660
45  AppKit                                 0x18d2b8b94 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
46  libglfw.dylib                          0x106415a70 0x106400000 + 88688
47  ???                                    0x1175681c4 ???
48  ???                                    0x111274074 ???
49  ???                                    0x10ef69fc8 ???
50  ???                                    0x10ef69fc8 ???
51  ???                                    0x10ef69fc8 ???
52  ???                                    0x10ef69fc8 ???
53  ???                                    0x10ef6a508 ???
54  ???                                    0x10ef69fc8 ???
55  ???                                    0x10ef64140 ???
56  libjvm.dylib                           0x106939038 JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*) + 916
57  libjvm.dylib                           0x10699dd4c jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) + 300
58  libjvm.dylib                           0x1069a13d4 jni_CallStaticVoidMethod + 304
59  libjli.dylib                           0x105419384 JavaMain + 2520
60  libjli.dylib                           0x10541b97c __JVMInit_block_invoke + 80
61  Foundation                             0x18a3f5970 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 24
62  Foundation                             0x18a3f5830 -[NSBlockOperation main] + 104
63  Foundation                             0x18a3f57c0 __NSOPERATION_IS_INVOKING_MAIN__ + 16
64  Foundation                             0x18a3f4b68 -[NSOperation start] + 648
65  Foundation                             0x18a42ffe8 __NSThreadPerformPerform + 264
66  CoreFoundation                         0x18930bd28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
67  CoreFoundation                         0x18930bcbc __CFRunLoopDoSource0 + 176
68  CoreFoundation                         0x18930ba2c __CFRunLoopDoSources0 + 244
69  CoreFoundation                         0x18930a61c __CFRunLoopRun + 828
70  CoreFoundation                         0x189309c2c CFRunLoopRunSpecific + 608
71  libjli.dylib                           0x10541b010 CreateExecutionEnvironment + 400
72  libjli.dylib                           0x1054171d4 JLI_Launch + 1184
73  java                                   0x104f93bac main + 408
74  dyld                                   0x188eb5058 start + 2224
nakanotti commented 1 year ago

Thank you for your crash log information. Unfortunately, that crash log is only a list of threads, and I want the call stack of thread 0 that crashed, so I want the console log. ex) https://minecrafthopper.net/help/guides/getting-minecraft-game-output-log/

Jack-Works commented 1 year ago
[10:50:40] [main/INFO]: Loading Minecraft 1.20.2 with Fabric Loader 0.14.22
[10:50:40] [main/INFO]: Loading 66 mods:
    - cocoainput 4.0.10
    - fabric-api 0.90.0+1.20.2
       |-- fabric-api-base 0.4.33+fce67b32a0
       |-- fabric-api-lookup-api-v1 1.6.41+fce67b32a0
       |-- fabric-biome-api-v1 13.0.13+661cc8c6a0
       |-- fabric-block-api-v1 1.0.12+73761d2ea0
       |-- fabric-block-view-api-v2 1.0.1+73761d2ea0
       |-- fabric-blockrenderlayer-v1 1.1.43+f4b7e424a0
       |-- fabric-client-tags-api-v1 1.1.4+86b12645a0
       |-- fabric-command-api-v1 1.2.36+f71b366fa0
       |-- fabric-command-api-v2 2.2.15+86b12645a0
       |-- fabric-commands-v0 0.2.53+df3654b3a0
       |-- fabric-containers-v0 0.1.73+df3654b3a0
       |-- fabric-content-registries-v0 5.0.4+285022b3a0
       |-- fabric-convention-tags-v1 1.5.7+f4b7e424a0
       |-- fabric-crash-report-info-v1 0.2.20+f4b7e424a0
       |-- fabric-data-generation-api-v1 13.1.3+e3d2bf3fa0
       |-- fabric-dimensions-v1 2.1.56+b1229956a0
       |-- fabric-entity-events-v1 1.5.25+f4b7e424a0
       |-- fabric-events-interaction-v0 0.6.9+daef22a2a0
       |-- fabric-events-lifecycle-v0 0.2.68+df3654b3a0
       |-- fabric-game-rule-api-v1 1.0.40+f4b7e424a0
       |-- fabric-item-api-v1 2.1.32+43511215a0
       |-- fabric-item-group-api-v1 4.0.14+e3d2bf3fa0
       |-- fabric-key-binding-api-v1 1.0.38+f4b7e424a0
       |-- fabric-keybindings-v0 0.2.36+df3654b3a0
       |-- fabric-lifecycle-events-v1 2.2.26+3bafade3a0
       |-- fabric-loot-api-v2 2.1.0+3ba460fba0
       |-- fabric-message-api-v1 6.0.2+e3d2bf3fa0
       |-- fabric-mining-level-api-v1 2.1.54+f4b7e424a0
       |-- fabric-model-loading-api-v1 1.0.5+f4b7e424a0
       |-- fabric-models-v0 0.4.4+9386d8a7a0
       |-- fabric-networking-api-v1 3.0.9+e3d2bf3fa0
       |-- fabric-object-builder-api-v1 12.1.1+b1b4f7b0a0
       |-- fabric-particles-v1 1.1.4+f4b7e424a0
       |-- fabric-recipe-api-v1 2.0.6+96509552a0
       |-- fabric-registry-sync-v0 4.0.4+34a3e0e2a0
       |-- fabric-renderer-api-v1 3.2.1+2034447ca0
       |-- fabric-renderer-indigo 1.5.1+2034447ca0
       |-- fabric-renderer-registries-v1 3.2.48+df3654b3a0
       |-- fabric-rendering-data-attachment-v1 0.3.39+73761d2ea0
       |-- fabric-rendering-fluids-v1 3.0.30+f4b7e424a0
       |-- fabric-rendering-v0 1.1.51+df3654b3a0
       |-- fabric-rendering-v1 3.0.10+86b12645a0
       |-- fabric-resource-conditions-api-v1 2.3.10+e3d2bf3fa0
       |-- fabric-resource-loader-v0 0.11.11+86b12645a0
       |-- fabric-screen-api-v1 2.0.11+0ba8e9cea0
       |-- fabric-screen-handler-api-v1 1.3.39+86b12645a0
       |-- fabric-sound-api-v1 1.0.14+f4b7e424a0
       |-- fabric-transfer-api-v1 3.3.8+109a65e5a0
       \-- fabric-transitive-access-wideners-v1 5.0.3+fce67b32a0
    - fabric-language-kotlin 1.10.10+kotlin.1.9.10
       |-- org_jetbrains_kotlin_kotlin-reflect 1.9.10
       |-- org_jetbrains_kotlin_kotlin-stdlib 1.9.10
       |-- org_jetbrains_kotlin_kotlin-stdlib-jdk7 1.9.10
       |-- org_jetbrains_kotlin_kotlin-stdlib-jdk8 1.9.10
       |-- org_jetbrains_kotlinx_atomicfu-jvm 0.22.0
       |-- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.7.3
       |-- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.7.3
       |-- org_jetbrains_kotlinx_kotlinx-datetime-jvm 0.4.0
       |-- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.6.0
       |-- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.6.0
       \-- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.6.0
    - fabricloader 0.14.22
    - java 17
    - minecraft 1.20.2
[10:50:40] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/Users/jack/Library/Application%20Support/minecraft/libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar Service=Knot/Fabric Env=CLIENT
[10:50:40] [main/INFO]: Compatibility level set to JAVA_16
[10:50:40] [main/INFO]: Compatibility level set to JAVA_17
[10:50:43] [Datafixer Bootstrap/INFO]: 192 Datafixer optimizations took 52 milliseconds
[10:50:44] [Render thread/INFO]: Environment: Environment[accountsHost=https://api.mojang.com, sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[10:50:45] [Render thread/INFO]: Setting user: JackWorks
[10:50:45] [Render thread/INFO]: [Indigo] Registering Indigo renderer!
[10:50:45] [Render thread/ERROR]: Error parsing option value 69 for option Render Distance: Value 69 outside of range [2:33]
[10:50:45] [Render thread/INFO]: Backend library: LWJGL version 3.3.2-snapshot
[10:50:45] [Render thread/INFO]: Found non-pack entry '/Users/jack/Library/Application Support/minecraft/versions/1.20.2-Fabric 0.14.22/resourcepacks/.DS_Store', ignoring
[10:50:45] [Render thread/WARN]: Removed resource pack continuity:default from options because it doesn't seem to exist anymore
[10:50:45] [Render thread/WARN]: Removed resource pack continuity:glass_pane_culling_fix from options because it doesn't seem to exist anymore
[10:50:45] [Render thread/INFO]: Reloading ResourceManager: vanilla, fabric (cocoainput, fabric-api, fabric-api-base, fabric-api-lookup-api-v1, fabric-biome-api-v1, fabric-block-api-v1, fabric-block-view-api-v2, fabric-blockrenderlayer-v1, fabric-client-tags-api-v1, fabric-command-api-v1, fabric-command-api-v2, fabric-commands-v0, fabric-containers-v0, fabric-content-registries-v0, fabric-convention-tags-v1, fabric-crash-report-info-v1, fabric-data-generation-api-v1, fabric-dimensions-v1, fabric-entity-events-v1, fabric-events-interaction-v0, fabric-events-lifecycle-v0, fabric-game-rule-api-v1, fabric-item-api-v1, fabric-item-group-api-v1, fabric-key-binding-api-v1, fabric-keybindings-v0, fabric-language-kotlin, fabric-lifecycle-events-v1, fabric-loot-api-v2, fabric-message-api-v1, fabric-mining-level-api-v1, fabric-model-loading-api-v1, fabric-models-v0, fabric-networking-api-v1, fabric-object-builder-api-v1, fabric-particles-v1, fabric-recipe-api-v1, fabric-registry-sync-v0, fabric-renderer-api-v1, fabric-renderer-indigo, fabric-renderer-registries-v1, fabric-rendering-data-attachment-v1, fabric-rendering-fluids-v1, fabric-rendering-v0, fabric-rendering-v1, fabric-resource-conditions-api-v1, fabric-resource-loader-v0, fabric-screen-api-v1, fabric-screen-handler-api-v1, fabric-sound-api-v1, fabric-transfer-api-v1, fabric-transitive-access-wideners-v1, fabricloader), programmer_art (programmer_art), file/xali's+Enchanted+Books+v0.12.0.zip
[10:50:45] [Worker-Main-5/INFO]: Found unifont_all_no_pua-15.0.06.hex, loading
[10:50:46] [Render thread/WARN]: Missing sound for event: minecraft:item.goat_horn.play
[10:50:46] [Render thread/WARN]: Missing sound for event: minecraft:entity.goat.screaming.horn_break
[10:50:46] [Render thread/INFO]: OpenAL initialized on device EDIFIER R1080BT
[10:50:46] [Render thread/INFO]: Sound engine started
[10:50:46] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[10:50:46] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/signs.png-atlas
[10:50:46] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[10:50:46] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[10:50:46] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/armor_trims.png-atlas
[10:50:46] [Render thread/INFO]: Created: 128x64x4 minecraft:textures/atlas/decorated_pot.png-atlas
[10:50:46] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[10:50:46] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[10:50:46] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[10:50:46] [Render thread/WARN]: Shader rendertype_entity_translucent_emissive could not find sampler named Sampler2 in the specified shader program.
[10:50:47] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[10:50:47] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[10:50:47] [Render thread/INFO]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[10:50:47] [Render thread/INFO]: Created: 1024x512x0 minecraft:textures/atlas/gui.png-atlas
[10:50:47] [Render thread/INFO]: Modloader:Fabric
[10:50:47] [Render thread/INFO]: CocoaInput has copied library to native directory.
[10:50:47] [Render thread/INFO]: Libcocoainput was built on Jun 10 2023 14:39:44.
[10:50:47] [Render thread/INFO]: CocoaInput is being initialized.Now running thread for modify GLFWview .
[10:50:47] [Render thread/INFO]: DarwinController has been initialized.
[10:50:47] [Render thread/INFO]: CocoaInput is now using controller:class jp.axer.cocoainput.arch.darwin.DarwinController
[10:50:47] [Render thread/INFO]: CocoaInput has been initialized.
[10:50:47] [Render thread/INFO]: Fabric config setup
[10:50:47] [Thread-4/INFO]: Complete to modify GLFWView
[10:50:47] [Render thread/INFO]: Config path:/Users/jack/Library/Application Support/minecraft/versions/1.20.2-Fabric 0.14.22/config/cocoainput.json
[10:50:47] [Render thread/INFO]: ConfigPack:true true
[10:50:54] [Render thread/INFO]: IMEOperator addInstance: b303d77a-3261-4e9b-b32e-730590873dfe
[10:50:54] [Render thread/INFO]: IMEOperator.setFocused: true
[10:50:56] [Render thread/INFO]: Loaded 7 recipes
[10:50:56] [Render thread/INFO]: Loaded 1271 advancements
[10:50:56] [Render thread/INFO]: Applied 0 biome modifications to 0 of 64 new biomes in 687.3 μs
[10:50:56] [Server thread/INFO]: Starting integrated minecraft server version 1.20.2
[10:50:56] [Server thread/INFO]: Generating keypair
[10:50:57] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[10:50:58] [Render thread/INFO]: Prepare generating world:0%
[10:50:58] [Render thread/INFO]: Prepare generating world:0%
[10:50:58] [Render thread/INFO]: Prepare generating world:0%
[10:50:58] [Render thread/INFO]: Prepare generating world:28%
[10:50:58] [Render thread/INFO]: Time elapsed: 1665 ms
[10:50:59] [Server thread/INFO]: Changing view distance to 12, from 10
[10:50:59] [Server thread/INFO]: Changing simulation distance to 32, from 0
[10:50:59] [Render thread/INFO]: IMEOperator.setFocused: false
[10:50:59] [Netty Server IO #1/INFO]: Negotiated common packet version 1
[10:50:59] [Netty Local Client IO #0/INFO]: Negotiated common packet version 1
[10:50:59] [Server thread/INFO]: JackWorks[local:E:391fee34] logged in with entity id 157 at (138.70741739466817, 103.69701261824103, 48.21119038515866)
[10:50:59] [Server thread/INFO]: JackWorks joined the game
[10:50:59] [Render thread/INFO]: Loaded 29 advancements
> I press Caps Lock here, and java crashes with no further log

I think the native crash stack indicated where the problem happened, it's at

9   libcocoainput.dylib                    0x2caa62300 -[DataManager markedRange] + 100
yossy1zip commented 1 year ago

I have a same issue.

nakanotti commented 1 year ago

Thank you! I tried disassembling it and checking it out, but there's nothing I can do unless I get a Mac.

Jack-Works commented 1 year ago

Thank you! I tried disassembling it and checking it out, but there's nothing I can do unless I get a Mac.

Are you interested in testing it with me through a video call? I have a building environment for modding and also XCode installed. I know how to write code (although not Java and C++).

nakanotti commented 1 year ago

Thank you for your suggestion. Unfortunately, I can speak and understand Japanese only, and it would require understanding the behavior of MacOS's IM, which would take time, so I have to decline the proposal.

nakanotti commented 1 year ago

Sorry, This was the call stack!

9   libcocoainput.dylib                      0x2caa62300 -[DataManager markedRange] + 100
10  AppKit                                   0x18d6cc2ec -[NSTextInputContext(NSInputContext_WithCompletion) markedRangeWithCompletionHandler:] + 80
11  TextInputUIMacHelper                     0x21ad9bb00 __TUISelectionRect_block_invoke + 144
12  TextInputUIMacHelper                     0x21ad994b4 -[TUINSCursorUIController updateCursorLocation] + 816
13  TextInputUIMacHelper                     0x21ad9a454 -[TUINSCursorUIController setCursorAccessories:] + 180
14  TextInputUIMacHelper                     0x21ad97a84 -[TUICursorAccessoryAssertionController updateSubjectWithAssertionState] + 820
15  TextInputUIMacHelper                     0x21ad97428 -[TUICursorAccessoryAssertionController createAssertionWithType:accessory:] + 96
16  HIToolbox                                0x193a1a6e4 TUIInputSessionShowSourceIndicator + 1052
17  HIToolbox                                0x193a0a508 __SendTextInputOffsetToPosEvent_WithCompletionHandler_block_invoke + 132
18  HIToolbox                                0x1938aad04 invocation function for block in DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 148
19  AppKit                                   0x18d6cc60c -[NSTextInputContext(NSInputContext_WithCompletion) firstRectForCharacterRange:completionHandler:] + 180
20  AppKit                                   0x18d6c75dc __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.330 + 212
21  AppKit                                   0x18d6c7410 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_4.314 + 284
22  AppKit                                   0x18d6c4264 __178-[NSTextInputContext tryHandleTSMEvent_offsetToPos_markedOrSelRange_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:]_block_invoke.168 + 112
23  AppKit                                   0x18d6c4154 -[NSTextInputContext tryHandleTSMEvent_offsetToPos_markedOrSelRange_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:] + 232
24  AppKit                                   0x18d6c727c __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.309 + 352
25  AppKit                                   0x18cc9189c -[NSTextInputContext handleTSMEvent:completionHandler:] + 1464
26  AppKit                                   0x18cc91278 _NSTSMEventHandler + 332
27  HIToolbox                                0x19383a894 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1228
28  HIToolbox                                0x193839c98 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
29  HIToolbox                                0x193839b28 SendEventToEventTargetWithOptions + 44
30  HIToolbox                                0x193896e30 SendTSMEvent_WithCompletionHandler + 432
31  HIToolbox                                0x193a0b2ec __SendTextInputEvent_WithCompletionHandler_block_invoke + 568
32  HIToolbox                                0x193a0997c SendTextInputEvent_WithCompletionHandler + 1064
33  HIToolbox                                0x193a0a434 SendTextInputOffsetToPosEvent_WithCompletionHandler + 304
34  HIToolbox                                0x193a10d08 CreateSourceIndicatorInfoForTISwitcher_WithCompletionHandler + 200
35  HIToolbox                                0x193a13188 ShowSourceIndicator_TimerHandler + 176
Jack-Works commented 1 year ago

if you have any idea to fix this, please open a PR and ping me, I'm happy to help with the test!

myama-dev commented 1 year ago

Hello. I am a Japanese who owns a Macbook (Intel/Apple Silicon) running macOS Sonoma. This text is translated and written by DeepL but my native language is Japanese. CocoaInput has helped me a lot, and I can't play Minecraft on my Mac without it.

Please contact me if I can help you with any development. 何か開発の手伝いが出来ることがあれば連絡してください。お気軽にお声がけ下さい。

nakanotti commented 1 year ago

@myama-dev ありがとうございます。 クラッシュているアドレスは、[DataManager markedRange] + 100 というのがコールスタックから判明していますが、 もう少し具体的な場所を知る必要があります。以下のコード内に含まれるはずです。 https://github.com/nakanotti/CocoaInput/blob/master/libcocoainput/darwin/libcocoainput/DataManager.m#L144-L148

libcocoainput.dylib に対して、unzip を行い、libcocoainput.arm64 に対して、objdump して逆アセンブルしたコードがあると、助かります。

objdump -S libcocoainput.arm64
myama-dev commented 1 year ago

macOSということもあってか「libcocoainput.dylib に対して unzip 」の方法が分からなかったのですが、lipoコマンドで分離したものを objdump してみました。これで期待する情報が含まれていると良いのですが。

% lipo -extract arm64 libcocoainput.dylib -output libcocoainput.arm64 % objdump -S libcocoainput.arm64 > libcocoainput_disassembled.txt

libcocoainput_disassembled.txt

nakanotti commented 1 year ago

@myama-dev @ipiiia 情報ありがとうございます。 既に他の派生プロジェクトで解決しているのであれば、ぜひそちらをご利用ください。 modrinth からダウンロードできるので、こちらに移行してもらうのが良いかと思います。

4rgc commented 5 months ago

@nakanotti #31 のクラッシュを発見してもう一つのCocoaInputのフォークで書いていた解決策を使ったら治りました。 おそらくこの問題もSonomaで追加されたInput Tooltipのせいだと思われます。 解決策のurlはこちらです→ クリック