首页 / 浏览问题 / 移动GIS / 问题详情
ar加载管线和三维模型加载崩溃问题
31EXP 2025年08月28日
产品:imobile android sdk 最新版本   

问题:三维模型加载和ar加载入口在同一个页面,先进入ar页面,正常打开加载,然后退出,进入三维模型加载页面,程序崩溃

下面为报错日志

其中activity的启动模式都是singleInstance   同时重新复写finish方法 moveTaskToBack(true),同时去掉super.finish()

因为如果不这样的话,如果反复进入ar页面,也会导致黑屏。

这种情况下应该怎么处理?

SIGSEGV(SEGV_MAPERR)
                                                                                                    0xa8
                                                                                                    #00    pc 0004f02c    /apex/com.android.runtime/lib/bionic/libc.so (__memcpy_a15+84) [armeabi-v7a::b3a547af3eb880c5dfd66f61a8c8b4ca]
                                                                                                    #01    pc 015ef679    /data/app/com.jm.smartpipe.debug-iUYlbmQojxAHPNkS9Xaqww==/base.apk (_ZN3UGC10UGMatrix4daSERKS0_+12)
                                                                                                    #02    pc 00b26211    /data/app/com.jm.smartpipe.debug-iUYlbmQojxAHPNkS9Xaqww==/base.apk (Java_com_supermap_realspace_SceneControlNative_jni_1SetARCameraProj+388)
                                                                                                    #03    pc 000ea519    /apex/com.android.runtime/lib/libart.so (art_quick_generic_jni_trampoline+40) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #04    pc 000e5bc5    /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #05    pc 0045c09f    /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+246) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #06    pc 000ee011    /apex/com.android.runtime/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+180) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #07    pc 00226fa7    /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_11ShadowFrameEtPNS_6JValueE+274) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #08    pc 0022310f    /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+802) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #09    pc 0045375b    /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+318) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #10    pc 000e0994    /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20) [armeabi-v7a::3cb7765ba257c28d19049e9eafe48ac6]
                                                                                                    #11    pc 000006fc    <unknown>
                                                                                                    java:
                                                                                                    com.supermap.realspace.SceneControl.setARCameraProj(SceneControl.java:1595)
                                                                                                    com.supermap.realspace.SceneControl.drawAR(SceneControl.java:1330)
                                                                                                    com.supermap.realspace.SceneControl.access$1000(SceneControl.java:80)
                                                                                                    com.supermap.realspace.SceneControl$RenderThread$1.run(SceneControl.java:880)
                                                                                                    android.os.Handler.handleCallback(Handler.java:908)
                                                                                                    android.os.Handler.dispatchMessage(Handler.java:103)
                                                                                                    android.os.Looper.loop(Looper.java:219)
                                                                                                    com.supermap.realspace.SceneControl$RenderThread.run(SceneControl.java:862)
2025-08-28 09:53:59.676  5239-6150  CrashReport             com.jm.smartpipe.debug               E  #++++++++++++++++++++++++++++++++++++++++++#
2025-08-28 09:53:59.682  5239-5629  SLAM_SMOOTH             com.jm.smartpipe.debug               E  imu:imu sensor type error 3
2025-08-28 09:53:59.682  5239-5629  SLAM_SMOOTH             com.jm.smartpipe.debug               E  IMU:check upload head error
2025-08-28 09:53:59.689  5239-5629  SLAM_SMOOTH             com.jm.smartpipe.debug               E  imu:imu sensor type error 3
2025-08-28 09:53:59.689  5239-5634  ACameraMetadata         com.jm.smartpipe.debug               E  getConstEntry: cannot find metadata tag 1114118
2025-08-28 09:53:59.689  5239-5629  SLAM_SMOOTH             com.jm.smartpipe.debug               E  IMU:check upload head error
2025-08-28 09:53:59.693  5239-5673  PLANE_CONF              com.jm.smartpipe.debug               E  [@SDK][PlaneConfiguration.cpp:SetValue](102): input size(16) not match int32_t
2025-08-28 09:53:59.693  5239-5673  PLANE_MANAGER           com.jm.smartpipe.debug               E  [@SDK][PlaneManager.cpp:SetValue](503): setValue key( HSDK_CONFIG_MANAGER_IMPL_SET_POINT_CLOUD ) error:-1
2025-08-28 09:53:59.693  5239-5673  AlgMgrImpl              com.jm.smartpipe.debug               E  [@SDK][AlgorithmManagerImpl.cpp:SetValue](603): key(HSDK_CONFIG_MANAGER_IMPL_SET_POINT_CLOUD) not defined, ret:-1

1个回答

您好,从报错日志和场景描述来看,崩溃的核心根源是 SuperMap SDK 的 AR 模块未彻底释放资源(Native 层内存、渲染线程、传感器 / 相机实例),导致后续操作中非法访问已失效的内存地址(SIGSEGV),同时伴随 AR 专属配置未重置的连锁错误,您可以尝试以下方式解决

1、先终止 AR 渲染线程(避免持续访问失效内存);
2、再释放 Native 层 / 传感器 / 相机资源(根除内存崩溃和硬件冲突);
3、最后重置 SDK 配置(解决平面 / 点云检测的配置冲突);
4、修正 Activity 生命周期(确保资源释放代码能触发)。

希望可以帮助您
1,805EXP 2025年08月28日
您说的逻辑我明白,但是

AR渲染线程,释放Native曾资源,重置sdk咋弄?

我使用了scenecontrol.dispose和scene.close,在切换ar退出再进入,基本上没啥问题了

但是如果从ar退出,再进入三维页面,三维模型能加载,但是模型的底图从绿色变成了空白

是怎么回事呢?怎么充值sdk配置?
...