Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Map freezes when zoom in for Oppo R7s #15709

Closed
chuangchichih opened this issue Sep 25, 2019 · 8 comments · Fixed by #15978
Closed

Map freezes when zoom in for Oppo R7s #15709

chuangchichih opened this issue Sep 25, 2019 · 8 comments · Fixed by #15978
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@chuangchichih
Copy link

Steps to reproduce

  1. Launch app
  2. Start to zoom in
  3. Map freezes

Expected behavior

Map does not freeze, and work well.

Actual behavior

Map freezes

Screenshot_2019-09-25-14-31-15-13

Code

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    LibraryLoader.setLibraryLoader(new LibraryLoader() {
        @Override
        public void load(String name) {
            ReLinker.loadLibrary(MainActivity.this, name);
        }
    });
    Mapbox.getInstance(this, getString(R.string.mapbox_access_token));

    setContentView(R.layout.activity_main);

    mapView = findViewById(R.id.mapView);
    mapView.onCreate(savedInstanceState);

    mapView.getMapAsync(new OnMapReadyCallback() {
        @Override
        public void onMapReady(@NonNull final MapboxMap mapboxMap) {
            mapboxMap.setStyle(Style.OUTDOORS, new Style.OnStyleLoaded() {
                @Override
                public void onStyleLoaded(@NonNull Style style) {
                    pos = new LatLng(25.060260, 121.636942);

                    CameraPosition cameraPosition = new CameraPosition.Builder()
                            .target(pos)
                            .build();
                    mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
                }
            });
            mapboxMap.getUiSettings().setRotateGesturesEnabled(false);
        }
    });
    mapView.addOnDidFinishLoadingMapListener(new MapView.OnDidFinishLoadingMapListener() {
        @Override
        public void onDidFinishLoadingMap() {
            Log.e("loading map", "finish");
        }
    });
    mapView.addOnDidFailLoadingMapListener(new MapView.OnDidFailLoadingMapListener() {
        @Override
        public void onDidFailLoadingMap(String errorMessage) {
            Log.e("fail to load map", errorMessage);
        }
    });
}

// Add the mapView lifecycle to the activity's lifecycle methods
@Override
public void onResume() {
    super.onResume();
    mapView.onResume();
}

@Override
protected void onStart() {
    super.onStart();
    mapView.onStart();
}

@Override
protected void onStop() {
    super.onStop();
    mapView.onStop();
}

@Override
public void onPause() {
    super.onPause();
    mapView.onPause();
}

@Override
public void onLowMemory() {
    super.onLowMemory();
    mapView.onLowMemory();
}

@Override
protected void onDestroy() {
    super.onDestroy();
    mapView.onDestroy();
}

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    mapView.onSaveInstanceState(outState);
}

Logcat

09-25 14:06:03.333 6518-6562/? D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-25 14:06:03.353 6518-6518/? V/Mbgl-ConnectivityReceiver: connected - false
09-25 14:06:03.383 6518-6562/? I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BR.1.1.3.C8.05.01.00.115.099_msm8916_64_refs/tags/AU_LINUX_ANDROID_LA.BR.1.1.3.C8.05.01.00.115.099__release_AU (Ib5665b357a)
OpenGL ES Shader Compiler Version: E031.25.03.04
Build Date: 11/13/15 Fri
Local Branch:
Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.BR.1.1.3.C8.05.01.00.115.099
Local Patches: NONE
Reconstruct Branch: NOTHING
09-25 14:06:03.383 6518-6562/? I/OpenGLRenderer: Initialized EGL, version 1.4
09-25 14:06:03.393 6518-6562/? D/OpenGLRenderer: Enabling debug mode 0
09-25 14:06:03.423 6518-6558/com.example.maptest I/Mbgl-EGLConfigChooser: In emulator: false
09-25 14:06:03.433 6518-6567/com.example.maptest D/CrashJobIntentService: onHandleWork
09-25 14:06:03.433 6518-6558/com.example.maptest I/Mbgl: {GLThread 1160}[General]: GPU Identifier: Adreno (TM) 405
09-25 14:06:03.433 6518-6567/com.example.maptest W/CrashJobIntentService: Root directory doesn't exist
09-25 14:06:03.523 6518-6518/com.example.maptest W/art: Before Android 4.1, method int android.support.v7.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
09-25 14:06:04.723 6518-6518/com.example.maptest E/loading map: finish
09-25 14:06:04.753 6518-6558/com.example.maptest A/libc: invalid address or address of corrupt block 0xab88a510 passed to dlfree
09-25 14:06:04.773 6518-6558/com.example.maptest A/libc: invalid address or address of corrupt block 0xab88a510 passed to dlfree
09-25 14:06:04.783 6518-6566/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0x400c0907 (IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.783 6518-6566/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.783 6518-6566/com.example.maptest W/Adreno-EGLSUB: <updater_thread:428>: waitFunc failed
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <gsl_ldd_control:427>: ioctl fd 73 code 0xc02c093d (IOCTL_KGSL_SUBMIT_COMMANDS) failed: errno 35 Resource deadlock would occur
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-GSL: <log_gpu_snapshot:337>: panel.gpuSnapshotPath is not set.not generating user snapshot
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3715>: EGL_CONTEXT_LOST
09-25 14:06:04.793 6518-6558/com.example.maptest W/Adreno-EGL: eglTimestampCreate:5650: EGL_BAD_ALLOC
09-25 14:06:04.793 6518-6558/com.example.maptest E/libEGL: eglMakeCurrent:792 error 3003 (EGL_BAD_ALLOC)
09-25 14:06:04.793 6518-6558/com.example.maptest I/Mbgl-EGLConfigChooser: In emulator: false
09-25 14:06:04.803 6518-6558/com.example.maptest E/libEGL: eglCreateWindowSurface: native_window_api_connect (win=0xab7ccca0) failed (0xffffffea) (already connected to another API?)
09-25 14:06:04.803 6518-6558/com.example.maptest E/libEGL: eglCreateWindowSurface:417 error 3003 (EGL_BAD_ALLOC)

Configuration

Android versions: Android 5.1.1
Device models: Oppo R7s
GPU Renderer: Adreno (TM) 405, OpenGL ES 3.0
Mapbox SDK versions: 8.1.0

I also try the latest Mapbox SDK and use renderTextureMode, and map still freezes.
Thanks.

@LukasPaczos LukasPaczos added the Android Mapbox Maps SDK for Android label Sep 25, 2019
@Chaoba
Copy link
Contributor

Chaoba commented Sep 25, 2019

@chuangchichih Can you reproduce this issue on other devices?

@chuangchichih
Copy link
Author

@Chaoba No, the issue can only be reproduced on this device.
I tried the other device which is also Android 5.1.1, but map works well.

@Chaoba
Copy link
Contributor

Chaoba commented Sep 26, 2019

@chuangchichih We don't have oppoR7s, instead I have tested on R7 and R7t, not found this issue. Can you try to restart your phone?

@chuangchichih
Copy link
Author

chuangchichih commented Sep 27, 2019

@Chaoba do you test to zoom in to level 5 in Asia area or animate camera to zoom to level 5?
I will restart the phone, and try again, thanks.

@chuangchichih
Copy link
Author

@Chaoba I reset the phone, but the issue can still be reproduced.

@chuangchichih
Copy link
Author

chuangchichih commented Oct 2, 2019

By the way, Oppo R7s seems unable to use soloader to load library.
I also try on the project "Mapbox Android demo", and it also crashes, too.
Thus, I use relinker to load library instead.
Map also gets freezing when I open a simple map view.

@chuangchichih
Copy link
Author

@Chaoba ,
Hi, is any update?

@Chaoba
Copy link
Contributor

Chaoba commented Oct 8, 2019

@chuangchichih I can't find R7s, but I try to run test app on vivo X5M which has the same cpu(Snapdragon 615)with R7s, still can't reproduce it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants