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

NullReferenceException on low performance devices #89

Closed
OriolZitro opened this issue Dec 13, 2019 · 14 comments
Closed

NullReferenceException on low performance devices #89

OriolZitro opened this issue Dec 13, 2019 · 14 comments

Comments

@OriolZitro
Copy link

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)

FirstTimeOpened

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)

SecondTimeOpened

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

@patedit
Copy link
Contributor

patedit commented Dec 17, 2019

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 https://api.mixpanel.com/?

@OriolZitro
Copy link
Author

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:04.102 4512-4586/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:04.122 4512-4512/com.zitro.winup W/MixpanelAPI.ConfigurationChecker: You can't have more than one service handling "com.google.firebase.MESSAGING_EVENT" intent filter. Android will only use the first one that is declared on your AndroidManifest.xml. If you have more than one push provider you need to crate your own FirebaseMessagingService class.
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
12-11 11:56:04.173 4512-4586/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:04.174 4512-4586/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:04.195 4512-4586/com.zitro.winup D/libc-netbsd: getaddrinfo: decide.mixpanel.com get result from proxy gai_error = 0
12-11 11:56:04.746 4512-4585/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:04.747 4512-4585/com.zitro.winup I/System.out: [socket][4] connection decide.mixpanel.com/130.211.34.183:443;LocalPort=58692(2000)
12-11 11:56:04.747 4512-4585/com.zitro.winup I/System.out: [CDS]connect[decide.mixpanel.com/130.211.34.183:443] tm:2
12-11 11:56:04.782 4512-4585/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:05.208 4512-4585/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:05.209 4512-4585/com.zitro.winup I/System.out: [socket][5] connection api.mixpanel.com/130.211.34.183:443;LocalPort=39492(2000)
12-11 11:56:05.209 4512-4585/com.zitro.winup I/System.out: [CDS]connect[api.mixpanel.com/130.211.34.183:443] tm:2
12-11 11:56:05.232 4512-4585/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:28.209 4512-4947/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)

(Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

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.
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:56:38.744 4512-4947/com.zitro.winup I/Unity: [Mixpanel] Sending Request - 'https://api.mixpanel.com/track/?ip=1' with payload 'W3siZXZlbnQiOiAiRmlyc3RfT3BlbiIsICJwcm9wZXJ0aWVzIjogeyJJZF9Vc2VyX0lEIjogNTYxOCwgIkxldmVsIjogMSwgIm1wX2xpYiI6ICJ1bml0eSIsICIkbGliX3ZlcnNpb24iOiAiMi4xLjAiLCAiJG9zIjogIkFuZHJvaWQiLCAiJG9zX3ZlcnNpb24iOiAiQW5kcm9pZCBPUyA2LjAgLyBBUEktMjMgKE1SQTU4Sy8xNTE2OTU5NTg3KSIsICIkbW9kZWwiOiAiYnEgQXF1YXJpcyBNMTAiLCAiJGFwcF92ZXJzaW9uX3N0cmluZyI6ICI2LjAuMCIsICIkd2lmaSI6IHRydWUsICIkcmFkaW8iOiAid2lmaSIsICIkZGV2aWNlIjogIkFuZHJvaWQiLCAiJHNjcmVlbl9kcGkiOiAxNjAsICIkc2NyZWVuX3dpZHRoIjogMTI4MCwgIiRzY3JlZW5faGVpZ2h0IjogODAwLCAidG9rZW4iOiAiYWQ0MTg1Mzg4YzA1NTAxMjc1NmQxNDc1YTAzZDk5NGYiLCAiZGlzdGluY3RfaWQiOiAiYmRhZTJlZWMtZGM5ZS00NDgxLTg5ZjktZWFjNjVhZTYyY2Q5IiwgInRpbWUiOiAxNTc2MDYxNzk1LjY2MTk3fSwgIiRtcF9tZXRhZGF0YSI6IHsiJG1wX2V2ZW50X2lkIjogImMyYTYxNjYiLCAiJG1wX3Nlc3Npb25faWQiOiAiMWQ4NjQ5YmEiLCAiJG1wX3Nlc3Npb25fc2VxX2lkIjogMCwgIiRtcF9zZXNzaW9uX3N0YXJ0X3NlYyI6IDE1NzYwNjE3Nzh9fV0='
mixpanel.d__18:MoveNext()
mixpanel.Worker:DispatchOperations()
mixpanel.W
12-11 11:56:38.786 4512-5001/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:56:38.791 4512-5001/com.zitro.winup D/libc-netbsd: getaddrinfo: api.mixpanel.com get result from proxy gai_error = 0
12-11 11:56:40.106 4512-4947/com.zitro.winup I/Unity: [Mixpanel] Response - 'https://api.mixpanel.com/track/?ip=1' was '1'
mixpanel.d__18:MoveNext()
mixpanel.Worker:DispatchOperations()
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)

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:11.766 5625-5669/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:46:11.770 5625-5669/com.zitro.winup D/libc-netbsd: getaddrinfo: api.mixpanel.com get result from proxy gai_error = 0
12-11 11:46:11.771 5625-5669/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:46:11.772 5625-5669/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:46:11.776 5625-5669/com.zitro.winup D/libc-netbsd: getaddrinfo: decide.mixpanel.com get result from proxy gai_error = 0
12-11 11:46:11.782 5625-5625/com.zitro.winup W/MixpanelAPI.ConfigurationChecker: You can't have more than one service handling "com.google.firebase.MESSAGING_EVENT" intent filter. Android will only use the first one that is declared on your AndroidManifest.xml. If you have more than one push provider you need to crate your own FirebaseMessagingService class.
12-11 11:46:11.805 5625-5668/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:46:11.806 5625-5668/com.zitro.winup I/System.out: [socket][1] connection decide.mixpanel.com/130.211.34.183:443;LocalPort=57777(2000)
12-11 11:46:11.806 5625-5668/com.zitro.winup I/System.out: [CDS]connect[decide.mixpanel.com/130.211.34.183:443] tm:2
12-11 11:46:11.931 5625-5668/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=decide.mixpanel.com; servname=(null); netid=0; mark=0
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)

(Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

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 'W3siZXZlbnQiOiAiRG93bmxvYWRfQmFja2dyb3VuZF9TdGFydCIsICJwcm9wZXJ0aWVzIjogeyJJZF9Vc2VyX0lEIjogMCwgIkxldmVsIjogMCwgIkV2ZW50X1RpbWUiOiA0Ljg1Mzg2NiwgIm1wX2xpYiI6ICJ1bml0eSIsICIkbGliX3ZlcnNpb24iOiAiMi4xLjAiLCAiJG9zIjogIkFuZHJvaWQiLCAiJG9zX3ZlcnNpb24iOiAiQW5kcm9pZCBPUyA2LjAgLyBBUEktMjMgKE1SQTU4Sy8xNTE2OTU5NTg3KSIsICIkbW9kZWwiOiAiYnEgQXF1YXJpcyBNMTAiLCAiJGFwcF92ZXJzaW9uX3N0cmluZyI6ICI2LjAuMCIsICIkd2lmaSI6IHRydWUsICIkcmFkaW8iOiAid2lmaSIsICIkZGV2aWNlIjogIkFuZHJvaWQiLCAiJHNjcmVlbl9kcGkiOiAxNjAsICIkc2NyZWVuX3dpZHRoIjogMTI4MCwgIiRzY3JlZW5faGVpZ2h0IjogODAwLCAidG9rZW4iOiAiYWQ0MTg1Mzg4YzA1NTAxMjc1NmQxNDc1YTAzZDk5NGYiLCAiZGlzdGluY3RfaWQiOiAiOTJhM2M2YjUtMGEyOC00M2M5LTgzZjAtNDBlNDQ0MTIzNDdiIiwgInRpbWUiOiAxNTc2MDYxMTg4LjMzNzA2fSwgIiRtcF9tZXRhZGF0YSI6IHsiJG1wX2V2ZW50X2lkIjogIjcyZjZkZWI0IiwgIiRtcF9zZXNzaW9uX2lkIjogIjZjMmI0YjZmIiwgIiRtcF9zZXNzaW9uX3NlcV9pZCI6IDAsICIkbXBfc2Vzc2lvbl9zdGFydF9zZWMiOiAxNTc2MDYxMTgyfX1d'
mixpanel.d__18:MoveNext()
12-11 11:46:42.667 5625-5781/com.zitro.winup D/libc-netbsd: [getaddrinfo]: hostname=api.mixpanel.com; servname=(null); netid=0; mark=0
12-11 11:46:42.671 5625-5781/com.zitro.winup D/libc-netbsd: getaddrinfo: api.mixpanel.com get result from proxy gai_error = 0
12-11 11:46:44.009 5625-5734/com.zitro.winup I/Unity: [Mixpanel] Response - 'https://api.mixpanel.com/track/?ip=1' was '1'
mixpanel.d__18:MoveNext()
mixpanel.Worker:DispatchOperations()
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:47:04.985 5625-5734/com.zitro.winup I/Unity: [Mixpanel] Sending Request - 'https://api.mixpanel.com/track/?ip=1' with payload 'W3siZXZlbnQiOiAiTG9hZGVyX1N0YXJ0IiwgInByb3BlcnRpZXMiOiB7IklkX1VzZXJfSUQiOiA1NjE4LCAiTGV2ZWwiOiAxLCAiQXV0aGVudGljYXRpb24iOiAiQW5vbmltbyIsICJFdmVudF9UaW1lIjogMzIuODEzODUyLCAibXBfbGliIjogInVuaXR5IiwgIiRsaWJfdmVyc2lvbiI6ICIyLjEuMCIsICIkb3MiOiAiQW5kcm9pZCIsICIkb3NfdmVyc2lvbiI6ICJBbmRyb2lkIE9TIDYuMCAvIEFQSS0yMyAoTVJBNThLLzE1MTY5NTk1ODcpIiwgIiRtb2RlbCI6ICJicSBBcXVhcmlzIE0xMCIsICIkYXBwX3ZlcnNpb25fc3RyaW5nIjogIjYuMC4wIiwgIiR3aWZpIjogdHJ1ZSwgIiRyYWRpbyI6ICJ3aWZpIiwgIiRkZXZpY2UiOiAiQW5kcm9pZCIsICIkc2NyZWVuX2RwaSI6IDE2MCwgIiRzY3JlZW5fd2lkdGgiOiAxMjgwLCAiJHNjcmVlbl9oZWlnaHQiOiA4MDAsICJ0b2tlbiI6ICJhZDQxODUzODhjMDU1MDEyNzU2ZDE0NzVhMDNkOTk0ZiIsICJkaXN0aW5jdF9pZCI6ICI5MmEzYzZiNS0wYTI4LTQzYzktODNmMC00MGU0NDQxMjM0N2IiLCAidGltZSI6IDE1NzYwNjEyMTUuNTU5NjJ9LCAiJG1wX21ldGFkYXRhIjogeyIkbXBfZXZlbnRfaWQiOiAiM2U5NmZiMmMiLCAiJG1wX3Nlc3Npb25faWQiOiAiNmMyYjRiNmYiLCAiJG1wX3Nlc3Npb25fc2VxX2lkIjogMiwgIiRtcF9zZXNzaW9uX3N0YXJ0X3NlYyI6IDE1NzYwNjExODJ9fV0='
mixpane
12-11 11:47:05.116 5625-5734/com.zitro.winup I/Unity: [Mixpanel] Response - 'https://api.mixpanel.com/track/?ip=1' was '1'
mixpanel.d__18:MoveNext()
mixpanel.Worker:DispatchOperations()
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:47:55.115 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)

(Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

Thank you for your help, it is greatly appreciated

@haim-vrhealth
Copy link

We have the same issue with an android tablet devices. Version 2.1.1

@patedit
Copy link
Contributor

patedit commented Jan 6, 2020

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!

@haim-vrhealth
Copy link

haim-vrhealth commented Jan 7, 2020 via email

@haim-vrhealth
Copy link

This is a sample project.
It will work in the editor but will send exceptions on android device. IL2CPP backend will always write exceptions. Mono backend will not write exceptions but the events will never show up on the live view dashboard.

AnalyticsMixPanelTest.zip

@patedit
Copy link
Contributor

patedit commented Jan 13, 2020

updating this ticket - would you mind using fix-issue-69 branch and see if it fixes this issue? For that, you can point your manifest.json to that branch like:

"com.mixpanel.unity": "https://github.com/mixpanel/mixpanel-unity.git#fix-issue-69"

thanks a lot folks

@haim-vrhealth
Copy link

I have tested this solution with our project and it seems to resolve the issue. Thank you!

@OriolZitro
Copy link
Author

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)
01-14 11:52:58.600 15346-15598/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
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.Con

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.
at mixpanel.Mixpanel.Put (mixpanel.Value value) [0x00000] in <00000000000000000000000000000000>:0
at mixpanel.Worker.EnqueueMixpanelQueue (mixpanel.queue.PersistentQueue persistentQueue, mixpanel.Value data) [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
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCt

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.

@OriolZitro
Copy link
Author

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

@haim-vrhealth
Copy link

haim-vrhealth commented Jun 9, 2020 via email

@OriolZitro
Copy link
Author

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

@haim-vrhealth
Copy link

haim-vrhealth commented Jun 9, 2020 via email

@OriolZitro
Copy link
Author

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

@zihejia zihejia closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants