android / ndk

The Android Native Development Kit
1.97k stars 255 forks source link

Android builds with unity fail: "Library\Bee\artifacts\Android" #2031

Closed ivanovichgames closed 3 months ago

ivanovichgames commented 3 months ago

Description

Building Library\Bee\artifacts\Android\d8kzr\plv82q1vt1iu.o failed with output: PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script. Stack dump:

  1. Program arguments: "C:/Program Files/Unity/Hub/Editor/2022.3.28f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" -march=armv8-a -mbranch-protection=standard -DANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK -faddrsig -mllvm -hoist-common-insts=1 -DANDROID -DHAVE_INTTYPES_H -no-canonical-prefixes -funwind-tables -fstack-protector -fomit-frame-pointer -std=c++11 -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -g -Os -fPIC -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DTARGET_ARM64 -DIL2CPP_ENABLE_WRITE_BARRIERS=1 -DIL2CPP_INCREMENTAL_TIME_SLICE=3 -DHAVE_BDWGC_GC -DNDEBUG -I. -IC:/codigo/MotionSoccerQuest/Motion19/Library/Bee/artifacts/Android/il2cppOutput/cpp "-IC:/Program Files/Unity/Hub/Editor/2022.3.28f1/Editor/Data/il2cpp/libil2cpp/pch" "-IC:/Program Files/Unity/Hub/Editor/2022.3.28f1/Editor/Data/il2cpp/libil2cpp" "-IC:/Program Files/Unity/Hub/Editor/2022.3.28f1/Editor/Data/il2cpp/external/baselib/Include" "-IC:/Program Files/Unity/Hub/Editor/2022.3.28f1/Editor/Data/il2cpp/libil2cpp/os/ClassLibraryPAL/brotli/include" "-IC:/Program Files/Unity/Hub/Editor/2022.3.28f1/Editor/Data/il2cpp/external/baselib/Platforms/Android/Include" -o Library/Bee/artifacts/Android/d8kzr/plv82q1vt1iu.o -fcolor-diagnostics -fdiagnostics-absolute-paths -target aarch64-linux-android22 -fstrict-aliasing -fdiagnostics-format=msvc -c -x c++ C:/codigo/MotionSoccerQuest/Motion19/Library/Bee/artifacts/Android/il2cppOutput/cpp/Generics__123.cpp
  2. parser at end of file
  3. Per-module optimization passes
  4. Running pass 'CallGraph Pass Manager' on module 'C:/codigo/MotionSoccerQuest/Motion19/Library/Bee/artifacts/Android/il2cppOutput/cpp/Generics__123.cpp'.
  5. Running pass 'Loop Pass Manager' on function '@ReadOnlyCollection_1_System_Collections_ICollection_get_SyncRoot_mE2403F1271152A240384F722DBC2F51B2FE474F9_gshared'
  6. Running pass 'Induction Variable Simplification' on basic block '%29'

    0 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0xdab3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0xdacfec

    1 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x192245 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x185d73

    2 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x17aa10 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x185526

    3 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x18b72a C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1a6cdb

    4 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1a670a C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1a62c2

    5 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1a57f5 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1a43de

    6 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1a407b C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x42aa83

    7 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x427cb3 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x42dd89

    8 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1152331 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x23a748

    9 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0xeb78dc C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x23af72

    10 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x127d13b C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x15d8683

    11 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x2914b13 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1540374

    12 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x6c9da0 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x744473

    13 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x6482 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x4661

    14 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1354156 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x577d11

    15 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1353bf4 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x692424

    16 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x692809 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x6a5786

    17 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x3dcd C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x1395

    18 0x00007ff77532b3f6 C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe 0x14c8 (C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0xdab3f6)

    19 0x00007ff77532b3f6

    20 0x00007ff77532b3f6 (C:\Program Files\Unity\Hub\Editor\2022.3.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0xdab3f6)

    0x00007FF77532B3F6 (0x000000C7F2DFA348 0x000001CF00000000 0x000000C7F2DFA0A0 0x0000000000000002) 0x00007FF77532CFEC (0x000001CF56499A60 0x0000000000000008 0x000000C7F2DFA290 0x000000C7F2DFA290) 0x00007FF774712245 (0x000001CF55919700 0x00007FFC8FD4AFF1 0x000001CF559196F0 0x000001CF50040000) 0x00007FF774705D73 (0x0000002000000000 0x000001CF500D8F50 0x000000C7F2DFA940 0x000000C7F2DFA940) 0x00007FF7746FAA10 (0x000001CF56499F50 0x00000040746F77A2 0x000001CF538B7D80 0x000001CF54002108) 0x00007FF774705526 (0x000001CF56905DE0 0x00007FF774729114 0x000000C7F2DFAA40 0x0000002000000005) 0x00007FF77470B72A (0x000001CF5649A160 0x00007FF7746F77A2 0x000000C7F2DFAAB8 0x000000C7F2DFAAE8) 0x00007FF774726CDB (0x000000C7F2DFAB48 0x0000000100000008 0x000000C700000000 0x000001CF56499B40) 0x00007FF77472670A (0x000000C700000000 0x000000C7F2DFACE0 0xFFFFFFFFFFFFFFFF 0x000000C700000040) 0x00007FF7747262C2 (0x000001CF56499AC0 0x000001CF5648AB60 0x000001CF56499AC0 0x000001CF56499A60) 0x00007FF7747257F5 (0x000001CF56499AC0 0x000001CF5648AB60 0x000001CF56499AC0 0x000001CF56499A60) 0x00007FF7747243DE (0x000001CF56905DE0 0x000001CF5648AB60 0x000001CF56499A60 0x000001CF56FDD4A0) 0x00007FF77472407B (0x000001CF5648AB60 0x000001CF56E9CF20 0x000001CF5648AB60 0x000000C7F2DFAE78) 0x00007FF7749AAA83 (0x000001CF55C1D7F8 0x0000000000000072 0x000001CF56E9CB10 0x000001CF5683F190) 0x00007FF7749A7CB3 (0x0000000000000008 0x00007FF7000001CC 0x0000000000000000 0x0000000000000000) 0x00007FF7749ADD89 (0x0000000000000001 0x000001CF5013A4D0 0x000001CF500E0620 0x000001CF55C78C10) 0x00007FF7756D2331 (0x00007FF7788F7550 0x000000C7F2DFBD70 0x000001CF565FBE80 0x0000000000000000) 0x00007FF7747BA748 (0x000001CF4FF00000 0x000001CF00000000 0x0000000000000010 0x000001CF00000000) 0x00007FF7754378DC (0x0000001000000000 0x000001CF559A5908 0x000001CF559A5928 0x00007FFC8FD4C350) 0x00007FF7747BAF72 (0x0000000000000000 0x00007FF700000000 0x0000000000000000 0x000000C7F2DFBFD8) 0x00007FF7757FD13B (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FF775B58683 (0x000000C7F2DFD3D0 0x000000C7F2DFD3C0 0x000000C7F2DFD3A0 0x00007FF774C4798A) 0x00007FF776E94B13 (0x000001CF500DE0A0 0x0000000800000003 0x0000000900000000 0x000000020000000A) 0x00007FF775AC0374 (0x000001CF500DDFF0 0x0000042A00000429 0x000014DA0000042B 0x0000169F0000156C) 0x00007FF774C49DA0 (0x000001CF500D1C60 0x000000C700000000 0x000000C7F2DFDCF0 0x000001CF500993A0) 0x00007FF774CC4473 (0x0000000000000004 0x00007FF774CC9949 0x000000C7F2DFD8C8 0x00007FF774CC97AB) 0x00007FF774586482 (0x000001CF50040000 0x0000000000000002 0x00000000FFFFFFFF 0x00007FFC8FD14DF6) 0x00007FF774584661 (0x000000C7F2DFDE88 0x000001CF500D32F0 0x000000C7F2DFDE88 0x000001CF500D32F0) 0x00007FF7758D4156 (0x000001CF500D32F0 0x000001CF500D32F0 0x000001CF500D3BA0 0x00007FF774B49620) 0x00007FF774AF7D11 (0x000001CF50040000 0x000000C718001109 0x000001CF500D4A00 0x000001CF02000002) 0x00007FF7758D3BF4 (0x000001CF4FF002A4 0x0000000000000010 0x000001CF4FF00CC0 0x000000C7F2DFE3B9) 0x00007FF774C12424 (0x000001CF5009C8C1 0x000001CF500D3E00 0x0000000000000086 0x000001CF5004E650) 0x00007FF774C12809 (0x000001CF5006F430 0x000001CF5006F430 0x000000C7F2DFE470 0x000000C7F2DFE470) 0x00007FF774C25786 (0x000000C7F2DFE700 0x00007FFC00000000 0x0000000000000102 0x000001CF50040150) 0x00007FF774583DCD (0x0000000000000041 0x0000000000000000 0x00007FFC8E708650 0x0000000000000000) 0x00007FF774581395 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FF7745814C8 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000) 0x00007FFC8E70257D (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x1D bytes(s) 0x00007FFC8FD6AF28 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x28 bytes(s) clang++: error: clang frontend command failed due to signal (use -v to see invocation) Android (7714059, based on r416183c1) clang version 12.0.8 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee) Target: aarch64-unknown-linux-android22 Thread model: posix InstalledDir: C:/Program Files/Unity/Hub/Editor/2022.3.28f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin clang++: note: diagnostic msg:


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang++: note: diagnostic msg: C:\Users\Usuario\AppData\Local\Temp\Generics123-f4bcc4.cpp clang++: note: diagnostic msg: C:\Users\Usuario\AppData\Local\Temp\Generics123-f4bcc4.sh clang++: note: diagnostic msg:


UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) Generics__123-f4bcc4.zip Editor.log

Affected versions

r27

Canary version

No response

Host OS

Windows

Host OS version

Windows 11 Home

Affected ABIs

arm64-v8a

Build system

Other (specify below)

Other build system

Unity builds

minSdkVersion

Android 12 API level 31

Device API level

Android 12 API level 32

pirama-arumuga-nainar commented 3 months ago

From the reproducer:

Crash reproducer for Android (7714059, based on r416183c1) clang version 12.0.8 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)

This is from r23 and not r27. Re-open if this reproduces in r27.

That said, this issue doesn't reproduce with r23c (clang r416183c2) on Linux. If the crash is non-deterministic, it is likely due to memory contention in your machine.

rhaoio commented 3 months ago

@ivanovichgames did you manage to solve this issue? thanks!

ivanovichgames commented 3 months ago

Yes. To be honest, I'm not sure what I did to solve the problem. But it only happened on one computer and I reinstalled everything until the problem stopped appearing

rhaoio commented 3 months ago

Yes. To be honest, I'm not sure what I did to solve the problem. But it only happened on one computer and I reinstalled everything until the problem stopped appearing

Ah I see, thanks for responding! 👍

Krakenmeister commented 1 month ago

Yeah I get this build error ALL the time. It errors, it doesn't error, I have zero clue what's causing it. But it's frustrating as hell and if anyone finds a systematic reason / solution for it I'm all ears. I have confirmed that the exact same project will produce this error on one device and not on another.

hiraditya commented 1 month ago

Does it happen with r27? From the original bug report, it seems the crash was in a much older compiler.

rhaoio commented 1 month ago

I was encountering this on different compiler versions so I believe it is some strange system behaviour. Information on this error elsewhere seems a bit all over the place. Do people here use 13/14th gen Intel? DDR5 memory? I've seen reports for similar errors with these things mentioned last time I looked.

Krakenmeister commented 1 month ago

It just seems like a generic build error to me except the cause of the problem is obfuscated to the point I have no idea what's the actual issue

Or it's completely random and it drives me up the wall

If this helps at all: Processor 13th Gen Intel(R) Core(TM) i9-13900KF 3.00 GHz Installed RAM 64.0 GB (63.8 GB usable) System type 64-bit operating system, x64-based processor Pen and touch Pen support

PowZone commented 2 weeks ago

Same problem with Unity 2022.3.38f1 and 46f1. Even with new installs and even cleaning the library folder of the project :/