Search Unity

Operation has failed with error 0x80070057

Discussion in 'Windows' started by unitynewb, Sep 20, 2013.

  1. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    243
    I have been working on porting my app from Android to Windows 8 Phone and ran into a blocking issue:

    Usually when I experience a crash I use the WP Power tool to pull the Unity log and look for debug.log lines I add to debug the issue.

    I ran into a situation where the game is crashing at random points and can't pinpoint why. The error I receive in the log is:
    Code (csharp):
    1.  
    2. Error: Operation has failed with error 0x80070057: The parameter is incorrect.
    3.  
    4. (Filename: C:/BuildAgent/work/cac08d8a5e25d4cb/PlatformDependent/MetroPlayer/HandleSystemError.cpp Line: 19)
    5.  
    I do not get this at the same line every time so its hard for me to tell why. The game will continue for a couple of frames after this then crash.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Could you try going to project properties -> debugging and select it to use the native debugger, then enable all exceptions under Debug -> Exceptions and try running it again? When exception is thrown, visual studio will stop and let you inspect the stacktrace. It would be helpful if you could paste it here.
     
  3. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    243
    I figured it out by breaking one of my functions apart until I couldn't reproduce the error. The problem was I had a WWW(url) call that I wasn't even using anymore, I just still had it there from when the game was a web game. At the time the URL was an actual hyperlink and now it is a link to a Resource folder. Android and Iphone didn't have a problem with it I guess, but it will crash the Windows Phone.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    That is a known bug and will be fixed in 4.3. You can get around it by passing non escaped URL to WWW constructor on Windows Phone.
     
  5. nikescar

    nikescar

    Joined:
    Nov 16, 2011
    Posts:
    165
    Sorry for the noobishness but can you give an example of an escaped and a non-escaped url?
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Escaped:

    Code (csharp):
    1. file:///D:/Downloads/$%23@/dasd%20ddd/
    Non-escaped:

    Code (csharp):
    1. file:///D:/Downloads/$#@/dasd ddd
     
  7. callum.NET

    callum.NET

    Joined:
    Aug 22, 2013
    Posts:
    7
    I would like some more details on how to fix this. Is it worth creating a new thread?
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Depends. Is it crashing on WWW class as well?
     
    ShunyaFukuda likes this.