Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Desktop] macOS Digital Keyboard's (accessibility keyboard) crashes Brave #7546

Closed
IAmYhvr opened this issue Dec 30, 2019 · 23 comments
Closed
Assignees
Labels
accessibility Chromium/waiting upstream Issue is in Chromium; we'll likely wait for the fix crash OS/Desktop OS/macOS priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-macOS QA/Yes release-notes/include

Comments

@IAmYhvr
Copy link

IAmYhvr commented Dec 30, 2019

Description

macOS has a built-in digital keyboard for accessibility. Whenever I try to hit the "Enter" key on the digital keyboard, it crashes Brave. (Very shortly if not immediately)

Steps to Reproduce

  1. Go to macOS System Preferences -> Keyboard.
  2. Check "Show keyboard and emoji viewers in menu bar"
  3. In the menu bar, select "Show keyboard viewer"
  4. Open Brave
  5. Go to the search bar, type something in, and tap the "Enter" key on the digital keyboard

Actual result:

Crashes. https://i.imgur.com/aSe9fkw.mp4

Expected result:

That Brave does not crash, and I can use the "Enter" key again.

Reproduces how often:

Easily reproduces.

Brave version (brave://version info)

Brave: 1.1.23 Chromium: 79.0.3945.88 (Official Build) (64-bit)
Revision: c2a58a36b9411c80829b4b154bfcab97e581f1f3-refs/branch-heads/3945@{#954}
OS: macOS Version 10.15.2 (Build 19C57)

Version/Channel Information:

N/A

  • Can you reproduce this issue with the current release? Yes.
  • Can you reproduce this issue with the beta channel? N/A
  • Can you reproduce this issue with the dev channel? N/A
  • Can you reproduce this issue with the nightly channel? N/A

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? You can't enable shields on the start tab.
  • Does the issue resolve itself when disabling Brave Rewards? No.
    Is the issue reproducible on the latest version of Chrome? No.

Miscellaneous Information:

I left the keyboard minimized when I went back from testing Chrome, and it crashed instantly.
EDIT: I mean Brave crashed instantly.
I'll test the other builds when/if I get the chance.

@bsclifton
Copy link
Member

Also reported by @orbanbalage with #4141

Crash IDs (macOS Catalina):
e1ff989fc7208c04
1251922574853bd5

@bsclifton
Copy link
Member

bsclifton commented Dec 31, 2019

This or a similar bug (possible same root cause) appears to be recorded upstream in Chromium with https://bugs.chromium.org/p/chromium/issues/detail?id=1029719

I left a comment pointing back at this issue; owner should be able to diagnose given the great steps above 😄

@YhvrWasTaken what version of Chrome did you test with?

@IAmYhvr
Copy link
Author

IAmYhvr commented Dec 31, 2019

Thanks! I tested with
Chrome: 79.0.3945.88 (Official Build) (64-bit)
Revision: c2a58a36b9411c80829b4b154bfcab97e581f1f3-refs/branch-heads/3945@{#954}
OS: macOS Version 10.15.2 (Build 19C57)

and I would check out the Chromium link, but I can't because it says "Permission denied.". If there is any more info I can give, let me know!

@rebron rebron added Chromium/waiting upstream Issue is in Chromium; we'll likely wait for the fix priority/P2 A bad problem. We might uplift this to the next planned release. labels Jan 3, 2020
@eDave56
Copy link

eDave56 commented Mar 31, 2020

Looks like it's working with Chromium | 82.0.4079.0 (Developer Build) (64-bit) Revision | de159317a58f376e75580f973e1393d63ba330d3-refs/heads/master@{#747319} on 10.15.3

@eljuno
Copy link

eljuno commented Apr 14, 2020

@bsclifton
Copy link
Member

@eDave56 thanks for the heads up! 😄 @mkarolin is working on the Chromium 83 upgrade now - we can recheck this once that is merged. I'll go ahead and put into the 1.9 milestone so that we can retest

@rebron
Copy link
Collaborator

rebron commented May 27, 2020

Closed. Fixed with cr83.

@kjozwiak
Copy link
Member

kjozwiak commented Jun 8, 2020

Thanks for the detailed/quality bug report @YhvrWasTaken 👍

@yermulnik
Copy link

yermulnik commented Sep 2, 2020

Having the same crash issue on Catalina with the latest Brave with running Keyboard Viewer. Closing Keyboard Viewer fixes the issue with Brave. JFYI.

@srirambv srirambv changed the title macOS Digital Keyboard's Enter key crashes Brave [Desktop] macOS Digital Keyboard's Enter key crashes Brave Sep 9, 2020
@alanhoyle
Copy link

Brave still crashes on macOS Catalina 10.15.6 if Keyboard Viewer is open on Brave Version 1.13.82 Chromium: 85.0.4183.83 (Official Build) (64-bit)

@bsclifton bsclifton changed the title [Desktop] macOS Digital Keyboard's Enter key crashes Brave [Desktop] macOS Digital Keyboard's (accessibility keyboard) crashes Brave Sep 24, 2020
@bsclifton
Copy link
Member

+1 from @FixmyBrave via #11812 - crash ID: e6967000-106a-1805-0000-000000000000

Also +1 from @Datta0 via #11758

@simonhong
Copy link
Member

simonhong commented Sep 25, 2020

Got this log when crashing.

[80711:775:0925/125217.012115:FATAL:ax_position.h(3012)] Check failed: (result == 0 && slow_result == 0) || (result < 0 && slow_result < 0) || (result > 0 && slow_result > 0).
0   libbase.dylib                       0x00000001072fb2ef base::debug::CollectStackTrace(void**, unsigned long) + 31
1   libbase.dylib                       0x0000000107019afb base::debug::StackTrace::StackTrace(unsigned long) + 75
2   libbase.dylib                       0x0000000107019b7d base::debug::StackTrace::StackTrace(unsigned long) + 29
3   libbase.dylib                       0x0000000107019b58 base::debug::StackTrace::StackTrace() + 40
4   libbase.dylib                       0x0000000107065757 logging::LogMessage::~LogMessage() + 199
5   libbase.dylib                       0x00000001070669d5 logging::LogMessage::~LogMessage() + 21
6   libbase.dylib                       0x00000001070669fc logging::LogMessage::~LogMessage() + 28
7   libbase.dylib                       0x0000000106fd599e logging::CheckError::~CheckError() + 46
8   libbase.dylib                       0x0000000106fd5455 logging::CheckError::~CheckError() + 21
9   libcontent.dylib                    0x000000014522aca6 ui::AXPosition<content::BrowserAccessibilityPosition, content::BrowserAccessibility>::CompareTo(ui::AXPosition<content::BrowserAccessibilityPosition, content::BrowserAccessibility> const&) const + 2774
10  libcontent.dylib                    0x0000000145259d88 ui::AXRange<ui::AXPosition<content::BrowserAccessibilityPosition, content::BrowserAccessibility> >::CompareEndpoints(ui::AXPosition<content::BrowserAccessibilityPosition, content::BrowserAccessibility> const*, ui::AXPosition<content::BrowserAccessibilityPosition, content::BrowserAccessibility> const*) + 216
11  libcontent.dylib                    0x0000000145244dd7 ui::AXRange<ui::AXPosition<content::BrowserAccessibilityPosition, content::BrowserAccessibility> >::GetText(ui::AXTextConcatenationBehavior, int, bool, unsigned long*) const + 215
12  libcontent.dylib                    0x000000014524f742 (anonymous namespace)::GetTextForTextMarkerRange(objc_object*) + 178
13  libcontent.dylib                    0x000000014524d7d8 -[BrowserAccessibilityCocoa accessibilityAttributeValue:forParameter:] + 14952
14  AppKit                              0x00007fff2bf0b61c ___NSAccessibilityEntryPointValueForAttributeWithParameter_block_invoke.821 + 557
15  AppKit                              0x00007fff2bf06a74 NSAccessibilityPerformEntryPointObject + 16
16  AppKit                              0x00007fff2bf07ed1 NSAccessibilityEntryPointValueForAttributeWithParameter + 172
17  AppKit                              0x00007fff2bd0f931 CopyParameterizedAttributeValue + 460
18  HIServices                          0x00007fff2c901f6f _AXXMIGCopyParameterizedAttributeValue + 409
19  HIServices                          0x00007fff2c9240bf _XCopyParameterizedAttributeValue + 608
20  HIServices                          0x00007fff2c8e1f64 mshMIGPerform + 174
21  CoreFoundation                      0x00007fff2e62f304 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
22  CoreFoundation                      0x00007fff2e62f250 __CFRunLoopDoSource1 + 541
23  CoreFoundation                      0x00007fff2e62dd79 __CFRunLoopRun + 2270
24  CoreFoundation                      0x00007fff2e62ce3e CFRunLoopRunSpecific + 462

After commenting out above DCHECK, got another DCHECK failure.

[99403:775:0925/132426.041694:FATAL:browser_accessibility_cocoa.mm(3129)] Check failed: startOffset >= 0 (-1 vs. 0)
0   libbase.dylib                       0x000000010b51c2ef base::debug::CollectStackTrace(void**, unsigned long) + 31
1   libbase.dylib                       0x000000010b23aafb base::debug::StackTrace::StackTrace(unsigned long) + 75
2   libbase.dylib                       0x000000010b23ab7d base::debug::StackTrace::StackTrace(unsigned long) + 29
3   libbase.dylib                       0x000000010b23ab58 base::debug::StackTrace::StackTrace() + 40
4   libbase.dylib                       0x000000010b286757 logging::LogMessage::~LogMessage() + 199
5   libbase.dylib                       0x000000010b2879d5 logging::LogMessage::~LogMessage() + 21
6   libbase.dylib                       0x000000010b2879fc logging::LogMessage::~LogMessage() + 28
7   libbase.dylib                       0x000000010b1f699e logging::CheckError::~CheckError() + 46
8   libbase.dylib                       0x000000010b1f6455 logging::CheckError::~CheckError() + 21
9   libcontent.dylib                    0x00000001482558e5 -[BrowserAccessibilityCocoa accessibilityAttributeValue:forParameter:] + 19221
10  AppKit                              0x00007fff2bf0b61c ___NSAccessibilityEntryPointValueForAttributeWithParameter_block_invoke.821 + 557
11  AppKit                              0x00007fff2bf06a74 NSAccessibilityPerformEntryPointObject + 16
12  AppKit                              0x00007fff2bf07ed1 NSAccessibilityEntryPointValueForAttributeWithParameter + 172
13  AppKit                              0x00007fff2bd0f931 CopyParameterizedAttributeValue + 460
14  HIServices                          0x00007fff2c901f6f _AXXMIGCopyParameterizedAttributeValue + 409
15  HIServices                          0x00007fff2c9240bf _XCopyParameterizedAttributeValue + 608
16  HIServices                          0x00007fff2c8e1f64 mshMIGPerform + 174
17  CoreFoundation                      0x00007fff2e62f304 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
18  CoreFoundation                      0x00007fff2e62f250 __CFRunLoopDoSource1 + 541
19  CoreFoundation                      0x00007fff2e62dd79 __CFRunLoopRun + 2270

@simonhong
Copy link
Member

Got another failure with virtual keyboard.

[11474:775:0929/081036.754361:FATAL:browser_accessibility_cocoa.mm(3129)] Check failed: startOffset >= 0 (-1 vs. 0)
0   libbase.dylib                       0x000000010555e779 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   libbase.dylib                       0x0000000105449f03 base::debug::StackTrace::StackTrace() + 19
2   libbase.dylib                       0x000000010546d035 logging::LogMessage::~LogMessage() + 261
3   libbase.dylib                       0x000000010546dd1e logging::LogMessage::~LogMessage() + 14
4   libcontent.dylib                    0x0000000110bd0da3 -[BrowserAccessibilityCocoa accessibilityAttributeValue:forParameter:] + 14339
5   AppKit                              0x00007fff2ad5761c ___NSAccessibilityEntryPointValueForAttributeWithParameter_block_invoke.821 + 557
6   AppKit                              0x00007fff2ad52a74 NSAccessibilityPerformEntryPointObject + 16
7   AppKit                              0x00007fff2ad53ed1 NSAccessibilityEntryPointValueForAttributeWithParameter + 172
8   AppKit                              0x00007fff2ab5b931 CopyParameterizedAttributeValue + 460
9   HIServices                          0x00007fff2b74df6f _AXXMIGCopyParameterizedAttributeValue + 409
10  HIServices                          0x00007fff2b7700bf _XCopyParameterizedAttributeValue + 608
11  HIServices                          0x00007fff2b72df64 mshMIGPerform + 174
12  CoreFoundation                      0x00007fff2d47b304 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
13  CoreFoundation                      0x00007fff2d47b250 __CFRunLoopDoSource1 + 541
14  CoreFoundation                      0x00007fff2d479d79 __CFRunLoopRun + 2270
15  CoreFoundation                      0x00007fff2d478e3e CFRunLoopRunSpecific + 462
16  HIToolbox                           0x00007fff2c0a5abd RunCurrentEventLoopInMode + 292
17  HIToolbox                           0x00007fff2c0a57d5 ReceiveNextEventCommon + 584
18  HIToolbox                           0x00007fff2c0a5579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
19  AppKit                              0x00007fff2a6eb039 _DPSNextEvent + 883
20  AppKit                              0x00007fff2a6e9880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
21  libchrome_dll.dylib                 0x0000000109c68a60 __71-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke + 64
22  libbase.dylib                       0x0000000105577392 base::mac::CallWithEHFrame(void () block_pointer) + 10
23  libchrome_dll.dylib                 0x0000000109c68999 -[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 153
24  AppKit                              0x00007fff2a6db58e -[NSApplication run] + 658
25  libbase.dylib                       0x000000010558403c base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 348
26  libbase.dylib                       0x0000000105582692 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 130
27  libbase.dylib                       0x000000010550b95d base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 349
28  libbase.dylib                       0x00000001054bce9c base::RunLoop::Run() + 956
29  libchrome_dll.dylib                 0x000000010974e21f ChromeBrowserMainParts::MainMessageLoopRun(int*) + 175
30  libcontent.dylib                    0x0000000110d3b596 content::BrowserMainLoop::RunMainMessageLoopParts() + 54
31  libcontent.dylib                    0x0000000110d3d892 content::BrowserMainRunnerImpl::Run() + 82
32  libcontent.dylib                    0x0000000110d384eb content::BrowserMain(content::MainFunctionParams const&) + 267
33  libcontent.dylib                    0x00000001119c39ce content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) + 1406
34  libcontent.dylib                    0x00000001119c3423 content::ContentMainRunnerImpl::Run(bool) + 467
35  libembedder.dylib                   0x00000001053eda1e service_manager::Main(service_manager::MainParams const&) + 3310
36  libcontent.dylib                    0x00000001119c2668 content::ContentMain(content::ContentMainParams const&) + 120
37  libchrome_dll.dylib                 0x0000000108453ce5 ChromeMain + 277
38  Brave Browser Development           0x000000010270c69f main + 287
39  libdyld.dylib                       0x00007fff674eacc9 start + 1

@simonhong
Copy link
Member

Upstream chromium has same DCHECK failure(#7546 (comment)) - Filed an upstream issue for this (https://bugs.chromium.org/p/chromium/issues/detail?id=1133086)
However, Chrome stable is not crashed with virtual keyboard while Brave crashed.

@simonhong
Copy link
Member

As I wrote #7546 (comment), this dcheck failure is what I first met while virtual keyboard is on. To do debug more, this dcheck failure should be fixed first. Then, I think we can go further.
https://bugs.chromium.org/p/chromium/issues/detail?id=1133086 filed and dev is assigned. I'll wait till this failure is fixed in upstream. Hope this also fixes our crash :)

@bwnstck
Copy link

bwnstck commented Nov 3, 2020

Glad to hear, I recently switched to US Keyboard layout but still having my old keys on the keyboard... Virtual keyboard saves my life ;) but since then I can't use Brave anymore... Hope you'll fix the problem :)

iefremov added a commit to brave/brave-core that referenced this issue Dec 16, 2020
Fixes brave/brave-browser#7546

Related upstream bugs:
https://bugs.chromium.org/p/chromium/issues/detail?id=1029719
https://bugs.chromium.org/p/chromium/issues/detail?id=1133086

It is pretty hard to craft a proper fix so we just add an extra
check and try to return quickly (along with sending a pseudo
crash dump).
bsclifton pushed a commit to brave/brave-core that referenced this issue Jan 22, 2021
Fixes brave/brave-browser#7546

Related upstream bugs:
https://bugs.chromium.org/p/chromium/issues/detail?id=1029719
https://bugs.chromium.org/p/chromium/issues/detail?id=1133086

It is pretty hard to craft a proper fix so we just add an extra
check and try to return quickly (along with sending a pseudo
crash dump).
@simonhong simonhong assigned iefremov and unassigned simonhong Jan 23, 2021
@iefremov
Copy link
Contributor

Should be fixed with brave/brave-core#7832 in Nightly. Would be awesome if folks could check

@iefremov
Copy link
Contributor

should be fixed in beta and release

@iefremov iefremov added this to the 1.20.x - Release #2 milestone Feb 16, 2021
@alanhoyle
Copy link

Appears to be fixed on 1.20.103 (i.e. the current release).

Thank you!

@LaurenWags
Copy link
Member

LaurenWags commented Feb 18, 2021

Verified passed with macOS x64 10.15.7 (Catalina)

Brave | 1.20.104 Chromium: 88.0.4324.152 (Official Build) (x86_64)
-- | --
Revision | 6579930fc53b4dc589c042bec9d0a3778326974d-refs/branch-heads/4324@{#2106}
OS | macOS Version 10.15.7 (Build 19H512)

Verified using STR from #7546 (comment). No crashes were observed. Note, I was unable to reproduce the crash using 1.19.x as well.


Verified passed with macOS x64 10.14.6 (Mojave)

Brave	1.20.104 Chromium: 88.0.4324.152 (Official Build) (x86_64)
Revision	6579930fc53b4dc589c042bec9d0a3778326974d-refs/branch-heads/4324@{#2106}
OS	macOS Version 10.14.6 (Build 18G103)

Verified using STR from #7546 (comment). No crashes were observed.


Verified (as much as is possible) using STR from #7546 (comment); didn't see any crashes. Note: I wasn't able to readily reproduce this crash using 1.19.92 on macOS Big Sur 11.2.1, either.

Brave 1.20.104 Chromium: 88.0.4324.152 (Official Build) (x86_64)
Revision 6579930fc53b4dc589c042bec9d0a3778326974d-refs/branch-heads/4324@{#2106}
OS macOS Version 11.2.1 (Build 20D74)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Chromium/waiting upstream Issue is in Chromium; we'll likely wait for the fix crash OS/Desktop OS/macOS priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-macOS QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.