Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
173 stars 114 forks source link

Crashes when enter passwords under Chinese IME #612

Closed linzhm closed 9 years ago

linzhm commented 9 years ago

OS X 10.11 El Capitan. Open MultiBit HD. Switch to Chinese IME. Input wallet password. BOOM!

jim618 commented 9 years ago

Did the Crash Reporter dialog (a little window asking you to upload logs) appear ? If so could you upload a crash report and include this issue number (#612) in it please ?

That way we can see in more detail where it had problems.

Thanks

gary-rowe commented 9 years ago

While we wait for an uploaded log file to be certain, it may be that this is a side effect of the JRE shipping with default JCE policy files leading to weaker crypto in different locales.

This Stack Overflow answer provides some code that can be used to test the encryption grade on start up as an extra environment check. If the JCE policy does not allow strong crypto we can provide the user with a message indicating the nature of the problem.

linzhm commented 9 years ago

Yes, there's a Crash Reporter dialog.

I've attached the issue number #621. Will the report be sent to you? It tells me that the report will be sent to Apple.

gary-rowe commented 9 years ago

Our crash reporter looks like this:

Image of Crash reporter

If you're seeing the Apple version that means that you've encountered a JRE error which is much lower level. Since you've been able to start MultiBit HD and get to the wallet creation screen it looks like it may be related to the Java crypto support.

A couple of things to try:

It is safe to publish a small snippet of the log containing the Java stack trace against this issue, but be aware that it is public so ensure you've removed any personally identifying information.

linzhm commented 9 years ago
15/6/17 下午6:56:25.551 JavaApplicationStub[1136]: An uncaught exception was raised
15/6/17 下午6:56:25.551 JavaApplicationStub[1136]: java.lang.NullPointerException
15/6/17 下午6:56:25.554 JavaApplicationStub[1136]: (
    0   CoreFoundation                      0x00007fff87521b35 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x00007fff84beb46a objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff875216e9 -[NSException raise] + 9
    3   JavaNativeFoundation                0x000000011579d57d JNFCallObjectMethod + 230
    4   liblwawt.dylib                      0x000000011632ee52 -[AWTView attributedSubstringForProposedRange:actualRange:] + 78
    5   AppKit                              0x00007fff90e3587c -[NSTextInputContext(NSInputContext_WithCompletion) attributedSubstringForProposedRange:completionHandler:] + 105
    6   AppKit                              0x00007fff90e326b4 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke708 + 113
    7   AppKit                              0x00007fff90e2c4b8 -[NSTextInputContext tryHandleTSMEvent_attributedSubstringForProposedRange_withContext:dispatchCondition:dispatchWork:continuation:] + 101
    8   AppKit                              0x00007fff90e325b0 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke702 + 517
    9   AppKit                              0x00007fff90811890 -[NSTextInputContext handleTSMEvent:completionHandler:] + 2429
    10  AppKit                              0x00007fff90810e9e _NSTSMEventHandler + 324
    11  HIToolbox                           0x00007fff93d9277e _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1231
    12  HIToolbox                           0x00007fff93d91be4 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 404
    13  HIToolbox                           0x00007fff93d91a43 SendEventToEventTargetWithOptions + 43
    14  HIToolbox                           0x00007fff93df463c SendTSMEvent_WithCompletionHandler + 417
    15  HIToolbox                           0x00007fff93f9c6ad __SendTextInputEvent_WithCompletionHandler_block_invoke + 586
    16  HIToolbox                           0x00007fff93f9a83b SendTextInputEvent_WithCompletionHandler + 1228
    17  HIToolbox                           0x00007fff940072fb -[IMKInputSession _postEvent:completionHandler:] + 184
    18  HIToolbox                           0x00007fff940171b0 -[IMKInputSession _copyUniCharsForRange:intoBuffer:ofLength:completionHandler:] + 533
    19  HIToolbox                           0x00007fff94017a81 -[IMKInputSession _coreAttributesFromRange:whichAttributes:completionHandler:] + 332
    20  HIToolbox                           0x00007fff94019b40 -[IMKInputSession attributedSubstringFromRange:completionHandler:] + 205
    21  HIToolbox                           0x00007fff94009f38 __61-[IMKInputSession imkxpc_attributedSubstringFromRange:reply:]_block_invoke + 542
    22  CoreFoundation                      0x00007fff87433f3c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    23  CoreFoundation                      0x00007fff874269b5 __CFRunLoopDoBlocks + 341
    24  CoreFoundation                      0x00007fff87426712 __CFRunLoopRun + 2274
    25  CoreFoundation                      0x00007fff87425bc8 CFRunLoopRunSpecific + 296
... more ...

found via Console.app

linzhm commented 9 years ago
Process:               JavaApplicationStub [1150]
Path:                  /Applications/MultiBit HD.app/Contents/MacOS/JavaApplicationStub
Identifier:            com.install4j.6925-4794-5772-4956.24
Version:               0.1.0 (0.1.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           JavaApplicationStub [1150]
User ID:               501

Date/Time:             2015-06-17 18:57:53.216 +0800
OS Version:            Mac OS X 10.11 (15A178w)
Report Version:        11
Anonymous UUID:        D5A938F0-6116-AC43-57D1-75C6AED1948E

Sleep/Wake UUID:       86EB9F9A-3C52-4AEB-AC81-804E6438E8B6

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

Exception Type:        EXC_BAD_INSTRUCTION (SIGABRT)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
Crashing on exception: java.lang.NullPointerException

abort() called

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff87521b35 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x00007fff84beb46a objc_exception_throw + 48
2   CoreFoundation                      0x00007fff875216e9 -[NSException raise] + 9
3   JavaNativeFoundation                0x000000011679c57d JNFCallObjectMethod + 230
4   liblwawt.dylib                      0x0000000116b13e52 -[AWTView attributedSubstringForProposedRange:actualRange:] + 78
5   AppKit                              0x00007fff90e3587c -[NSTextInputContext(NSInputContext_WithCompletion) attributedSubstringForProposedRange:completionHandler:] + 105
6   AppKit                              0x00007fff90e326b4 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke708 + 113
7   AppKit                              0x00007fff90e2c4b8 -[NSTextInputContext tryHandleTSMEvent_attributedSubstringForProposedRange_withContext:dispatchCondition:dispatchWork:continuation:] + 101
8   AppKit                              0x00007fff90e325b0 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke702 + 517
9   AppKit                              0x00007fff90811890 -[NSTextInputContext handleTSMEvent:completionHandler:] + 2429
10  AppKit                              0x00007fff90810e9e _NSTSMEventHandler + 324
11  HIToolbox                           0x00007fff93d9277e _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1231
12  HIToolbox                           0x00007fff93d91be4 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 404
13  HIToolbox                           0x00007fff93d91a43 SendEventToEventTargetWithOptions + 43
14  HIToolbox                           0x00007fff93df463c SendTSMEvent_WithCompletionHandler + 417
15  HIToolbox                           0x00007fff93f9c6ad __SendTextInputEvent_WithCompletionHandler_block_invoke + 586
16  HIToolbox                           0x00007fff93f9a83b SendTextInputEvent_WithCompletionHandler + 1228
... more ...
gary-rowe commented 9 years ago

OK, that's a pretty comprehensive crash report. I've done some digging around and it looks like the Oracle JVM has had some issues in the past with various Input Method Editors (IMEs). Apparently these were corrected in 1.7.0_80 (the JRE we ship with MultiBit HD) but it looks like this hasn't been done fully for something as new as "El Capitan".

One workaround suggested by others with this problem is to use the Fn key during text input (not sure how that works since I don't have an IME installed) but it might mean something to someone who does. Another might be to use a different IME (perhaps standard English) in the hope that it works. Not satisfactory I know, but it'll help you to get on with things.

Overall, I don't think that this is an issue that we can resolve.

In the interests of privacy and saving some space, I'll reduce your stack trace entries since this is a public database.

OK to close?

gary-rowe commented 9 years ago

We may need to upgrade to Java 8 to see this one fully resolved. See #351.

linzhm commented 9 years ago

When using English, it seems to be OK. I should find whether it works under Yosemite.

gary-rowe commented 9 years ago

I have Yosemite available and I'd like to see if this can be replicated locally. I know it's fine for the Russian IME but I've not tried Chinese. For clarity I'd essentially apply the instructions here but target Chinese Simplified. Would that be accurate?

gary-rowe commented 9 years ago

I had a chance to play around with the Chinese Simplified IMEs on Yosemite. Both Pinyin and Wubi Xing are able to transfer Chinese characters into MultiBit HD with differing levels of success:

Here's the situation (with a fake password obviously) for Wubi Xing on the Unlock screen:

screen shot 2015-06-17 at 21 50 20

Given the inconsistency between two IMEs both produced by Apple I'm inclined to think that this is a JRE bug on El Capitan so I'm going to close this issue.