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

Closing unity screen and relaunching it crashes the app #46

Closed
TarekMedhat opened this issue Sep 11, 2019 · 46 comments
Closed

Closing unity screen and relaunching it crashes the app #46

TarekMedhat opened this issue Sep 11, 2019 · 46 comments
Assignees
Labels
android This issue is specific to the Android Platform. bug This issue refers to a bug in the plugin

Comments

@TarekMedhat
Copy link

The unity app run the first time i launch the screen, if I navigate back and reopen the app crashes.

steps: 1- opening unity screen and unity project is running fine.
2- navigate back, this exception is shown:
E/flutter ( 7701): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method dispose on channel unity_view_0) E/flutter ( 7701): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7) E/flutter ( 7701): <asynchronous suspension> E/flutter ( 7701): #1 UnityWidgetController._dispose (package:flutter_unity_widget/flutter_unity_widget.dart:55:19) E/flutter ( 7701): <asynchronous suspension> E/flutter ( 7701): #2 _UnityWidgetState.dispose (package:flutter_unity_widget/flutter_unity_widget.dart:103:19) E/flutter ( 7701): #3 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4107:12) E/flutter ( 7701): #4 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1737:13) E/flutter ( 7701): #5 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #6 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #7 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #8 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #9 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #10 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #11 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #12 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5181:16) E/flutter ( 7701): #13 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #14 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #15 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #16 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #17 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #18 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #19 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #20 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #21 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #22 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #23 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #24 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5080:14) E/flutter ( 7701): #25 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #26 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #27 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #28 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #29 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #30 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5080:14) E/flutter ( 7701): #31 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #32 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #33 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #34 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #35 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #36 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3955:14) E/flutter ( 7701): #37 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1733:13) E/flutter ( 7701): #38 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1735:7) E/flutter ( 7701): #39 ComponentElement.visitChildren

3- reopen the screen again the app crashes with the following error

E/zygote64( 7701): No implementation found for void com.unity3d.player.UnityPlayer.nativeRestartActivityIndicator() (tried Java_com_unity3d_player_UnityPlayer_nativeRestartActivityIndicator and Java_com_unity3d_player_UnityPlayer_nativeRestartActivityIndicator__) E/flutter ( 7701): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(40)] java.lang.UnsatisfiedLinkError: No implementation found for void com.unity3d.player.UnityPlayer.nativeRestartActivityIndicator() (tried Java_com_unity3d_player_UnityPlayer_nativeRestartActivityIndicator and Java_com_unity3d_player_UnityPlayer_nativeRestartActivityIndicator__) E/flutter ( 7701): at com.unity3d.player.UnityPlayer.nativeRestartActivityIndicator(Native Method) E/flutter ( 7701): at com.unity3d.player.UnityPlayer.resume(Unknown Source:27) E/flutter ( 7701): at com.rexraphael.flutterunitywidget.UnityUtils.addUnityViewToGroup(UnityUtils.java:141) E/flutter ( 7701): at com.rexraphael.flutterunitywidget.UnityView.setUnityPlayer(UnityView.java:21) E/flutter ( 7701): at com.rexraphael.flutterunitywidget.FlutterUnityView.getUnityView(FlutterUnityView.java:101) E/flutter ( 7701): at com.rexraphael.flutterunitywidget.FlutterUnityView.<init>(FlutterUnityView.java:30) E/flutter ( 7701): at com.rexraphael.flutterunitywidget.FlutterUnityViewFactory.create(FlutterUnityViewFactory.java:34) E/flutter ( 7701): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:154) E/flutter ( 7701): at android.app.Dialog.dispatchOnCreate(Dialog.java:403) E/flutter ( 7701): at android.app.Dialog.show(Dialog.java:302) E/flutter ( 7701): at android.app.Presentation.show(Presentation.java:249) E/flutter ( 7701): at io.flutter.plugin.platform.VirtualDisplayController.<init>(VirtualDisplayController.java:92) E/flutter ( 7701): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:52) E/flutter ( 7701): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:97) E/flutter ( 7701): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:87) E/flutter ( 7701): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:51) E/flutter ( 7701): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222) E/flutter ( 7701): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96) E/flutter ( 7701): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:643) E/flutter ( 7701): at android.os.MessageQueue.nativePollOnce(Native Method) E/flutter ( 7701): at android.os.MessageQueue.next(MessageQueue.java:331) E/flutter ( 7701): at android.os.Looper.loop(Looper.java:147) E/flutter ( 7701): at android.app.ActivityThread.main(ActivityThread.java:6699) E/flutter ( 7701): at java.lang.reflect.Method.invoke(Native Method) E/flutter ( 7701): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:246) E/flutter ( 7701): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) E/flutter ( 7701): F/flutter ( 7701): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(77)] Check failed: CheckException(env). Lost connection to device.

how can successfully handle disposing and launching unity?

@TarekMedhat TarekMedhat changed the title Close unity screen and reopen crashes the app Closing unity screen and relaunching it crashes the app Sep 11, 2019
@TarekMedhat
Copy link
Author

