Search Unity

Crash with no console output, get stack trace?

Discussion in 'PSM' started by mbowen89, Jul 14, 2014.

  1. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    So I have been experiencing crashes, and I really think it has to do with ngui, and using setactive on the gameobjects that have the buttons etc to control my gui.

    I've read somewhere that it was an error introduced in 4.3.4 which happens to be what PSM version uses... something to do with disabling during button animations or something.. but I tried to turn off anything like that that I could.

    I guess my main question is, since the console output literally just shows the fps line as the last output, I have no idea what the crash was caused by. Can I get a stack trace or anything out of the vita to see in more detail what exactly made it crash?

    Thanks for any help!
     
  2. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    I have OnGUI code on objects that are set active, works fine for me, i don't use NGUI however, is it psm compatible? A nice way to figure it out is do a simple scene, add each section on bit by bit to narrow it down, example, nothing else in scene, but ngui code, does it crash? no, try something adding something else :)
     
  3. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Is there no way to get an actual stack trace so I can see what caused the error?
     
  4. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    There's the console output feature in PSM tools (sounds like your using that one?), and an EXE that is more advanced than that, I believe turning on 'intermediate' in the build settings gives more info on console outputs. Theres a thread around somewhere, or the unity PSM script wiki that has more info on the Exe, a combination of that and the intermediate build should help, can't look for links, currently on iphone in bed haha, hope that helps :)
     
  5. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    The PSM tools console seems to be the same as "PsmDeviceForUnity.exe -get_log". Unless it creates a nice error, I don't see it. Basically probably because the game crashes and comes up with the "PSM Dev Assistant for Unity" has an error. It crashes the entire devassistant app the game is running in. I need a deeper log output I guess.
     
  6. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
  7. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    Oh, try this:
    Origional:
    Code (CSharp):
    1. foreach (Transform level in levels.transform) {
    2.    level.gameObject.SetActive(false);
    3. }
    New:
    Code (CSharp):
    1. foreach (Transform level in levels.transform && levels) {
    2. if(level){  level.gameObject.SetActive(false); }
    3. }
    If it was trying to hide an object before or was trying to find one to hide, but it cannot because its not there (hidden).
    Add a check to make sure the objects are true/shown before trying to hide and find it… hard for me to explain but give that a shot :)
     
  8. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    I don't pretend to understand everything that NGUI does behind the scenes, but I think I "fixed" my issue...

    When NGUI creates a "drawcall" it might make several. It creates a gameobect with a renderer for this drawcall, and it likes to use setactive on them if they aren't needed or something like that. If I have it just disable the renderer on that "drawcall" instead of setting it to active false, it doesn't crash.

    In Unity 4.3 for some reason, it doesn't like to disable something, and that link I posted last seems to be what I just fixed, perhaps.
     
  9. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    Congrats :)
     
  10. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Literally a 12 hour day to figure that one out... geesh! Ready to rock and roll the publishing today though!! :D


    Still would like to know if someone can tell me if I can get better error output from the Vita...