Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Weird crashes on WP8.1 when upgrading from 5.3.7 custom to 5.5.0p3

Discussion in 'Windows' started by mr_zog, Jan 13, 2017.

  1. mr_zog

    mr_zog

    Joined:
    Jan 21, 2014
    Posts:
    165
    Preamble:
    * Testing on Lumia 925.
    * We have suffered the Windows Phone Infinite-Loop issue which Jake Turner worked on. When I write 5.3.7, I am talking about 5.3.7 with his "private" patch.


    1) If I test our game with a debug build and debugger attached, i don't even get past our loading screen. It crashes in qcdx9um8960.dll.
    Note: I have not verified that, if this was the case with 5.3.7 aswell. I read somewhere, that that's "normal" ... true?


    2) And most important: Some time during gameplay, the game crashes:
    Code (csharp):
    1. Exception thrown at 0x66C356C5 (UnityPlayer.dll) in Sniper Ops 3D.exe: 0xC0000005: Access violation reading location 0x00000000.

    The callstack leads me to AnimationCurve.h/cpp:
    Code (csharp):
    1.  
    2. >    UnityPlayer.dll!AnimationCurveTpl<float>::IsValid() Line 177   C++
    3.    UnityPlayer.dll!AnimationCurveTpl<float>::Evaluate(float curveT, AnimationCurveTpl<float>::Cache * cache) Line 518   C++
    4.    UnityPlayer.dll!Build3DLine(LineVertex * outVertices, const LineParameters & params, const math::float4x4 & toCam, const math::float4x4 & toWorld, const math::float3_storage * inVertices, unsigned int vertexCount) Line 302   C++
    5.    UnityPlayer.dll!TrailRenderer::RenderGeometryJob(DynamicVBOGeometryJobData * jobData, unsigned int index) Line 437   C++
    6.    UnityPlayer.dll!JobQueue::Exec(JobInfo * info, int tag, int count) Line 391   C++
    7.    UnityPlayer.dll!JobQueue::Steal(JobGroup * group, JobInfo * info, int tag, int count, bool exec) Line 565   C++
    8.    UnityPlayer.dll!JobQueue::WaitForJobGroup(JobGroupID gid, bool execMain) Line 1345   C++
    9.    UnityPlayer.dll!CompleteFenceInternal(JobFence & fence) Line 27   C++
    10.    UnityPlayer.dll!GeometryJobTasks::PutGeometryJobFence(GfxDevice & device, unsigned int index) Line 51   C++
    11.    UnityPlayer.dll!GfxDeviceWorker::RunCommand(ThreadedStreamBuffer & stream) Line 709   C++
    12.    UnityPlayer.dll!GfxDeviceWorker::Run() Line 348   C++
    13.    UnityPlayer.dll!GfxDeviceWorker::RunGfxDeviceWorker(void * data) Line 315   C++
    14.    UnityPlayer.dll!Thread::RunThreadWrapper(void * ptr) Line 38   C++
    15.    UnityPlayer.dll!win32::CreateThread::__l18::<lambda>(Windows::Foundation::IAsyncAction ^ __formal) Line 276   C++
    16.  
    Now I know Unity changed the trail renderer. But how would you guys read the call stack: Is the issue related to the animation curve, the trail renderer or is it because of the job system?

    It crashed where we animate a property of a trail renderer. It also crashes on other occasions, but I don't have callstacks for that yet.


    EDIT: I forgot to mention, that the error does NOT occur every time. That's why it makes me think it's the Job-system ... what's the Steal about?
     
    Last edited: Jan 13, 2017
  2. mr_zog

    mr_zog

    Joined:
    Jan 21, 2014
    Posts:
    165
    Let me report another observation: Is it possible, that the new job system produces heavy hickups from time to time?
    My feeling is, that the heavier it is, the higher the chance of the phone crashing.
    As soon as I notice one of these hickups, I am certain, that the game will crash soon ... it's just a feeling for now. No evidence.
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,683
    Have you ever reproduced it crashing on PC, or has it only ever crashed on a phone?
     
  4. mr_zog

    mr_zog

    Joined:
    Jan 21, 2014
    Posts:
    165
    I only observed the crash on the noted windows phone 8.1.
    I tested on Win 10 and Win 10 mobile aswell, but it never occured there ... what lead me to the conclusion, that it's the job system again and maybe dual core related.

    I removed the animated property (size) from the trail renderer and the crash has not occured anymore. It could be luck, but before it crashed around every 3rd time, and now we tested about 60 sessions without trouble.

    As a release is nearing, I currently don't have the resources to create a repro case or revert back to the non-working version.

    According to the stack trace: what do you think is causing the exception?
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,683
  6. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    137
    Any possibility of a reproduction project for testing with. We think we have a fix which is currently being implemented on 5.5 and should be ready for internal testing next week.
     
  7. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    137
    In this case : the rendering needs some data which is generated by a job and it is synchronising to the job in order to get the correct and up to date data. The Steal is just the naming convention that is used in this instance where a job system synchronisation ends up running the actual job (because the job hasn't completed yet).