-
Notifications
You must be signed in to change notification settings - Fork 434
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
Garbage collection of App, Auth, Instance ID, Realtime Database, Storage garbage collection can crash. #191
Comments
We are trying to pinpoint the potential causes. May I ask some questions regarding to the crashes?
Thank you, |
Hi Shawn,
This is the pod file I reverted to:
Thanks for looking in to this @chkuang-g !! |
Thank you for the information. We did have bug that We will investigate if this is still a potential issue. At the meantime, what you can do is to keep a reference of Also, I'd like to collect a bit more information, just in case this only happens to certain configuration.
Thank you, |
This is my Configuration:
|
Hi @gldio, We are gradually pushing out fixes for GC related crashes. However, it is still on-going. Sorry for the inconvenience. |
To summarize, @chkuang-g discovered a general issue with garbage collection across the SDK. If you create an object release the reference then create effectively the same object (e.g the same database reference) again it's possible for the SDK to end up with two C# objects, one in the garbage collection queue and the other held by the application, pointing at the same C++ object. When the object in the garbage collection queue is finally deleted, it also deletes the C++ object and we end up with a C# object referencing a stale pointer to a C++ object. @chkuang-g is working on a fix at the moment. In the meantime, you should keep references around to objects that are reused on a regular basis in your application. |
@chkuang-g I'm pretty sure #200 is the same thing. |
I think I have this issue aswell. |
I've changed my code to run in a editor window, but the crashes prevail. It seems to happen whenever Unity has recompiled the code and I try to fetch data. |
@asger60 This issue was on iOS. Yours seems like a different one. Also, you can fetch editor log here. Thank you, |
Mac editor keeps crasching here too. every second time. (Filename: Z Line: 0) Receiving unhandled NULL exception |
I am just using the supplied |
Hi folks, We made several fixes in 5.6.0 to fix multiple GC related crashes. Could you try 5.6.0 and kindly report if the newer SDK resolve your issues? Here is the downloadable link for your convenience. Thank you, |
@chkuang-g i think the bug is still there Please note that i disabled the FirebaseDatabase.dll under Firebase/Plugins/Mono for the editor platform, and enabled the one under Firebase/Plugins/ instead. Because of this issue: #106 Before upgrading to 5.6.0 (5.4.3): After upgrade to 5.6.0:
My informations: Products used: |
@inxidious This dll is pointing to our C++ desktop implementation, which is still work in progress. (And it is almost done!!!) We are making a lot of changes lately so I wouldn't be surprised that 5.6.0 behaves differently than 5.4.3. Unfortunately the best bet to resolve #106 is to change the networking environment for now. Still, thanks for the report. I will forward this information to the engineer who is working on this. |
This should be fixed as of the latest release, 6.2.0 |
I'm using firebase 6.3.0 and still have crashes every time I call database and stop the game in the editor. 2019.1.10 mac os |
Can Confirm that it happens for us as well with 6.1.1, 6.2.0, 6.3.0 on 2019.1.10f1 mac 10.14.4 Relevant logs below. Reloading assemblies after finishing script compilation. |
Same here. I have however resorted to conditional compilation for
UNITY_EDITOR, which lets me work on other parts of the project without
constantly crashing unity
//n
Den mån 22 juli 2019 kl 13:44 skrev Dimitri Akimaru <
notifications@github.com>:
… Can Confirm that it happens for us as well with 6.1.1, 6.2.0, 6.3.0 on
2019.1.10f1 mac 10.14.4
Crashes every second time Play is pressed, it's a nightmare! Half of our
development time is waiting for Unity to restart because of this and it's
been like this for weeks since we updated.
Relevant logs below.
Reloading assemblies after finishing script compilation. Begin MonoManager
ReloadAssembly Receiving unhandled NULL exception Obtained 17 stack frames.
WARNING: Auth object 0x9e08d640 should be deleted before the App 0x9d2b3040
it depends upon. WARNING: Database object 0xc303cde0 should be deleted
before the App 0x9d2b3040 it depends upon. Receiving unhandled NULL
exception Obtained 46 stack frames. #0 0x0000015573f41b in
firebase::database::internal::DatabaseInternal::~DatabaseInternal() #1
0x0000015575eb44 in firebase::database::Database::DeleteInternal() #2
0x000001558bfc95 in firebase::CleanupNotifier::CleanupAll() #3
0x000001558bc40a in firebase::app_common::RemoveApp(firebase::App*) #4
0x000001558cacd7 in firebase::App::~App() #5 0x00000155697882 in
firebase::CppInstanceManager<firebase::App>::ReleaseReference(firebase::App*)
#6 0x00000157af309b in (wrapper managed-to-native)
Firebase.AppUtilPINVOKE:FirebaseApp_ReleaseReferenceInternal
(System.Runtime.InteropServices.HandleRef) {0x7f8fb8dc8d48} + 0x11b
(0x157af2f80 0x157af31a5) [0x148c27000 - Unity Child Domain] #7
0x00000157af1de3 in Firebase.FirebaseApp:Dispose () {0x7f8fc7d3ff68} + 0x73
(0x157af1d70 0x157af1e0e) [0x148c27000 - Unity Child Domain] #8
0x000001618c572c in (wrapper runtime-invoke)
object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
{0x7f8fbd156ad8} + 0x16c (0x1618c55c0 0x1618c5935) [0x148c27000 - Unity
Child Domain] #9 0x000001486a3bcf in mono_gc_run_finalize #10
0x000001486a57ac in finalizer_thread #11 0x0000014866c388 in start_wrapper
#12 0x000001486e0114 in GC_inner_start_routine #13 0x000001486e00a9 in
GC_start_routine #14 0x007fff5a6562eb in _pthread_body #15 0x007fff5a659249
in _pthread_start #16 0x007fff5a65540d in thread_start
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#191?email_source=notifications&email_token=AAEYCEUSKFBY2QU2VX2PTZDQAWMQJA5CNFSM4FMV46TKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2PVBHY#issuecomment-513757343>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEYCEQI2HD2FVFDUQQIOXTQAWMQJANCNFSM4FMV46TA>
.
--
niklas wörmann
fingerfunk ab
valborgsmässovägen 11
126 37 Hägersten Sweden
+46 70 0720292
<http://www.fingerfunk.se/>
|
Same here... |
@chkuang-g has another patch for this pending release. |
Is there any info about that issue? We've tried to update SDK to 6.6.0 released on September 25, but the crashes are still here every time we restart the project in editor on MacOS. |
Hi folks, I think a couple of different issues were mixed here. The original post from @mgrogin was about the crash on iOS. And most the the rest are about crash in Unity Editor on Mac. I think the original issue was resolved. Also the Unity Editor issue should have been resolved in the past release. Here is the reason. Crash when play for the second time should be resolved in 6.5.0. Some other crash in editor related to Database should be fixed in 6.6.0. @HuuugeGames-MichalOglozinski Thank you, |
My app occasionally crashing since upgrading to firebase 5.1.1
The only indication of the source of the problem that I have is in this crash information from xcode from users using IOS 11.4.1
based on the stack it looks like the problem is firebase database
any ideas?
Crash information:
![screen shot 2018-07-29 at 7 09 13 pm](https://user-images.githubusercontent.com/7486227/43368246-01e7cf48-9363-11e8-8ace-ba726590353f.png)
This is what the pod file looks like:
The text was updated successfully, but these errors were encountered: