Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

NullReferenceException in iOS64bit Unity4.6.7p2 and Unity5.1.2f1

Discussion in 'Editor & General Support' started by amaike, Jul 22, 2015.

  1. amaike

    amaike

    Joined:
    Mar 6, 2014
    Posts:
    8
    I'm getting a NullReferenceException: A null value was found where an object instance was required.


    My code is here:

    System.Diagnostics.StackTracestackTrace = newSystem.Diagnostics.StackTrace(true);
    inttargetIndex = stackTrace.FrameCount -1 ;
    Debug.Log("FullName: " + stackTrace.GetFrame(targetIndex).GetMethod().ReflectedType.FullName);
    Debug.Log("Name: " + stackTrace.GetFrame(targetIndex).GetMethod().Name);
    Debug.Log("GetFileLineNumber: " + stackTrace.GetFrame(targetIndex).GetFileLineNumber().ToString());

    In Xcode 6.4 Build Configuration Release.
    Thx.
     
  2. amaike

    amaike

    Joined:
    Mar 6, 2014
    Posts:
    8
    I try Xcode Build Configuration is Release.


    Initialize engine version: 4.6.7p2

    test start.

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)

    targetIndex: -1

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)

    NullReferenceException: A null value was found where an object instance was required.

    at System.Array+InternalEnumerator`1[System.Collections.Generic.IEnumerable`1[System.Char]]..ctor (System.Array array) [0x00000] in <filename unknown>:0

    (Filename: currently not available on il2cpp Line: 4294967295)


    :(
     

    Attached Files:

  3. amaike

    amaike

    Joined:
    Mar 6, 2014
    Posts:
    8
    This is the history of time is no problem.
    Xcode Build Configuration is Debug.


    Initialize engine version: 4.6.7p2


    test start.

    UnityEngine.Debug:Internal_Log(Int32, String, Object)

    UnityEngine.Debug:Log(Object)

    LogTestScript:Start()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)


    targetIndex: 0

    UnityEngine.Debug:Internal_Log(Int32, String, Object)

    UnityEngine.Debug:Log(Object)

    LogTestScript:Start()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)


    FullName: LogTestScript

    UnityEngine.Debug:Internal_Log(Int32, String, Object)

    UnityEngine.Debug:Log(Object)

    LogTestScript:Start()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)


    Name: Start

    UnityEngine.Debug:Internal_Log(Int32, String, Object)

    UnityEngine.Debug:Log(Object)

    LogTestScript:Start()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)


    GetFileLineNumber: 0

    UnityEngine.Debug:Internal_Log(Int32, String, Object)

    UnityEngine.Debug:Log(Object)

    LogTestScript:Start()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)


    test end.

    UnityEngine.Debug:Internal_Log(Int32, String, Object)

    UnityEngine.Debug:Log(Object)

    LogTestScript:Start()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)


    fmmm.