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

Crash on TemplateUrlServiceFactory call #34826

Closed
SergeyZhukovsky opened this issue Dec 11, 2023 · 2 comments · Fixed by brave/brave-core#21328 or brave/brave-core#21423
Closed

Crash on TemplateUrlServiceFactory call #34826

SergeyZhukovsky opened this issue Dec 11, 2023 · 2 comments · Fixed by brave/brave-core#21328 or brave/brave-core#21423
Assignees
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Test-All-Platforms QA/Yes release-notes/include

Comments

@SergeyZhukovsky
Copy link
Member

I found that crash on GPC on v1.63.24 nightly build. It exist on stable channel as well.

Stack Trace:
  RELADDR   FUNCTION                                                                          FILE:LINE
  v------>  std::__Cr::unique_ptr<TemplateUrlServiceAndroid, std::__Cr::default_delete<TemplateUrlServiceAndroid>>::operator bool() const  ../../third_party/libc++/src/include/__memory/unique_ptr.h:284:19
  0000000005d8c844  TemplateURLService::GetJavaObject()                                               ../../components/search_engines/template_url_service.cc:304:8
  v------>  JNI_TemplateUrlServiceFactory_GetTemplateUrlService(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&)  ../../chrome/browser/search_engines/template_url_service_factory_android.cc:18:61
  000000000770307c  Java_J_N_MSnR7M2J                                                                 gen/jni_headers/chrome/browser/search_engines/android/jni_headers/TemplateUrlServiceFactory_jni.h:35:10
  000000000002aa40  art_jni_trampoline+128                                                            /data/app/~~3JfrdQT-kxtpERRf63umvA==/com.brave.browser_nightly-Qxs6NiEuEcQp4goJqXsKrA==/oat/arm64/base.odex
  0000000000209398  nterp_helper+152                                                                  /apex/com.android.art/lib64/libart.so
  0000000000466f90  vtable for rtc::RefCountedObject<webrtc::AudioTrackProxyWithInternal<webrtc::AudioTrack>>  ld-temp.o:0:0
  0000000000209334  nterp_helper+52                                                                   /apex/com.android.art/lib64/libart.so
  00000000001e0278  ??                                                                                ??:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  0000000000563d62  net::(anonymous namespace)::kPreloadedHSTSData                                    transport_security_state.cc:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  000000000022458c  ??                                                                                ??:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  0000000000223fe4  .str.214.llvm.10731136064975173325                                                sanitizer_attribute_lists.cc:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  0000000000221fb2  ??                                                                                ??:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  0000000000220d22  ??                                                                                ??:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  0000000000140176  ??                                                                                ??:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  00000000000d18f0  ??                                                                                ??:0:0
  000000000020a254  nterp_helper+3924                                                                 /apex/com.android.art/lib64/libart.so
  000000000056cfa8  net::(anonymous namespace)::kPreloadedHSTSData                                    transport_security_state.cc:0:0
  000000000028ed38  android.app.Instrumentation.callActivityOnStop+56                                 /system/framework/arm64/boot-framework.oat
  00000000005eb474  android.app.Activity.performStop+916                                              /system/framework/arm64/boot-framework.oat
  0000000000390160  android.app.ActivityThread.callActivityOnStop+432                                 /system/framework/arm64/boot-framework.oat
  00000000003a7f98  android.app.ActivityThread.performStopActivityInner+1240                          /system/framework/arm64/boot-framework.oat
  00000000003b2944  android.app.ActivityThread.handleStopActivity+148                                 /system/framework/arm64/boot-framework.oat
  00000000002cd850  android.app.servertransaction.TransactionExecutor.performLifecycleSequence+528    /system/framework/arm64/boot-framework.oat
  00000000002cd57c  android.app.servertransaction.TransactionExecutor.executeLifecycleState+300       /system/framework/arm64/boot-framework.oat
  00000000002cddc0  android.app.servertransaction.TransactionExecutor.execute+800                     /system/framework/arm64/boot-framework.oat
  000000000038bd58  android.app.ActivityThread$H.handleMessage+1384                                   /system/framework/arm64/boot-framework.oat
  0000000000729dd0  android.os.Handler.dispatchMessage+192                                            /system/framework/arm64/boot-framework.oat
  000000000072da8c  android.os.Looper.loopOnce+1276                                                   /system/framework/arm64/boot-framework.oat
  000000000072d4e8  android.os.Looper.loop+648                                                        /system/framework/arm64/boot-framework.oat
  00000000003a4f58  android.app.ActivityThread.main+1672                                              /system/framework/arm64/boot-framework.oat
  0000000000458000  art_quick_invoke_static_stub+576                                                  /apex/com.android.art/lib64/libart.so
  000000000048ad9c  _jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1560  /apex/com.android.art/lib64/libart.so
  000000000048a75c  art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*) (.__uniq.165753521025965369065708152063621506277)+48  /apex/com.android.art/lib64/libart.so
  0000000000099148  art_jni_trampoline+120                                                            /system/framework/arm64/boot.oat
  0000000000a65480  com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+144                   /system/framework/arm64/boot-framework.oat
  0000000000a729f8  com.android.internal.os.ZygoteInit.main+4136                                      /system/framework/arm64/boot-framework.oat
  0000000000458000  art_quick_invoke_static_stub+576                                                  /apex/com.android.art/lib64/libart.so
  0000000000589a94  art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+912  /apex/com.android.art/lib64/libart.so
  0000000000606a7c  art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+160  /apex/com.android.art/lib64/libart.so
  00000000000c0cd8  _JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120                     /system/lib64/libandroid_runtime.so
  00000000000cd224  android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+948  /system/lib64/libandroid_runtime.so
  0000000000002560  main+1280                                                                         /system/bin/app_process64
  0000000000074dd0  __libc_init+96                                                                    /apex/com.android.runtime/lib64/bionic/libc.so
@SergeyZhukovsky
Copy link
Member Author

that is still not fixed and I have steps this time:

  1. Open Brave.
  2. Make sure you don't have any private tab open.
  3. Go to Settings->Search Engines and change a search engine for private tabs to any.
  4. Close the dialog via X.
  5. Observe the crash.

@hffvld
Copy link
Contributor

hffvld commented Feb 7, 2024

Verified on Galaxy Tab S8 and Pixel 7 using version(s):

Device/OS: 
- Galaxy Tab S8 / gts8wifixx-user 13 TP1A.220624.014 release-keys
- Pixel 7 / panther_beta-user 14 AP11.231215.009 release-keys
Brave build: 1.63.146
Chromium: 121.0.6167.139 (Official Build) beta (64-bit) 

Fresh profile

STEPS:

  1. Follow the steps from Crash on TemplateUrlServiceFactory call #34826 (comment)

ACTUAL RESULTS:

  • Verified that Brave is not crashing when changing Search engine for the Standard or Private tab and closing the settings with X

Galaxy Tab S8

2024-02-06_19-30-32.mp4

Pixel 7

2024-02-06_18-56-55.mp4
Upgraded profile

STEPS:

  1. Install and launch Brave 1.62.146
  2. Three-dot menu > Settings > Search engines
  3. Private tab > Select any other SE > Use X to exist the settings > Observe Brave crash
  4. Upgrade Brave to 1.63.146
  5. Repeat Steps 2 - 3 > Verify Brave is not crashing anymore

ACTUAL RESULTS:

  • Verified that Brave is not crashing when changing Search engine for the Standard or Private tab and closing the settings with X

Galaxy Tab S8

2024-02-06_19-25-26.mp4

Pixel 7

2024-02-06_19-20-23.mp4

@hffvld hffvld added QA Pass - Android ARM QA Pass - Android Tab and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment