Unity打包崩溃SRP-URP-管线的问题:Shader::SRPBatcherInfoSetup()

URP build always crash when 'Use SPR Batcher' is ON by default - Bug Reports - Niantic SDK for Unity Community

有点类似这个情况,暂时没有解决方法

cs 复制代码
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/bluejay/bluejay:13/TQ3A.230805.001/10316531:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2023-08-29 14:50:18.669731330+0800
Process uptime: 72s
Cmdline: {*** bundle_identifier ***}
pid: 29110, tid: 29296, name: Thread-8  >>> {*** bundle_identifier ***} <<<
uid: 10380
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x0000007170400000
    x0  0000005efe084840  x1  00000071703fffe0  x2  00000000000000e0  x3  0000005efe084980
    x4  0000007170400110  x5  0000005efe084af0  x6  0000000000000000  x7  0000000000000000
    x8  0000000000000000  x9  0000000000000000  x10 0000000000000000  x11 0000000000000000
    x12 0000000000000000  x13 0000000000000000  x14 00000071801877f0  x15 0000000000000023
    x16 00000072adc7acf0  x17 00000075d6bc2f20  x18 00000071abd18000  x19 0000000000000010
    x20 0000007246dd52c0  x21 0000000000000022  x22 00000071703ffe60  x23 0000005efe084840
    x24 00000000000002b0  x25 b40000741a52cc50  x26 00000000000002b0  x27 00000071d0457670
    x28 00000071ac848950  x29 00000000000000a0
    lr  00000072ad146c0c  sp  00000071ac848690  pc  00000075d6bc2ecc  pst 0000000020001000
backtrace:
      #00 pc 000000000004eecc  /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy+284) (BuildId: dc4001c2ef2dfc23467040797a96840c)
      #01 pc 000000000193cc08  /data/app/~~tj3lv7b-WWtkzM1sYJ1rVw==/{*** bundle_identifier ***}-EdsH-Q3L1jgEYnGIt8Obpw==/lib/arm64/libunity.so (**GfxDeviceGLES::DrawBuffersBatchMode**(GfxBatchHeader const&)+184) (BuildId: 8ceca445f342b58f)
      #02 pc 0000000001b42070  /data/app/~~tj3lv7b-WWtkzM1sYJ1rVw==/{*** bundle_identifier ***}-EdsH-Q3L1jgEYnGIt8Obpw==/lib/arm64/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+29236) (BuildId: 8ceca445f342b58f)
      #03 pc 0000000001b3add8  /data/app/~~tj3lv7b-WWtkzM1sYJ1rVw==/{*** bundle_identifier ***}-EdsH-Q3L1jgEYnGIt8Obpw==/lib/arm64/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+84) (BuildId: 8ceca445f342b58f)
      #04 pc 0000000001b3ad78  /data/app/~~tj3lv7b-WWtkzM1sYJ1rVw==/{*** bundle_identifier ***}-EdsH-Q3L1jgEYnGIt8Obpw==/lib/arm64/libunity.so (GfxDeviceWorker::Run()+140) (BuildId: 8ceca445f342b58f)
      #05 pc 0000000001b3aafc  /data/app/~~tj3lv7b-WWtkzM1sYJ1rVw==/{*** bundle_identifier ***}-EdsH-Q3L1jgEYnGIt8Obpw==/lib/arm64/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+4) (BuildId: 8ceca445f342b58f)
      #06 pc 0000000001069f64  /data/app/~~tj3lv7b-WWtkzM1sYJ1rVw==/{*** bundle_identifier ***}-EdsH-Q3L1jgEYnGIt8Obpw==/lib/arm64/libunity.so (Thread::RunThreadWrapper(void*)+1048) (BuildId: 8ceca445f342b58f)
      #07 pc 00000000000c226c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: dc4001c2ef2dfc23467040797a96840c)

上面的日志怎么看呢

  • 用android studio 看
  • 个人偶尔能看到日志,但经常被360占用 adb.exe
  • 日志调转来看的,就是从下往上
  • 也就是最下第一行 nativeRender -> 调用的: unityPlayerLoop(),你妹看错,是先render,才执行了unity 的loop 逻辑
  • 然后最上面第N行,就是崩溃的点,甚至还有行号,
  • 但是没有源码,不知道为什么崩溃
  • 应该只是调转了一下和OpenGLES3, Vulkun 估计batch 奔溃

  • Static Batching一直是勾选的

参考:

Unity引擎源码解析(伪) - 1 引擎初始化_failed to initialize il2cpp-CSDN博客

https://zhuanlan.zhihu.com/p/697337400

相关推荐
zdr尽职尽责10 小时前
UnityCli 兼容2022版本
ui·unity·ai·c#·游戏引擎
ellis19703 天前
Claude Code[二] 上下文相关的机制
unity·ai编程
zdr尽职尽责4 天前
Unity 3C 动画系统:从「蜘蛛网」到可维护的动画架构
unity·架构·游戏引擎
国家一级摸鱼选手4 天前
[Unity]几何碰撞检测:SAT 分离轴定理详解(从数学原理到 C# 实现)
unity·c#·游戏引擎·分离轴定理(sat)·多边形相交
2601_967987374 天前
程序员遇到BUG的解释
程序员·bug·软件开发·调试·幽默
暴走约伯6 天前
【VFX工具链源码拆解 09】终极工业化闭环:基于 ID 规则驱动的全自动场景建档、骨骼挂载与男转女场景迁移
unity·c#·游戏引擎·材质
寂寞的船7 天前
【Unity知识速递】第13期 Unity 内存泄漏排查实战:从 Memory Profiler 到 Lua 引用泄漏的生产级全链路诊断
unity·junit·c#·游戏引擎·lua
寂寞的船7 天前
【Unity Bug挑战】第12期 Awaitable 二次 await 死锁之谜 —— 为什么同一个异步操作等两次就卡死?
unity·c#·游戏引擎·bug
探求虚无9 天前
用 AI 在 Unity 里做一款 RTS:最难的不是生成代码,而是证明它真的能玩
人工智能·unity·游戏引擎