All I could do for now is to prevent the unity player from quitting on disposing by removing UnityUtils.getPlayer().quit(); from the library dispose method in android.
So that the game will keep running on background even if the screen is disposed, relaunching the screen will resume the game on the last state.
flutter-unity-view-widget/android/src/FlutterUnityView
@Override public void dispose() { if (UnityUtils.isUnityReady()) { // UnityUtils.getPlayer().quit(); } }

@juicycleff
Copy link
Owner

@TarekMedhat looking into it

@thomas-stockx thomas-stockx added android This issue is specific to the Android Platform. bug This issue refers to a bug in the plugin labels Oct 17, 2019
@thomas-stockx
Copy link
Collaborator

I think your logs are a red herring, as it points towards this: https://stackoverflow.com/questions/51959096/no-implementation-found-for-void-com-unity3d-player-unityplayer-nativerestartact

Are you sure you're using the unity-classes.jar that is exported by your Unity version?

@juicycleff
Copy link
Owner

I think I saw similar bug, I'm looking into it

@PiotrxKolasinski
Copy link

PiotrxKolasinski commented Oct 29, 2019

I've got similar problem, but i got another error:
2 screens:
Screen A - Flutter layout with button to open unity screen
Screen B - Unity Screen

steps:

  1. Open App (Screen A)
  2. Click Button to Open Screen B
  3. Click on android back button or appbar back button
  4. It return to Screen A. After less than 1 second application crashes. An error appears:
D/ViewRootImpl@505ef30[MainActivity](28785): ViewPostIme pointer 0
D/ViewRootImpl@505ef30[MainActivity](28785): ViewPostIme pointer 1
D/SurfaceView(28785): onWindowVisibilityChanged(8) false 9b721de of ViewRootImpl@2df8eb6[MainActivity]
D/SurfaceView(28785): BG show() Surface(name=Background for - SurfaceView - Sys2037:com.rexraphael.flutterunitywidgetexample/com.rexraphael.flutterunitywidgetexample.MainActivity@9b721de@0) android.view.SurfaceView{9b721de VFE...... ........ 0,0-1176,1776}
D/SurfaceView(28785): surfaceDestroyed 1 #2 android.view.SurfaceView{9b721de VFE...... ........ 0,0-1176,1776}
E/Surface (28785): dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -19
D/SurfaceView(28785): BG destroy() Surface(name=Background for - SurfaceView - Sys2037:com.rexraphael.flutterunitywidgetexample/com.rexraphael.flutterunitywidgetexample.MainActivity@9b721de@0) android.view.SurfaceView{9b721de VFE...... ........ 0,0-1176,1776}
D/OpenGLRenderer(28785): eglDestroySurface = 0xc2df1170, 0xc2cfa000
D/ViewRootImpl@2df8eb6[MainActivity](28785): dispatchDetachedFromWindow
D/InputEventReceiver(28785): channel '910dfce Sys2037:com.rexraphael.flutterunitywidgetexample/com.rexraphael.flutterunitywidgetexample.MainActivity (client)' ~ Disposing input event receiver.
D/InputEventReceiver(28785): channel '910dfce Sys2037:com.rexraphael.flutterunitywidgetexample/com.rexraphael.flutterunitywidgetexample.MainActivity (client)' ~NativeInputEventReceiver.
D/InputTransport(28785): Input channel destroyed: fd=105
D/AudioTrack(28785): stop() called with 599040 frames delivered
I/Process (28785): Sending signal. PID: 28785 SIG: 9
Lost connection to device.

@thomas-stockx
Copy link
Collaborator

Seems like UnityPlayer.quit() also kills the app it's running in.

We might need to take a look at the newest version of Unity as a Library (https://forum.unity.com/threads/integration-unity-as-a-library-in-native-android-app-version-2.751712/) which added a UnityPlayer.unload() method to address this exact issue.

@PiotrxKolasinski
Copy link

I reviewed this error and the problem is the onDestroy() method of the UnityPlayer class. And exactly this piece of code:

  if (this.mProcessKillRequested) {
            if (this.m_UnityPlayerLifecycleEvents != null) {
                this.m_UnityPlayerLifecycleEvents.onUnityPlayerQuitted();
            } else {
                this.onUnityPlayerQuitted();
            }

            Process.killProcess(Process.myPid());
        }

To solve this problem, you need to create MainUnityActivity in a separate process :) Then the .quit() method will only kill this process.

How can you try to fix it:
First way: In your example (https://forum.unity.com/threads/integration-unity-as-a-library-in-native-android-app-version-2.751712/) In AndroidManifest.xml file They add, for MainUnityActivity class, attribute android:process=":Unity" .
https://stackoverflow.com/questions/7142921/usage-of-androidprocess
Second way: https://medium.com/flutter/executing-dart-in-the-background-with-flutter-plugins-and-geofencing-2b3e40a1a124
Third way: https://developer.squareup.com/blog/flutter-android-and-process-death/

Maybe something of this will be helpful :)

@RomanTechnologies
Copy link

Hi, Just wondering if you will be merging a solution for this into the plugin in the near future?

@RomanTechnologies
Copy link

RomanTechnologies commented Nov 24, 2019

I have tried changing UnityUtils.getPlayer().quit to unload() instead and it stops the the activity from being disposed, however I get a black screen when launching the widget again, so I assume more needs to be handled as what I did only handles one part.

Would you know what else I would need to do to clear up the widget to be able to use it again in a clean fashion?

Thanks

@assemmarwan
Copy link

@RomanTechnologies Yeah, same here.
Right now I have forked the project and commented out UnityUtils.getPlayer().quit() to stop the crashing. But this has the side-effect of leaving all the objects still active in the scene (which can be handled manually through messages)

After reading about it, I have also attempted to add the below in the manifest, but no luck :(

        <activity
            android:name=".UnityPlayerActivity"
            android:launchMode="singleTask"
            android:process=":unityplayer123" />

I can't tell if this is an issue with the Unity's android library or the plugin's? Or both 🙃

@RomanTechnologies
Copy link

@assemmarwan Yeah I have done the same, so when disposing of the widget it doesnt close the activity. This is all due to the library needing to update the .quit() method to unload() as unity added this specifically due to the issues on android. I have done that but it needs more work so I will wait until the authors have a clean solution merged in.

@thomas-stockx
Copy link
Collaborator

Hi, feel free to experiment or create a pull request.

I've tried switching to .unload() instead of .quit(), but saw similar issues (black screen, seemingly not properly re-instantiating the Unity app).
Please do keep in mind that Unity as a Library is still in beta and not properly supported by Unity, so there might not even be a solution for it just yet.

Even so, your solution might be more clean than mine (if I ever come up with one), so we're always open for pull requests!

@RomanTechnologies
Copy link

@thomas-stockx Thanks for getting back to us. Great, if I ever figure out a solution I will open a pull request.

@klydra
Copy link

klydra commented Dec 8, 2019

Hi, is there a solution yet? I actually never encountered this issue, till I needed to reinstall windows, and suddenly, it would crash after changing screens through a BottomNavBar... I tried to recreate the old state (manually redownloading old versions, ...), but can't get it to work anymore.

Log :

I/chatty ( 5557): uid=10183(<application_id>) AudioTrack identical 7 lines
V/AudioTrack( 5557): obtainBuffer(192) returned 192 = 192 + 0 err 0
E/Surface ( 5557): dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -19
I/Adreno ( 5557): DequeueBuffer: dequeueBuffer failed
V/AudioTrack( 5557): obtainBuffer(192) returned 192 = 192 + 0 err 0
I/chatty ( 5557): uid=10183(<application_id>) AudioTrack identical 3 lines
V/AudioTrack( 5557): obtainBuffer(192) returned 192 = 192 + 0 err 0
V/AudioTrack( 5557): obtainBuffer(192) returned 192 = 192 + 0 err 0
I/chatty ( 5557): uid=10183(<application_id>) identical 1 line
V/AudioTrack( 5557): obtainBuffer(192) returned 192 = 192 + 0 err 0
D/ ( 5557): PlayerBase::stop() from IPlayer
D/AudioTrack( 5557): stop() called with 13512000 frames delivered
V/AudioTrack( 5557): obtainBuffer(192) returned 0 = 0 + 0 err -4
V/AudioTrack( 5557): ~AudioTrack, releasing session id 19473 from 5557 on behalf of 5557
I/Process ( 5557): Sending signal. PID: 5557 SIG: 9
Lost connection to device.
Exited (sigterm)

The errors are not new BTW.
Thanks for any reply!

EDIT :

D/ ( 5557): PlayerBase::stop() from IPlayer
D/AudioTrack( 5557): stop() called with 13512000 frames delivered

indicates the unity window pausing, at least for me.
Errors are always repeating every second, stopping when paused.

@Jairolaya12x
Copy link

Any update for this?

@Darkmax
Copy link

Darkmax commented Mar 6, 2020

Also I'm looking any info about this, how to close the unity app safely without crashing the app

@phamtuongvan
Copy link

I've got similar problem, but i got another error:
2 screens:
Screen A - Flutter layout with button to open unity screen
Screen B - Unity Screen

steps:

  1. Open App (Screen A)
  2. Click Button to Open Screen B
  3. Click on android back button or appbar back button
  4. It return to Screen A. After less than 1 second application crashes. An error appears:

I'm also have the same problem as you

@Darkmax
Copy link

Darkmax commented Mar 29, 2020

I'm having trouble when changing from screen and open again the unity screen it crash.

Any idea on how to solve this on android?

@assemmarwan
Copy link

@Darkmax Temporarily you can try the below until a root solution/fix is implemented.

@RomanTechnologies Yeah, same here.
Right now I have forked the project and commented out UnityUtils.getPlayer().quit() to stop the crashing. But this has the side-effect of leaving all the objects still active in the scene (which can be handled manually through messages)

After reading about it, I have also attempted to add the below in the manifest, but no luck :(

        <activity
            android:name=".UnityPlayerActivity"
            android:launchMode="singleTask"
            android:process=":unityplayer123" />

I can't tell if this is an issue with the Unity's android library or the plugin's? Or both 🙃

@Darkmax
Copy link

Darkmax commented Mar 29, 2020

@Darkmax Temporarily you can try the below until a root solution/fix is implemented.

@RomanTechnologies Yeah, same here.
Right now I have forked the project and commented out UnityUtils.getPlayer().quit() to stop the crashing. But this has the side-effect of leaving all the objects still active in the scene (which can be handled manually through messages)
After reading about it, I have also attempted to add the below in the manifest, but no luck :(

        <activity
            android:name=".UnityPlayerActivity"
            android:launchMode="singleTask"
            android:process=":unityplayer123" />

I can't tell if this is an issue with the Unity's android library or the plugin's? Or both 🙃

@assemmarwan
I tried to implement your fix and comment out the UnityUtils.getPlayer.quit() but on my own project I don't have that file where on the main is (FlutterUnityView.java), how can I modified that on my own project?, do I need to download something and recompile the plugin?, if yes would you be kindly to guide me on this? Sorry for this, but I tried already wihout succes several times and still don't know how to solve it

@Darkmax
Copy link

Darkmax commented Mar 29, 2020

@Darkmax Temporarily you can try the below until a root solution/fix is implemented.

@RomanTechnologies Yeah, same here.
Right now I have forked the project and commented out UnityUtils.getPlayer().quit() to stop the crashing. But this has the side-effect of leaving all the objects still active in the scene (which can be handled manually through messages)
After reading about it, I have also attempted to add the below in the manifest, but no luck :(

        <activity
            android:name=".UnityPlayerActivity"
            android:launchMode="singleTask"
            android:process=":unityplayer123" />

I can't tell if this is an issue with the Unity's android library or the plugin's? Or both 🙃

@assemmarwan
I tried to implement your fix and comment out the UnityUtils.getPlayer.quit() but on my own project I don't have that file where on the main is (FlutterUnityView.java), how can I modified that on my own project?, do I need to download something and recompile the plugin?, if yes would you be kindly to guide me on this? Sorry for this, but I tried already wihout succes several times and still don't know how to solve it

Ok I resolve my own issue, I just have to modified the yaml to point to the modified plugin that I download from @assemmarwan , I hope soon someone fix this problem. but for now this resolve the issue like @assemmarwan said, one can handle this kind of things via messages.

thanks

@Jairolaya12x
Copy link

Hi, I remember that use the same solution:
[Remove the Quit(), and call the scene with new data o change the data with some function from flutter]
I don't shared the experience because later I had a error with the AR flag in the widget, (Sorry for this 😥 , this may have been useful for your projects)

In my app the user should be can change between 3D and AR view.

Problem 1:
If change the data of the widget isARScene: {value}, to other value the app close, maybe for the same problem with the quit, but thinking again, a possible solution is only send the data to unity and disable or enable the AR camera with the 3D camera and don't change the isARScene: {value} [always set to true, because if the isARScene is false the camera don't start, ]

Problem 2:
In some cases with change to other app and re open the app from the background with application manager the app, closes
[Only in android, in iOS i don't remember if works perfect]

I'll retake the project with the possible solution for problem 1 and share the result of the test.

Regards! 🤘🏻

@maxbhoria
Copy link

@Darkmax Temporarily you can try the below until a root solution/fix is implemented.

@RomanTechnologies Yeah, same here.
Right now I have forked the project and commented out UnityUtils.getPlayer().quit() to stop the crashing. But this has the side-effect of leaving all the objects still active in the scene (which can be handled manually through messages)
After reading about it, I have also attempted to add the below in the manifest, but no luck :(

        <activity
            android:name=".UnityPlayerActivity"
            android:launchMode="singleTask"
            android:process=":unityplayer123" />

I can't tell if this is an issue with the Unity's android library or the plugin's? Or both 🙃

@assemmarwan
I tried to implement your fix and comment out the UnityUtils.getPlayer.quit() but on my own project I don't have that file where on the main is (FlutterUnityView.java), how can I modified that on my own project?, do I need to download something and recompile the plugin?, if yes would you be kindly to guide me on this? Sorry for this, but I tried already wihout succes several times and still don't know how to solve it

Ok I resolve my own issue, I just have to modified the yaml to point to the modified plugin that I download from @assemmarwan , I hope soon someone fix this problem. but for now this resolve the issue like @assemmarwan said, one can handle this kind of things via messages.

thanks

I tried your way but it did not worked. can you share me you code base?

@TarekMedhat
Copy link
Author

TarekMedhat commented Jun 7, 2020

I tried your way but it did not worked. can you share me you code base?

  • From Android studio navigate to -> External Libraries -> Flutter Plugins -> flutter_unity_widget plugin -> android/src/main/java/com/rexraphael/flutterunitywidget/FlutterUnityView
    comment UnityUtils.getPlayer().quit(); in the dispose method
    @Override
    public void dispose() {
        if (UnityUtils.isUnityReady()) {
            // UnityUtils.getPlayer().quit();
        }
    }

but as mentioned doing that keeps all the objects active in the scene (which can be handled manually through messages)

@maxbhoria
Copy link

I tried your way but it did not worked. can you share me you code base?

  • From Android studio navigate to -> External Libraries -> Flutter Plugins -> flutter_unity_widget plugin -> android/src/main/java/com/rexraphael/flutterunitywidget/FlutterUnityView
    comment UnityUtils.getPlayer().quit(); in the dispose method
    @Override
    public void dispose() {
        if (UnityUtils.isUnityReady()) {
            // UnityUtils.getPlayer().quit();
        }
    }

but as mentioned doing that keeps all the objects active in the scene (which can be handled manually through messages)

Thanks for the solution app stop quitting but i am getting some null method exception how to handle that can you explain that

@TarekMedhat
Copy link
Author

Thanks for the solution app stop quitting but i am getting some null method exception how to handle that can you explain that

if you are talking about [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method dispose on channel unity_view_0)
Don't worry it's not an issue, there is no implementation for this method in the plugin but it's sent through the method channel, so just basically ignore it

@slimmziy
Copy link

Hi, feel free to experiment or create a pull request.
I've tried switching to .unload() instead of .quit(), but saw similar issues (black screen, seemingly not properly re-instantiating the Unity app).
Please do keep in mind that Unity as a Library is still in beta and not properly supported by Unity, so there might not even be a solution for it just yet.
Even so, your solution might be more clean than mine (if I ever come up with one), so we're always open for pull requests!

It seems we have two options for navigating off and back onto a widget with Unity view.

  1. Unity never quits running in the background and maintains state or crashes on re-entry
  2. Black screen on re-entry (I'm actually achieving this scenario by running Application.Quit(); from Unity prior to popping out of the widget.

Anybody find a way to fix this yet? @assemmarwan @Darkmax @RomanTechnologies @Jairolaya12x

What I'm doing is the first thing, keep running the unity app on the background.
How I achieve it on Android is downloading the repository, locally on my computer. Then modified the file

flutter-unity-view-widget\android\src\main\java\com\rexraphael\flutterunitywidget\FlutterUnityView.java

and comment the line UnityUtils.getPlayer().quit() and save it.
Then on pubspec.yaml I comment the one that is referencing to the online and use the one that is locally on my computer, like this:
#flutter_unity_widget: ^0.1.6+8 flutter_unity_widget: path: ./plugin_flutter_unity/flutter-unity-view-widget/
I hope this guide you on how to solve this issue for android.

But does your scene unload, or does it stay open and maintain state?

This one fix the problem for me, just to mention :),

thanks Mate
SLim

@MugOfPaul
Copy link

I would love to see this fix merged in... along with many others. I'm drowning in monkey patches over here. 🙈

@sinano1107
Copy link

sinano1107 commented Jul 8, 2020

On iOS.
controller.resume() in onUnityCreated(). Do not execute.
・Execute controller.resume() in dispose().
Doing these things will solve the problem.

I don't know the inner workings of it, so this seems very strange to me.

MugOfPaul added a commit to EtribeInc/flutter-unity-view-widget that referenced this issue Jul 16, 2020
• iOS - input not working due to bad initialization order juicycleff#138 (comment)
• Android - Bad minimum and target SDK values
• Android - Crash when calling quit() on Unity Library juicycleff#46 (comment)
• Android - CallStatic to get unity messaging working juicycleff#142
@chatorn-ketsom
Copy link

chatorn-ketsom commented Sep 15, 2020

My workaround was similar to that of you guys.

Mine(in my forked version of this repo) is as follows:

  1. In android/src/main/java/com/rexraphael/flutterunitywidget/FlutterUnityView.java
    1.1 In dispose method, I commented out UnityUtils.getPlayer().quit() and added UnityUtils.pause() instead:
    @Override
    public void dispose() {
        if (UnityUtils.isUnityReady()) {
            // UnityUtils.getPlayer().quit();
            UnityUtils.pause();
        }
    }

1.2 In onMethodCall method for case "createUnity", I added the following statement in onReady callback :

      if(UnityUtils.isUnityPaused()){
          UnityUtils.resume();
      }

as shown below:

        ...
        case "createUnity":
                String isAR;
                isAR = methodCall.argument("isAR");

                if (isAR != null) {
                    UnityUtils.isAR = true;
                }

                UnityUtils.createPlayer(registrar.activity(), new UnityUtils.CreateCallback() {
                    @Override
                    public void onReady() {
                        result.success(true);

                        if(UnityUtils.isUnityPaused()){
                            UnityUtils.resume();
                        }
                    }
                });

                break;
           ...
  1. In my own flutter project using UnityWidget, I posted a message to call my implemented Restart method in Unity so that all the already tracked images (AR!) will be cleared:
      ...
      SomeWidget(
            child: UnityWidget(
               isARScene: true,
               onUnityViewCreated: _onUnityCreated,
             ),
      )
      ...
      void _onUnityCreated(controller) async {
          this._unityWidgetController = controller;

          // Here
          final bool isReady = await this._unityWidgetController.isReady();
          if (isReady) {
            this
                ._unityWidgetController
                .postMessage("myObject", "Restart", "");
          }
       }

It seemed working fine. I was able to exit Unity player by pressing back button and load it back again without my flutter app being crashed or terminated after exiting Unity.
However, I'm still facing an AR related problem showing black screen which, I know, is not related to this issue. 😄
Cheers!

@juicycleff
Copy link
Owner

New 2.0.0 release fixes this issue :)

@heshamerfan97
Copy link

heshamerfan97 commented Feb 23, 2021

The above issue is still shown in the new flutter_unity_widget: ^3.0.3
And the above workaround of commenting UnityUtils.getPlayer().quit(); is not available anymore because the file "FlutterUnityView.java" is not there anymore and replaced by a lot of other java files
I also tried commenting the lines in the new quitPlayer method in android/src/main/java/com/xraph/plugins/flutterunitywidget/UnityUtils.java to be as following

public static void quitPlayer() {
        try {
            if (unityPlayer != null) {
                //unityPlayer.quit();
                //_isUnityLoaded = false;
                //_isUnityReady = false;
                //unityPlayer = null;
            }
        } catch (Error e) {
            Log.e(LOG_TAG, e.getMessage());
        }
    }

and in
android/src/main/java/com/xraph/plugins/flutterunitywidget/UnityView.java to be as following

public void quitPlayer() {
    try {
      if (unityPlayer != null) {
        //unityPlayer.quit();
        //setUnityLoaded(false);
        //setUnityReady(false);
        //unityPlayer = null;
      }
    } catch (Error e) {
      Log.e(LOG_TAG, e.getMessage());
    }
  }

But this also didn't work and the app still crashes at reopening the screen with UnityWidget in it.

@IoanaAlexandru
Copy link

This issue was closed long ago, yet many people still have the problem and it was not re-opened. I have the same issue with version 4.1.0 of the package, can we have a fix or an update please?

My logs
I/flutter (17704): *********************************************
I/flutter (17704): ** flutter unity controller setup complete **
I/flutter (17704): *********************************************
I/OpenGLRenderer(17704): Davey! duration=740ms; Flags=1, IntendedVsync=30655579636666, Vsync=30656301858881, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=30656308037216, AnimationStart=30656308041747, PerformTraversalsStart=30656308291799, DrawStart=30656315624143, SyncQueued=30656315924404, SyncStart=30656317843675, IssueDrawCommandsStart=30656317946644, SwapBuffers=30656319032321, FrameCompleted=30656321765915, DequeueBufferDuration=335000, QueueBufferDuration=2162500, GpuCompleted=0, 
W/Gralloc4(17704): allocator 3.x is not supported
I/Unity   (17704): MemoryManager: Using 'Dynamic Heap' Allocator.
W/.acs_upb_mobil(17704): Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V (greylist, reflection, allowed)
I/Unity   (17704): SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 5465mb
I/Unity   (17704): 
I/Unity   (17704): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
I/Unity   (17704): 
I/Unity   (17704): ApplicationInfo ro.pub.acs.acs_upb_mobile version 1.2.11 build 3c4f97ae-36cc-4737-b427-c00da0520ccc
I/Unity   (17704): 
I/Unity   (17704): Built from '2020.3/staging' branch, Version '2020.3.6f1 (338bb68529b2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
I/Unity   (17704): 
E/libprocessgroup(17704): set_timerslack_ns write failed: Operation not permitted
I/chatty  (17704): uid=10590(ro.pub.acs.acs_upb_mobile) UnityMain identical 14 lines
E/libprocessgroup(17704): set_timerslack_ns write failed: Operation not permitted
I/Unity   (17704): Company Name: StudentHub
I/Unity   (17704): Product Name: UPBMap3D
D/vulkan  (17704): searching for layers in '/data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64'
D/vulkan  (17704): searching for layers in '/data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/base.apk!/lib/arm64-v8a'
I/AdrenoVK-0(17704): ===== BEGIN DUMP OF OVERRIDDEN SETTINGS =====
I/AdrenoVK-0(17704): ===== END DUMP OF OVERRIDDEN SETTINGS =====
I/AdrenoVK-0(17704): QUALCOMM build          : 85da404, I46ff5fc46f
I/AdrenoVK-0(17704): Build Date              : 11/30/20
I/AdrenoVK-0(17704): Shader Compiler Version : EV031.31.04.01
I/AdrenoVK-0(17704): Local Branch            : promo490_3_Google
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Reconstruct Branch      : 
I/AdrenoVK-0(17704): Build Config            : S P 10.0.4 AArch64
I/AdrenoVK-0(17704): Driver Path             : /vendor/lib64/hw/vulkan.adreno.so
I/AdrenoVK-0(17704): QUALCOMM build          : 85da404, I46ff5fc46f
I/AdrenoVK-0(17704): Build Date              : 11/30/20
I/AdrenoVK-0(17704): Shader Compiler Version : EV031.31.04.01
I/AdrenoVK-0(17704): Local Branch            : promo490_3_Google
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Reconstruct Branch      : 
I/AdrenoVK-0(17704): Build Config            : S P 10.0.4 AArch64
I/AdrenoVK-0(17704): Driver Path             : /vendor/lib64/hw/vulkan.adreno.so
V/MediaRouter(17704): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
D/.acs_upb_mobil(17704): PlayerBase::PlayerBase()
D/.acs_upb_mobil(17704): TrackPlayerBase::TrackPlayerBase()
I/libOpenSLES(17704): Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
W/AudioTrack(17704): set(): notificationFrames=-42 clamped to the range -1 to -8
I/AudioTrack(17704): createTrack_l(1): AUDIO_OUTPUT_FLAG_FAST successful; frameCount 0 -> 768
V/MediaRouter(17704): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
I/IL2CPP  (17704): Locale en-GB
D/CompatibilityChangeReporter(17704): Compat change id reported: 147600208; UID 10590; state: ENABLED
W/Unity   (17704): AndroidJNIHelper.GetSignature: using Byte parameters is obsolete, use SByte parameters instead
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetSignature(Object)
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetSignature(Object)
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetSignature(Object[])
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetMethodID(IntPtr, String, Object[], Boolean)
W/Unity   (17704): UnityEngine.AndroidJavaObject:_Call(String, Object[])
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:GetAndroidCertificateFingerprint()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:Init()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:get_PlatformRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.ProtoTileProducer:GetRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.<PerformHttpTileRequest>c__Iterator0:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): Google.Maps.TileLoading.<CreateMapTileAndFillSvt>c__Iterator1:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): 
W/Unity   (17704): AndroidJNIHelper: converting from Byte array is obsolete, use SByte array instead
W/Unity   (17704): UnityEngine._AndroidJNIHelper:ConvertFromJNIArray(IntPtr)
W/Unity   (17704): UnityEngine.AndroidJavaObject:_Call(String, Object[])
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:GetAndroidCertificateFingerprint()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:Init()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:get_PlatformRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.ProtoTileProducer:GetRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.<PerformHttpTileRequest>c__Iterator0:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): Google.Maps.TileLoading.<CreateMapTileAndFillSvt>c__Iterator1:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): 
V/MediaRouter(17704): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
W/System  (17704): A resource failed to call release. 
W/System  (17704): A resource failed to call release. 
E/Surface (17704): dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -19
E/vulkan  (17704): dequeueBuffer failed: No such device (-19)
E/vulkan  (17704): dequeueBuffer[2] failed: No such device (-19)
E/CRASH   (17704): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/CRASH   (17704): Version '2020.3.6f1 (338bb68529b2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E/CRASH   (17704): Build fingerprint: 'google/flame/flame:11/RQ3A.210605.005/7349499:user/release-keys'
E/CRASH   (17704): Revision: 'MP1.0'
E/CRASH   (17704): ABI: 'arm64'
E/CRASH   (17704): Timestamp: 2021-06-18 17:29:06+0300
E/CRASH   (17704): pid: 17704, tid: 17848, name: UnityGfxDeviceW  >>> ro.pub.acs.acs_upb_mobile <<<
E/CRASH   (17704): uid: 10590
E/CRASH   (17704): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
E/CRASH   (17704): Cause: null pointer dereference
E/CRASH   (17704):     x0  0000000000000001  x1  0000000000000000  x2  0000007432a3b65c  x3  0000000000000000
E/CRASH   (17704):     x4  0000007874260aac  x5  0000000000000000  x6  0000007432b6d0f0  x7  0000000500b00000
E/CRASH   (17704):     x8  00000078744f0460  x9  5d870fa21d2a0a52  x10 0000000000000005  x11 0000000000000670
E/CRASH   (17704):     x12 0000000000000000  x13 0000000000004fd1  x14 0000000000000005  x15 0000007432be7c20
E/CRASH   (17704):     x16 00000078744ef350  x17 000000787386b618  x18 0000000000000003  x19 0000007432a3b65c
E/CRASH   (17704):     x20 0000000000000000  x21 0000085e00000437  x22 0000000000000000  x23 0000000000000000
E/CRASH   (17704):     x24 0000000000000000  x25 0000000000000000  x26 0000000000000000  x27 0000000000000003
E/CRASH   (17704):     x28 000000742000018c  x29 0000007432a3b5b0
E/CRASH   (17704):     sp  0000007432a3b5b0  lr  0000007874260acc  pc  0000007874260ad0
E/CRASH   (17704): backtrace:
E/CRASH   (17704):       #00 pc 0000000000020ad0  /system/lib64/libvulkan.so (BuildId: bfe0d26c892b38ffca636158d720e91d)
E/CRASH   (17704):       #01 pc 000000000038c198  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #02 pc 000000000038c958  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #03 pc 000000000038ce78  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #04 pc 000000000038cc40  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #05 pc 000000000036b390  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #06 pc 000000000038c0f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #07 pc 000000000036c418  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #08 pc 000000000037c8f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #09 pc 000000000035f710  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #10 pc 000000000035af04  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #11 pc 00000000006affcc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #12 pc 00000000006b3cac  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #13 pc 00000000006abbfc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #14 pc 00000000002583a0  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #15 pc 00000000000afd4c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
E/CRASH   (17704):       #16 pc 0000000000050288  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
I/flutter (17704): *********************************************
I/flutter (17704): ** flutter unity controller setup complete **
I/flutter (17704): *********************************************
E/CRASH   (17704): other thread is trapped; signum = 11
E/AndroidRuntime(17704): FATAL EXCEPTION: UnityMain
E/AndroidRuntime(17704): Process: ro.pub.acs.acs_upb_mobile, PID: 17704
E/AndroidRuntime(17704): java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/AndroidRuntime(17704): Version '2020.3.6f1 (338bb68529b2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E/AndroidRuntime(17704): Build fingerprint: 'google/flame/flame:11/RQ3A.210605.005/7349499:user/release-keys'
E/AndroidRuntime(17704): Revision: 'MP1.0'
E/AndroidRuntime(17704): ABI: 'arm64'
E/AndroidRuntime(17704): Timestamp: 2021-06-18 17:29:06+0300
E/AndroidRuntime(17704): pid: 17704, tid: 17848, name: UnityGfxDeviceW  >>> ro.pub.acs.acs_upb_mobile <<<
E/AndroidRuntime(17704): uid: 10590
E/AndroidRuntime(17704): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
E/AndroidRuntime(17704): Cause: null pointer dereference
E/AndroidRuntime(17704):     x0  0000000000000001  x1  0000000000000000  x2  0000007432a3b65c  x3  0000000000000000
E/AndroidRuntime(17704):     x4  0000007874260aac  x5  0000000000000000  x6  0000007432b6d0f0  x7  0000000500b00000
E/AndroidRuntime(17704):     x8  00000078744f0460  x9  5d870fa21d2a0a52  x10 0000000000000005  x11 0000000000000670
E/AndroidRuntime(17704):     x12 0000000000000000  x13 0000000000004fd1  x14 0000000000000005  x15 0000007432be7c20
E/AndroidRuntime(17704):     x16 00000078744ef350  x17 000000787386b618  x18 0000000000000003  x19 0000007432a3b65c
E/AndroidRuntime(17704):     x20 0000000000000000  x21 0000085e00000437  x22 0000000000000000  x23 0000000000000000
E/AndroidRuntime(17704):     x24 0000000000000000  x25 0000000000000000  x26 0000000000000000  x27 0000000000000003
E/AndroidRuntime(17704):     x28 000000742000018c  x29 0000007432a3b5b0
E/AndroidRuntime(17704):     sp  0000007432a3b5b0  lr  0000007874260acc  pc  0000007874260ad0
E/AndroidRuntime(17704): 
E/AndroidRuntime(17704): backtrace:
E/AndroidRuntime(17704):       #00 pc 0000000000020ad0  /system/lib64/libvulkan.so (BuildId: bfe0d26c892b38ffca636158d720e91d)
E/AndroidRuntime(17704):       #01 pc 000000000038c198  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #02 pc 000000000038c958  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #03 pc 000000000038ce78  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #04 pc 000000000038cc40  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #05 pc 000000000036b390  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #06 pc 000000000038c0f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #07 pc 000000000036c418  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #08 pc 000000000037c8f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #09 pc 000000000035f710  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #10 pc 000000000035af04  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #11 pc 00000000006affcc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #12 pc 00000000006b3cac  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #13 pc 00000000006abbfc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #14 pc 00000000002583a0  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #15 pc 00000000000afd4c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
E/AndroidRuntime(17704):       #16 pc 0000000000050288  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
E/AndroidRuntime(17704): 
E/AndroidRuntime(17704): 	at libvulkan.0x20ad0(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38c198(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38c958(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38ce78(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38cc40(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x36b390(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38c0f4(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x36c418(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x37c8f4(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x35f710(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x35af04(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x6affcc(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x6b3cac(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x6abbfc(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x2583a0(Native Method)
E/AndroidRuntime(17704): 	at libc.__pthread_start(void*)(__pthread_start:64)
E/AndroidRuntime(17704): 	at libc.__start_thread(__start_thread:64)
I/Process (17704): Sending signal. PID: 17704 SIG: 9
Lost connection to device.

@silentchild
Copy link

这个issue很久以前就关闭了,但是很多人还是有这个问题,没有重新打开。我的包的 4.1.0 版也有同样的问题,我们可以修复或更新吗?

我的日志

I/flutter (17704): *********************************************
I/flutter (17704): ** flutter unity controller setup complete **
I/flutter (17704): *********************************************
I/OpenGLRenderer(17704): Davey! duration=740ms; Flags=1, IntendedVsync=30655579636666, Vsync=30656301858881, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=30656308037216, AnimationStart=30656308041747, PerformTraversalsStart=30656308291799, DrawStart=30656315624143, SyncQueued=30656315924404, SyncStart=30656317843675, IssueDrawCommandsStart=30656317946644, SwapBuffers=30656319032321, FrameCompleted=30656321765915, DequeueBufferDuration=335000, QueueBufferDuration=2162500, GpuCompleted=0, 
W/Gralloc4(17704): allocator 3.x is not supported
I/Unity   (17704): MemoryManager: Using 'Dynamic Heap' Allocator.
W/.acs_upb_mobil(17704): Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V (greylist, reflection, allowed)
I/Unity   (17704): SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 5465mb
I/Unity   (17704): 
I/Unity   (17704): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
I/Unity   (17704): 
I/Unity   (17704): ApplicationInfo ro.pub.acs.acs_upb_mobile version 1.2.11 build 3c4f97ae-36cc-4737-b427-c00da0520ccc
I/Unity   (17704): 
I/Unity   (17704): Built from '2020.3/staging' branch, Version '2020.3.6f1 (338bb68529b2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
I/Unity   (17704): 
E/libprocessgroup(17704): set_timerslack_ns write failed: Operation not permitted
I/chatty  (17704): uid=10590(ro.pub.acs.acs_upb_mobile) UnityMain identical 14 lines
E/libprocessgroup(17704): set_timerslack_ns write failed: Operation not permitted
I/Unity   (17704): Company Name: StudentHub
I/Unity   (17704): Product Name: UPBMap3D
D/vulkan  (17704): searching for layers in '/data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64'
D/vulkan  (17704): searching for layers in '/data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/base.apk!/lib/arm64-v8a'
I/AdrenoVK-0(17704): ===== BEGIN DUMP OF OVERRIDDEN SETTINGS =====
I/AdrenoVK-0(17704): ===== END DUMP OF OVERRIDDEN SETTINGS =====
I/AdrenoVK-0(17704): QUALCOMM build          : 85da404, I46ff5fc46f
I/AdrenoVK-0(17704): Build Date              : 11/30/20
I/AdrenoVK-0(17704): Shader Compiler Version : EV031.31.04.01
I/AdrenoVK-0(17704): Local Branch            : promo490_3_Google
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Reconstruct Branch      : 
I/AdrenoVK-0(17704): Build Config            : S P 10.0.4 AArch64
I/AdrenoVK-0(17704): Driver Path             : /vendor/lib64/hw/vulkan.adreno.so
I/AdrenoVK-0(17704): QUALCOMM build          : 85da404, I46ff5fc46f
I/AdrenoVK-0(17704): Build Date              : 11/30/20
I/AdrenoVK-0(17704): Shader Compiler Version : EV031.31.04.01
I/AdrenoVK-0(17704): Local Branch            : promo490_3_Google
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Remote Branch           : 
I/AdrenoVK-0(17704): Reconstruct Branch      : 
I/AdrenoVK-0(17704): Build Config            : S P 10.0.4 AArch64
I/AdrenoVK-0(17704): Driver Path             : /vendor/lib64/hw/vulkan.adreno.so
V/MediaRouter(17704): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
D/.acs_upb_mobil(17704): PlayerBase::PlayerBase()
D/.acs_upb_mobil(17704): TrackPlayerBase::TrackPlayerBase()
I/libOpenSLES(17704): Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
W/AudioTrack(17704): set(): notificationFrames=-42 clamped to the range -1 to -8
I/AudioTrack(17704): createTrack_l(1): AUDIO_OUTPUT_FLAG_FAST successful; frameCount 0 -> 768
V/MediaRouter(17704): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
I/IL2CPP  (17704): Locale en-GB
D/CompatibilityChangeReporter(17704): Compat change id reported: 147600208; UID 10590; state: ENABLED
W/Unity   (17704): AndroidJNIHelper.GetSignature: using Byte parameters is obsolete, use SByte parameters instead
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetSignature(Object)
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetSignature(Object)
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetSignature(Object[])
W/Unity   (17704): UnityEngine._AndroidJNIHelper:GetMethodID(IntPtr, String, Object[], Boolean)
W/Unity   (17704): UnityEngine.AndroidJavaObject:_Call(String, Object[])
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:GetAndroidCertificateFingerprint()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:Init()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:get_PlatformRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.ProtoTileProducer:GetRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.<PerformHttpTileRequest>c__Iterator0:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): Google.Maps.TileLoading.<CreateMapTileAndFillSvt>c__Iterator1:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): 
W/Unity   (17704): AndroidJNIHelper: converting from Byte array is obsolete, use SByte array instead
W/Unity   (17704): UnityEngine._AndroidJNIHelper:ConvertFromJNIArray(IntPtr)
W/Unity   (17704): UnityEngine.AndroidJavaObject:_Call(String, Object[])
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:GetAndroidCertificateFingerprint()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:Init()
W/Unity   (17704): Google.Maps.TileLoading.NetworkParameters:get_PlatformRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.ProtoTileProducer:GetRequestHeaders()
W/Unity   (17704): Google.Maps.TileLoading.<PerformHttpTileRequest>c__Iterator0:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): Google.Maps.TileLoading.<CreateMapTileAndFillSvt>c__Iterator1:MoveNext()
W/Unity   (17704): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
W/Unity   (17704): 
V/MediaRouter(17704): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
W/System  (17704): A resource failed to call release. 
W/System  (17704): A resource failed to call release. 
E/Surface (17704): dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -19
E/vulkan  (17704): dequeueBuffer failed: No such device (-19)
E/vulkan  (17704): dequeueBuffer[2] failed: No such device (-19)
E/CRASH   (17704): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/CRASH   (17704): Version '2020.3.6f1 (338bb68529b2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E/CRASH   (17704): Build fingerprint: 'google/flame/flame:11/RQ3A.210605.005/7349499:user/release-keys'
E/CRASH   (17704): Revision: 'MP1.0'
E/CRASH   (17704): ABI: 'arm64'
E/CRASH   (17704): Timestamp: 2021-06-18 17:29:06+0300
E/CRASH   (17704): pid: 17704, tid: 17848, name: UnityGfxDeviceW  >>> ro.pub.acs.acs_upb_mobile <<<
E/CRASH   (17704): uid: 10590
E/CRASH   (17704): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
E/CRASH   (17704): Cause: null pointer dereference
E/CRASH   (17704):     x0  0000000000000001  x1  0000000000000000  x2  0000007432a3b65c  x3  0000000000000000
E/CRASH   (17704):     x4  0000007874260aac  x5  0000000000000000  x6  0000007432b6d0f0  x7  0000000500b00000
E/CRASH   (17704):     x8  00000078744f0460  x9  5d870fa21d2a0a52  x10 0000000000000005  x11 0000000000000670
E/CRASH   (17704):     x12 0000000000000000  x13 0000000000004fd1  x14 0000000000000005  x15 0000007432be7c20
E/CRASH   (17704):     x16 00000078744ef350  x17 000000787386b618  x18 0000000000000003  x19 0000007432a3b65c
E/CRASH   (17704):     x20 0000000000000000  x21 0000085e00000437  x22 0000000000000000  x23 0000000000000000
E/CRASH   (17704):     x24 0000000000000000  x25 0000000000000000  x26 0000000000000000  x27 0000000000000003
E/CRASH   (17704):     x28 000000742000018c  x29 0000007432a3b5b0
E/CRASH   (17704):     sp  0000007432a3b5b0  lr  0000007874260acc  pc  0000007874260ad0
E/CRASH   (17704): backtrace:
E/CRASH   (17704):       #00 pc 0000000000020ad0  /system/lib64/libvulkan.so (BuildId: bfe0d26c892b38ffca636158d720e91d)
E/CRASH   (17704):       #01 pc 000000000038c198  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #02 pc 000000000038c958  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #03 pc 000000000038ce78  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #04 pc 000000000038cc40  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #05 pc 000000000036b390  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #06 pc 000000000038c0f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #07 pc 000000000036c418  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #08 pc 000000000037c8f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #09 pc 000000000035f710  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #10 pc 000000000035af04  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #11 pc 00000000006affcc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #12 pc 00000000006b3cac  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #13 pc 00000000006abbfc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #14 pc 00000000002583a0  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/CRASH   (17704):       #15 pc 00000000000afd4c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
E/CRASH   (17704):       #16 pc 0000000000050288  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
I/flutter (17704): *********************************************
I/flutter (17704): ** flutter unity controller setup complete **
I/flutter (17704): *********************************************
E/CRASH   (17704): other thread is trapped; signum = 11
E/AndroidRuntime(17704): FATAL EXCEPTION: UnityMain
E/AndroidRuntime(17704): Process: ro.pub.acs.acs_upb_mobile, PID: 17704
E/AndroidRuntime(17704): java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/AndroidRuntime(17704): Version '2020.3.6f1 (338bb68529b2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E/AndroidRuntime(17704): Build fingerprint: 'google/flame/flame:11/RQ3A.210605.005/7349499:user/release-keys'
E/AndroidRuntime(17704): Revision: 'MP1.0'
E/AndroidRuntime(17704): ABI: 'arm64'
E/AndroidRuntime(17704): Timestamp: 2021-06-18 17:29:06+0300
E/AndroidRuntime(17704): pid: 17704, tid: 17848, name: UnityGfxDeviceW  >>> ro.pub.acs.acs_upb_mobile <<<
E/AndroidRuntime(17704): uid: 10590
E/AndroidRuntime(17704): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
E/AndroidRuntime(17704): Cause: null pointer dereference
E/AndroidRuntime(17704):     x0  0000000000000001  x1  0000000000000000  x2  0000007432a3b65c  x3  0000000000000000
E/AndroidRuntime(17704):     x4  0000007874260aac  x5  0000000000000000  x6  0000007432b6d0f0  x7  0000000500b00000
E/AndroidRuntime(17704):     x8  00000078744f0460  x9  5d870fa21d2a0a52  x10 0000000000000005  x11 0000000000000670
E/AndroidRuntime(17704):     x12 0000000000000000  x13 0000000000004fd1  x14 0000000000000005  x15 0000007432be7c20
E/AndroidRuntime(17704):     x16 00000078744ef350  x17 000000787386b618  x18 0000000000000003  x19 0000007432a3b65c
E/AndroidRuntime(17704):     x20 0000000000000000  x21 0000085e00000437  x22 0000000000000000  x23 0000000000000000
E/AndroidRuntime(17704):     x24 0000000000000000  x25 0000000000000000  x26 0000000000000000  x27 0000000000000003
E/AndroidRuntime(17704):     x28 000000742000018c  x29 0000007432a3b5b0
E/AndroidRuntime(17704):     sp  0000007432a3b5b0  lr  0000007874260acc  pc  0000007874260ad0
E/AndroidRuntime(17704): 
E/AndroidRuntime(17704): backtrace:
E/AndroidRuntime(17704):       #00 pc 0000000000020ad0  /system/lib64/libvulkan.so (BuildId: bfe0d26c892b38ffca636158d720e91d)
E/AndroidRuntime(17704):       #01 pc 000000000038c198  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #02 pc 000000000038c958  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #03 pc 000000000038ce78  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #04 pc 000000000038cc40  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #05 pc 000000000036b390  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #06 pc 000000000038c0f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #07 pc 000000000036c418  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #08 pc 000000000037c8f4  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #09 pc 000000000035f710  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #10 pc 000000000035af04  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #11 pc 00000000006affcc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #12 pc 00000000006b3cac  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #13 pc 00000000006abbfc  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #14 pc 00000000002583a0  /data/app/~~Ene8_e9zJbsBpR6lzhetPw==/ro.pub.acs.acs_upb_mobile-P7Z4X4AR8f5NGFAwHnaRXg==/lib/arm64/libunity.so (BuildId: 429e0d6ac67d32433a512accaa20c83fd3fbf38a)
E/AndroidRuntime(17704):       #15 pc 00000000000afd4c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
E/AndroidRuntime(17704):       #16 pc 0000000000050288  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
E/AndroidRuntime(17704): 
E/AndroidRuntime(17704): 	at libvulkan.0x20ad0(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38c198(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38c958(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38ce78(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38cc40(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x36b390(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x38c0f4(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x36c418(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x37c8f4(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x35f710(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x35af04(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x6affcc(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x6b3cac(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x6abbfc(Native Method)
E/AndroidRuntime(17704): 	at libunity.0x2583a0(Native Method)
E/AndroidRuntime(17704): 	at libc.__pthread_start(void*)(__pthread_start:64)
E/AndroidRuntime(17704): 	at libc.__start_thread(__start_thread:64)
I/Process (17704): Sending signal. PID: 17704 SIG: 9
Lost connection to device.

same issues

@cl0v
Copy link

cl0v commented Nov 11, 2021

still not fixed

@muck27
Copy link

muck27 commented Jan 27, 2022

My game scene does not render the second time I try to play it.
I tried adding a WillPopScope as mentioned in the comment of #400. The scene renders successfully the second time sometimes but most of the times it doesnt. Is there a fix for this issue yet? @thomas-stockx

@mahinikaras
Copy link

mahinikaras commented Feb 14, 2022

Still freezes app if I open unity second time. Even with the provided example. Is there any solution ?

@juicycleff
Copy link
Owner

I believe this issue has been solved

@ext-danny
Copy link

The unity app still crashes when clicked on back button and try to reopen it.

@qiaodongliang
Copy link

still not fixed

@timbotimbo
Copy link
Collaborator

@qiaodongliang
If you have a crash or bug with the current plugin, please make a new issue with reproduction steps and error messages.

Responding to a 3 year old issue that mentions code that probably doesn't even exist anymore won't help anyone solve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android This issue is specific to the Android Platform. bug This issue refers to a bug in the plugin
Projects
None yet
Development

No branches or pull requests