bugfender / BugfenderSDK-Unity

MIT License
0 stars 0 forks source link

iOS crash on Bugfender.Log with <null> tag #2

Open novavision opened 11 months ago

novavision commented 11 months ago

iOS app crashes each time on Bugfender.Log with tag set to null. Android is OK. Unity 2022.3.10f1 iOS device: iPhone 7, 15.7.9

log here

jgimenez commented 11 months ago

Hi @novavision , could you please share a code sample to reproduce the problem? Is it really a problem or you're passing a null where a string is supposed to be passed?

novavision commented 11 months ago

Well, it's pretty common practice to use null in string parameters because in C# normally used string.IsNullOrEmpty check. Bugfender.Log(Bugfender.LogLevel.Debug, tag, message); In cases, when you don't want to add the tag could be 2 options - string.empty or null. Again, maybe that's how you planned to make it work, but passing null as a parameter on Android works fine.

Not a big problem, however it took some time for me to define that is the reason of crashes

jgimenez commented 11 months ago

I see, thanks.

I agree the behavior should at least be consistent across platforms. Also, the iOS SDK accepts a nil tag, just I see the glue code assumes it is not: https://github.com/bugfender/BugfenderSDK-Unity/blob/main/Assets/Plugins/iOS/BugfenderBridge.mm#L50