Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Segfault instantiating terrain data

Discussion in 'Android' started by returnString, Aug 26, 2013.

  1. returnString

    returnString

    Joined:
    Jul 10, 2010
    Posts:
    248
    Yeah, weird one here. I get this segfault whenever I try and create an instance of UnityEngine.TerrainData, tested on my S3 and other random devices. The same code runs fine on my iPad.

    logcat output: http://pastebin.com/UYcxyUdX

    Narrowed it down to the simplest of lines:

    Code (csharp):
    1. var data = new TerrainData();
    Is this actually supported on Android devices, am I missing something stupid, or is something else going on here? :)
     
  2. returnString

    returnString

    Joined:
    Jul 10, 2010
    Posts:
    248
    Occurring on the 4.2.2f1 release too, same repro, same output. Any clues? I'd rather not write my own mesh-based terrain just to circumvent this...
     
  3. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
    Does it crash in case of
    Code (csharp):
    1. TerrainData terrainData = new TerrainData();
    ?
     
  4. returnString

    returnString

    Joined:
    Jul 10, 2010
    Posts:
    248
    That should compile to the same IL, var is applied at compile-time, not runtime.
     
  5. paintbox1

    paintbox1

    Joined:
    Jan 20, 2014
    Posts:
    36
    Hello,
    I am still suffering from this problem in Version 4.3.3f1 although it has been reported 3 times
    http://issuetracker.unity3d.com/issues/calling-new-terraindata-crashes-android-application
    http://issuetracker.unity3d.com/issues/segfault-occurs-when-instantiating-terraindata-on-android
    http://issuetracker.unity3d.com/issues/calling-new-terraindata-on-android-device-leads-to-crash
    and all those issues have "Fixed" as status.

    Am I missing something obvious?

    EDIT:
    I've submitted that Issue and received the following answer:
    I am able to reproduce the crash with Unity 4.3.3f1, however the crash is not reproducible with the internal Unity version anymore. I do not know when the fix will be publicly available, however this issue should get fixed in future Unity versions.

    So I guess I just have to wait for future releases.
     
    Last edited: Jan 22, 2014
  6. hugusasi

    hugusasi

    Joined:
    Jan 23, 2014
    Posts:
    1
    i didnt it ...
     
    Last edited: Jan 23, 2014
unityunity