-
Notifications
You must be signed in to change notification settings - Fork 39
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
NullReferenceException on low performance devices #89
Comments
That's very odd. Does it properly work on the editor and iOS? Could you please enable debugging on the SDK? (Edit->Project Settings->Mixpanel) and paste here what you see when you track and flush? Just to confirm, have you modified the tracking URL? In the same settings that I mentioned above, do you see |
Hi, I am sorry for the delay in my reply, I was on holidays. It works perfectly on the editor iOS and other Android devices. We are having that issue on old Android devices: BQ Aquaris M10 and Nexus 5 We haven't modified any setting on those specific devices and we can see https://api.mixpanel.com/ I have enabled debugging on the SDK and I have got: FIRST EXECUTION 12-11 11:56:04.100 4512-4586/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:35.593 4512-4947/com.zitro.winup E/Unity: [Mixpanel] System.NullReferenceException: Object reference not set to an instance of an object.
12-11 11:56:38.744 4512-4947/com.zitro.winup I/Unity: [Mixpanel] Sending Request - 'https://api.mixpanel.com/track/?ip=1' with payload 'W3siZXZlbnQiOiAiRmlyc3RfT3BlbiIsICJwcm9wZXJ0aWVzIjogeyJJZF9Vc2VyX0lEIjogNTYxOCwgIkxldmVsIjogMSwgIm1wX2xpYiI6ICJ1bml0eSIsICIkbGliX3ZlcnNpb24iOiAiMi4xLjAiLCAiJG9zIjogIkFuZHJvaWQiLCAiJG9zX3ZlcnNpb24iOiAiQW5kcm9pZCBPUyA2LjAgLyBBUEktMjMgKE1SQTU4Sy8xNTE2OTU5NTg3KSIsICIkbW9kZWwiOiAiYnEgQXF1YXJpcyBNMTAiLCAiJGFwcF92ZXJzaW9uX3N0cmluZyI6ICI2LjAuMCIsICIkd2lmaSI6IHRydWUsICIkcmFkaW8iOiAid2lmaSIsICIkZGV2aWNlIjogIkFuZHJvaWQiLCAiJHNjcmVlbl9kcGkiOiAxNjAsICIkc2NyZWVuX3dpZHRoIjogMTI4MCwgIiRzY3JlZW5faGVpZ2h0IjogODAwLCAidG9rZW4iOiAiYWQ0MTg1Mzg4YzA1NTAxMjc1NmQxNDc1YTAzZDk5NGYiLCAiZGlzdGluY3RfaWQiOiAiYmRhZTJlZWMtZGM5ZS00NDgxLTg5ZjktZWFjNjVhZTYyY2Q5IiwgInRpbWUiOiAxNTc2MDYxNzk1LjY2MTk3fSwgIiRtcF9tZXRhZGF0YSI6IHsiJG1wX2V2ZW50X2lkIjogImMyYTYxNjYiLCAiJG1wX3Nlc3Npb25faWQiOiAiMWQ4NjQ5YmEiLCAiJG1wX3Nlc3Npb25fc2VxX2lkIjogMCwgIiRtcF9zZXNzaW9uX3N0YXJ0X3NlYyI6IDE1NzYwNjE3Nzh9fV0='
SECOND EXECUTION 12-11 11:46:11.765 5625-5669/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:46:32.495 5625-5734/com.zitro.winup E/Unity: [Mixpanel] System.NullReferenceException: Object reference not set to an instance of an object.
12-11 11:46:42.620 5625-5734/com.zitro.winup I/Unity: [Mixpanel] Sending Request - 'https://api.mixpanel.com/track/?ip=1' with payload 'W3siZXZlbnQiOiAiRG93bmxvYWRfQmFja2dyb3VuZF9TdGFydCIsICJwcm9wZXJ0aWVzIjogeyJJZF9Vc2VyX0lEIjogMCwgIkxldmVsIjogMCwgIkV2ZW50X1RpbWUiOiA0Ljg1Mzg2NiwgIm1wX2xpYiI6ICJ1bml0eSIsICIkbGliX3ZlcnNpb24iOiAiMi4xLjAiLCAiJG9zIjogIkFuZHJvaWQiLCAiJG9zX3ZlcnNpb24iOiAiQW5kcm9pZCBPUyA2LjAgLyBBUEktMjMgKE1SQTU4Sy8xNTE2OTU5NTg3KSIsICIkbW9kZWwiOiAiYnEgQXF1YXJpcyBNMTAiLCAiJGFwcF92ZXJzaW9uX3N0cmluZyI6ICI2LjAuMCI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XZpY2UiOiAiQW5kcm9pZCIsICIkc2NyZWVuX2RwaSI6IDE2MCwgIiRzY3JlZW5fd2lkdGgiOiAxMjgwLCAiJHNjcmVlbl9oZWlnaHQiOiA4MDAsICJ0b2tlbiI6ICJhZDQxODUzODhjMDU1MDEyNzU2ZDE0NzVhMDNkOTk0ZiIsICJkaXN0aW5jdF9pZCI6ICI5MmEzYzZiNS0wYTI4LTQzYzktODNmMC00MGU0NDQxMjM0N2IiLCAidGltZSI6IDE1NzYwNjEyMTUuNTU5NjJ9LCAiJG1wX21ldGFkYXRhIjogeyIkbXBfZXZlbnRfaWQiOiAiM2U5NmZiMmMiLCAiJG1wX3Nlc3Npb25faWQiOiAiNmMyYjRiNmYiLCAiJG1wX3Nlc3Npb25fc2VxX2lkIjogMiwgIiRtcF9zZXNzaW9uX3N0YXJ0X3NlYyI6IDE1NzYwNjExODJ9fV0='
12-11 11:47:55.115 5625-5734/com.zitro.winup E/Unity: [Mixpanel] System.NullReferenceException: Object reference not set to an instance of an object.
Thank you for your help, it is greatly appreciated |
We have the same issue with an android tablet devices. Version 2.1.1 |
Hey - Does it only happen in physical devices? Wondering if I could emulate this on a simulator. |
It only happens on the physical device. It is a samsung SM-T595 tablet.
The first time i interact with the SDK is at the startup of the application. I update super properties and track an app launched event.
I do call the sdk from different threads but i tested with calling only from the unity main thread and still had the same issue.
This is the stack track
01-07 09:37:57.538 26680 26774 E Unity : [Mixpanel] System.NullReferenceException: Object reference not set to an instance of an object.
01-07 09:37:57.538 26680 26774 E Unity : at mixpanel.Worker.DispatchOperations () [0x00000] in <00000000000000000000000000000000>:0
01-07 09:37:57.538 26680 26774 E Unity : at mixpanel.Worker.RunBackgroundThread () [0x00000] in <00000000000000000000000000000000>:0
01-07 09:37:57.538 26680 26774 E Unity : at System.Threading.ThreadStart.Invoke () [0x00000] in <00000000000000000000000000000000>:0
01-07 09:37:57.538 26680 26774 E Unity : at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
01-07 09:37:57.538 26680 26774 E Unity : at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
01-07 09:37:57.538 26680 26774 E Unity : at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
01-07 09:37:57.538 26680 26774 E Unity : at System.Threading.Execution
from adb logcat -s Unity
Thank you!
[https://docs.google.com/uc?export=download&id=1WA_RlIoq8opkw7c6eDoOVcQ3Okrh1NY3&revid=0B4gkDGNaVrvmTnFpbVdsaTAwak0xbHVKVkxQM203UXpWbDY0PQ]
Haim David
Senior Unity Developer, Head Of Unity Development
(972) 50-277-0<mailto:(972)%2052-677-3723>600 | [email protected]<mailto:[email protected]> |
<http://vrhealthgroup.com/>https://www.xr.health/ | 32 Shoken St. Tel-Aviv, Israel, 6105101
[https://docs.google.com/uc?export=download&id=1PWK6FpGIqoSdhS9wYilmO6QYFks9dVhM&revid=0B4gkDGNaVrvmNW45aVhYQ2tSMHAyTkt0R1dIRG55VWV2a1c0PQ]<http://facebook.com/VRHealthGroup> [https://docs.google.com/uc?export=download&id=1K8Cp6NjllEgprdIQnsEEPF7Dm_O3QQ7N&revid=0B4gkDGNaVrvmVXJFcTZqekl2UFlnNXRxeGVvQ1dtS1hNcEE0PQ] <http://twitter.com/VRHealthGroup>
…________________________________
From: Sergio Alonso Fernández <[email protected]>
Sent: Monday, January 6, 2020 7:42 PM
To: mixpanel/mixpanel-unity <[email protected]>
Cc: Haim David <[email protected]>; Comment <[email protected]>
Subject: Re: [mixpanel/mixpanel-unity] NullReferenceException on low performance devices (#89)
Hey - Does it only happen in physical devices? Wondering if I could emulate this on a simulator.
Do you perform any operations on the SDK from multiple threads? When it's the first time in your app lifecycle that you interact with the SDK?
Thanks for helping us troubleshoot this!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#89?email_source=notifications&email_token=AOGFTOBSJ7GVT5TRQPP675DQ4NURPA5CNFSM4J2KITXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIGF5TA#issuecomment-571236044>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOGFTOANCBJKISXGZ5TMOXLQ4NURPANCNFSM4J2KITXA>.
|
This is a sample project. |
updating this ticket - would you mind using
thanks a lot folks |
I have tested this solution with our project and it seems to resolve the issue. Thank you! |
Hi, It is difficult to test if the issue has been fixed, because we need to play the game several times, as the issue is not constant. We have done a build using that branch and it doesn't seem to fix the issue. We have tested on a Sony Xperia M4 Aqua (E2303) and we have got (Filename: ./Runtime/Export/Debug.bindings.h Line: 45) There is no getaddrinfo: api.mixpanel.com get result from proxy gai_error = 0 on this device, so we know that this issue has nothing to do with it. We don't know what is going on because we can see that there are some events being tracked correctly earlier. In addition to that, we have tested on a bq Aquaris M10 and there are new System.NullReferenceException System.NullReferenceException: Object reference not set to an instance of an object. I think that you may be able to replicate the issue if you build a highly demanding application on a low performance device as it just happens on that kind of devices. Do not hesitate to contact me for further information. Thank you for your help, it is greatly appreciated. |
Hi, is there any advance on this? Some events are being lost on production, so we are having inconsistent data due to this and we really need to get this fix. Thank you for your help it is greatly appreciated Kind regards |
Thank you so much for your response, we will update the sdk version to the last version and change the Flush interval. Is the version 2.20 (https://github.com/mixpanel/mixpanel-unity/commits/v2.20) the one that is working for you? Thanks |
Our QA team has tested our application using 2.1.4 and setting the flush interval to 10 and it seems to be working well. You (@haim-vrhealth) may want to test if setting the flush interval still works for you as this will save battery for your users. I guess that you could close the issue. Thank you so much to both of you for your help, it is greatly appreciated Best |
Hi,
We are having some issues on low performance devices. We are using the Unity's sdk v2.1.0 (https://github.com/mixpanel/mixpanel-unity/commits/v2.1.0) on our game which will be published on iOS and Android
We think that the principal issue is:
12-11 11:56:04.173 4512-4586/com.zitro.winup D/libc-netbsd: getaddrinfo: api.mixpanel.com get result from proxy gai_error = 0
and the rest of the issues are caused by this one.
As you will be able to see in the two screenshots there is an gai_error at the beginning but the first time that the application is opened (just after it has been installed) there is the error
System.NullReferenceException: Object reference not set to an instance of an object.
at mixpanel.Worker.DispatchOperations () [0x00000] in <00000000000000000000000000000000>:0
at mixpanel.Worker.RunBackgroundThread () [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
mixpanel.Worker:RunBackgroundThread()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
And there is an extra error the second time the application is opened
12-11 11:46:28.353 5625-5734/com.zitro.winup E/Unity: [Mixpanel] System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Queue`1[T].Dequeue () [0x00000] in <00000000000000000000000000000000>:0
at mixpanel.Worker.DispatchOperations () [0x00000] in <00000000000000000000000000000000>:0
at mixpanel.Worker.RunBackgroundThread () [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
mixpanel.Worker:RunBackgroundThread()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
(Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
12-11 11:46:32.495 5625-5734/com.zitro.winup E/Unity: [Mixpanel] System.NullReferenceException: Object reference not set to an instance of an object.
at mixpanel.Worker.DispatchOperations () [0x00000] in <00000000000000000000000000000000>:0
at mixpanel.Worker.RunBackgroundThread () [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
mixpanel.Worker:RunBackgroundThread()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
We are guessing that there has to be any kind of inconsistency between the local data and the data on the mixpanel's servers
Is this a known issue?
Has anyone been able to fix it?
The Android Model in which this issue is happening is:
Android OS 6.0 / API-23 (MRA58K/1516959587)
Android Model bq Aquaris M10
Android Os Version Android OS 6.0 / API-23 (MRA58K/1516959587)
I hope this information helps to identify the issue
Thank you for your help
The text was updated successfully, but these errors were encountered: