Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The application crashes when the app try to build UnityWidget. #884

Open
ChurikiTenna opened this issue Oct 3, 2023 · 0 comments
Open

Comments

@ChurikiTenna
Copy link

ChurikiTenna commented Oct 3, 2023

Describe the bug

App crashes when it try to show UnityWidget below.

UnityWidget(
            onUnityCreated: onUnityCreated,
            onUnityMessage: onUnityMessage,
            onUnitySceneLoaded: onUnitySceneLoaded,
            fullscreen: false,
            printSetupLog: false)

This has never happened before though.

Log:

...
[        ]       #133 pc 0000000000553530  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*,
std::__va_list)+112) (BuildId: 3cd43dfd934282c944e52afdac5120fb)
[        ]       #134 pc 00000000000c0ce8  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120) (BuildId:
adaff87eb38d1f1656cbc504539d7ceb)
[        ]       #135 pc 00000000000cd444  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&,
bool)+852) (BuildId: adaff87eb38d1f1656cbc504539d7ceb)
[        ]       #136 pc 0000000000002574  /system/bin/app_process64 (main+1300) (BuildId: 2b60f9748c99330a43e8a5f1f84b8bcc)
[        ]       #137 pc 0000000000084d70  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 223ef8d5f0fe5d949ebf7e38286d3677)
[ +106 ms] Service protocol connection closed.
[        ] Lost connection to device.
[        ] DevFS: Deleting filesystem on the device (file:///data/user/0/com.euphopia.ai_chara/code_cache/ai_charaTEXOSE/ai_chara/)
[ +253 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed

[   +2 ms] "flutter run" took 52,111ms.
[ +119 ms] ensureAnalyticsSent: 116ms
[        ] Running 1 shutdown hook
[   +9 ms] Shutdown hooks complete
[        ] exiting with code 0

To Reproduce

  1. Export Android (Release)
  2. change build.gradle -> BuildIl2Cpp to
def commandLineArgs = []
    commandLineArgs.add("--compile-cpp")
    commandLineArgs.add("--platform=Android")
    commandLineArgs.add("--architecture=" + architecture)
    commandLineArgs.add("--outputpath=" + workingDir + "/src/main/jniLibs/" + abi + "/libil2cpp.so")
    commandLineArgs.add("--libil2cpp-static")
    commandLineArgs.add("--baselib-directory=" + workingDir + "/src/main/jniStaticLibs/" + abi)
    commandLineArgs.add("--incremental-g-c-time-slice=3")
    commandLineArgs.add("--configuration=" + configuration)
    //commandLineArgs.add("--dotnetprofile=unityaot-linux")
    //commandLineArgs.add("--enable-debugger")
    //commandLineArgs.add("--profiler-report")
    //commandLineArgs.add("--profiler-output-file=" + workingDir + "/build/il2cpp_"+ abi + "_" + configuration + "/il2cpp_conv.traceevents")
    commandLineArgs.add("--print-command-line")
    commandLineArgs.add("--additional-include-directories=" + workingDir + "/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/include")
    commandLineArgs.add("--additional-include-directories=" + workingDir + "/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/include")
    commandLineArgs.add("--generatedcppdir=" + workingDir + "/src/main/Il2CppOutputProject/Source/il2cppOutput")
    commandLineArgs.add("--cachedirectory=" + workingDir + "/build/il2cpp_"+ abi + "_" + configuration + "/il2cpp_cache")
    commandLineArgs.add("--tool-chain-path=" + android.ndkDirectory)
    staticLibraries.eachWithIndex {fileName, i->
        commandLineArgs.add("--additional-libraries=" + workingDir + "/src/main/jniStaticLibs/" + abi + "/" + fileName)
    }
  1. flutter run

Expected behavior
Run the app

Unity (please complete the following information):

  • OS: Android
  • Version 2022.2

Smartphone (please complete the following information):

  • Device: Galaxy
@ChurikiTenna ChurikiTenna changed the title The application crashes immedi on android. The application crashes immediately after launch on android. Oct 3, 2023
@ChurikiTenna ChurikiTenna changed the title The application crashes immediately after launch on android. The application crashes when the app try to build UnityWidget. Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant