UnityNativeScripting icon indicating copy to clipboard operation
UnityNativeScripting copied to clipboard

Crash in release build when returning a string from a method

Open SeleDreams opened this issue 4 years ago • 3 comments

Hi, I am working on a project and I found a weird issue that only happens in release build

I have a a function that returns a string image (Member is a string member I use quickly for this example but basically it happened with all my code) and it works in the editor, the string is properly returned and I can work with it, but when I test it in a standalone build, the game crashes immediatly when the function is called this is the log it generated when crashing

error.log

SeleDreams avatar Mar 06 '20 09:03 SeleDreams

It's hard to tell what's happening here from just the small snippet of code and the error.log file. What is Member? How is this function being called?

I noticed you're using Unity 2017.2. While it's not strictly required, you may also benefit from upgrading to a newer, supported version.

jacksondunstan avatar Mar 07 '20 18:03 jacksondunstan

I think i'll make a small reproduction project to help you identify the issue.

I was using unity 2017 because I was creating a feature for a game under unity 2017.2.3

SeleDreams avatar Mar 08 '20 02:03 SeleDreams

image also if versions superior to 2017 are supported, it could be good to update the description

SeleDreams avatar Mar 08 '20 02:03 SeleDreams