Search Issue Tracker

By Design

Votes

2

Found in

5.4.0f3

Issue ID

833586

Regression

No

[iOS] An extra 'null' parameter is passed after a long type integer is used in a native method on 32-bit iOS devices

iOS

-

When using native iOS code, if a method uses a 'long' type parameter, an extra 'null' is passed with it. In this case, the 'null' parameter is read as an argument by other methods, corrupting the output.

Steps to reproduce:
1) Open the latest attached project (32-bit_833586.zip).
2) Build for iOS.
3) Run on a device via Xcode.

In Xcode's console, these lines get printed on 32-bit devices:
UnityNativeMethod : Native_SendInt : 60, A String
UnityNativeMethod : Native_SendLong : 60, (null), A String

However, the output on 64-bit devices is different:
UnityNativeMethod : Native_SendInt : 60, A String
UnityNativeMethod : Native_SendLong : 60, A String, Another string

This happens because a 'null' is passed with the 'long' int and is interpreted as a variable.

Reproduced on:
5.5.0b4, 5.4.1p2, 5.3.6p6, 5.2.4f1

Devices tested:
iPhone 5 iOS 9.3.5 (32-bit)
iPhone 9 Plus iOS 10.0.1 (64-bit)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.