gpt4 book ai didi

android - 为什么 SKMap 在加载 map 时崩溃?

转载 作者:太空狗 更新时间:2023-10-29 16:37:51 26 4
gpt4 key购买 nike

我正在尝试将 Skobbler map SDK 集成到我的 Android 应用程序中。但是当我尝试启动 map 时应用程序崩溃了。

在出现代码为 SEGV_MAPERRSIGSEGV 信号之前,日志似乎正常

06-10 11:51:35.073: D/SKMaps(13187): SKPrepareMapTextureThread----PrepareMapTexture - COPY TIME 671
06-10 11:51:35.073: D/dalvikvm(13187): Trying to load lib /data/data/com.kolobee.mini/lib/libngnative.so 0x41550098
06-10 11:51:37.053: D/dalvikvm(13187): Added shared lib /data/data/com.kolobee.mini/lib/libngnative.so 0x41550098
06-10 11:51:41.173: D/dalvikvm(13187): GC_CONCURRENT freed 477K, 14% free 9126K/10503K, paused 11ms+2ms, total 105ms
06-10 11:52:02.403: D/SKMaps(13187): SKMapInitSettings---- Map style [/storage/sdcard0/Android/data/com.kolobee.mini/files/SKMapsdaystyle/ , daystyle.json ,-1]
06-10 11:52:02.423: D/SKMaps(13187): SKmaps---- INITIALIZE SK MAPS WITH SETTINGS
06-10 11:52:02.423: D/SKMaps(13187): SKmaps----versionFileName = version2_public_sdk_android_2_0.txt
06-10 11:52:02.433: D/SKMaps(13187): SKUtils----Return calculated device type 3
06-10 11:52:02.433: D/SKMaps(13187): SKmaps----ADVISOR com.skobbler.ngx.navigation.SKAdvisorSettings@416afb18
06-10 11:52:02.433: D/SKMaps(13187): SKmaps----Json file /storage/sdcard0/Android/data/com.kolobee.mini/files/SKMapsdaystyle/daystyle.json
06-10 11:52:02.438: D/SKMaps(13187): SKUtils----Return calculated device type 3
06-10 11:52:03.023: D/SKMaps(13187): SKUtils----found proxyUser: null, proxyPassword: null
06-10 11:52:03.333: D/SKMaps(13187): SKmaps----UID = f12e81d2a2796751fc8815a8e9f68c3d;1f515444368a6b691faab49851f156b4;788a1352a316fcc3bdbc15ed98fc182;ab19fa567447209d9ea477c33ee85bfb
06-10 11:52:03.333: D/SKMaps(13187): SKmaps----key = osName , value = android
06-10 11:52:03.333: D/SKMaps(13187): SKmaps----key = osVer , value = 4.1.2
06-10 11:52:03.333: D/SKMaps(13187): SKmaps----key = appName , value =
06-10 11:52:03.333: D/SKMaps(13187): SKmaps----key = appVer , value =
06-10 11:52:03.333: D/SKMaps(13187): SKmaps----key = uid , value = f12e81d2a2796751fc8815a8e9f68c3d;1f515444368a6b691faab49851f156b4;788a1352a316fcc3bdbc15ed98fc182;ab19fa567447209d9ea477c33ee85bfb
06-10 11:52:03.333: D/dalvikvm(13187): Trying to load lib /data/data/com.kolobee.mini/lib/libngnative.so 0x41550098
06-10 11:52:03.333: D/dalvikvm(13187): Shared lib '/data/data/com.kolobee.mini/lib/libngnative.so' already loaded in same CL 0x41550098
06-10 11:52:03.333: D/SKMaps(13187): SKmaps----INITIALIZE FCD accountKey= locale= es macAddress=44:A7:CF:BC:D7:DC osName=android osVersion=4.1.2 deviceMaker =samsung deviceModel=GT-I9100 orientation= 1 appid=f12e81d2a2796751fc8815a8e9f68c3d;1f515444368a6b691faab49851f156b4;788a1352a316fcc3bdbc15ed98fc182;ab19fa567447209d9ea477c33ee85bfb appName= appVersion= serverUrl=http://tor.skobbler.net/tor
06-10 11:52:03.338: D/SKMaps(13187): SKmaps----ENABLE FCD true
06-10 11:52:03.433: D/SKMaps(13187): SKMapSurfaceView----SKMapSurfaceView constructor
06-10 11:52:03.433: D/SKMaps(13187): SKMapSurfaceView----os model GT-I9100
06-10 11:52:03.433: D/dalvikvm(13187): Trying to load lib /data/data/com.kolobee.mini/lib/libngnative.so 0x41550098
06-10 11:52:03.433: D/dalvikvm(13187): Shared lib '/data/data/com.kolobee.mini/lib/libngnative.so' already loaded in same CL 0x41550098
06-10 11:52:03.438: D/SKMaps(13187): MapRenderer----Set map density 1.5
06-10 11:52:03.463: D/TextLayoutCache(13187): Using debug level = 0 - Debug Enabled = 0
06-10 11:52:03.578: D/SKMaps(13187): MapRenderer----onSurfaceCreated
06-10 11:52:03.583: D/SKMaps(13187): MapRenderer---- LinInitialized = true

06-10 11:52:03.643: A/libc(13187): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 13245 (Thread-584)

06-10 11:52:03.668: D/SKMaps(13187): SKVersionManager---- newversioncallback updatemapversionstatus=0
06-10 11:52:03.668: D/SKMaps(13187): SKVersionManager----Version file update status = 0 success
06-10 11:52:03.668: D/SKMaps(13187): SKVersionManager----Request done at startup
06-10 11:52:03.668: D/SKMaps(13187): SKVersionManager----Current version is 0
06-10 11:52:03.668: D/SKMaps(13187): SKVersionManager----Current maps version is 0 => must update it to the last remote maps version

调试日志显示有关错误的更多信息:

06-10 11:52:03.773: I/DEBUG(1825): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000c
06-10 11:52:03.978: I/DEBUG(1825): backtrace:
06-10 11:52:03.978: I/DEBUG(1825): #00 pc 0029e35c /data/data/com.kolobee.mini/lib/libngnative.so (WorldTextures::LoadTextures(float*, int, bool)+316)
06-10 11:52:03.978: I/DEBUG(1825): #01 pc 0029e33c /data/data/com.kolobee.mini/lib/libngnative.so (WorldTextures::LoadTextures(float*, int, bool)+284)

可能导致此错误的原因是什么?

最佳答案

我在设置资源路径时出错,而不是:

File externalDir = getExternalFilesDir(null);
if (externalDir != null) {
mapResourcesDirPath = externalDir + "/SKMaps/";
} else {
mapResourcesDirPath = getFilesDir() + "/SKMaps/";
}

我有:

File externalDir = getExternalFilesDir(null);
if (externalDir != null) {
mapResourcesDirPath = externalDir + "/SKMaps";
} else {
mapResourcesDirPath = getFilesDir() + "/SKMaps";
}

忘记路径上的尾随 / 会产生错误。这很难找到。

关于android - 为什么 SKMap 在加载 map 时崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24138217/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com