Search Unity

Application freeze under Linux if system time is changed

Discussion in 'Editor & General Support' started by magnetica, Oct 17, 2014.

  1. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    my simple application freeze if I change the system time and decrease it by 1 hour.
    no errors, no crash, nothing in my log.. only freeze.
    cpu is 0% but I cannot click nor close app window.
    it's very urgent!
    next week every machine change automatically system time due to daylights saving time!

    thanks
     
  2. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    other experiments.
    a simple project with some GUI labels freeze.
    it freeze only if I take my time 1 hour before now, not after!
     
  3. Aurore

    Aurore

    Director of Real-Time Learning

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    What OS?
     
  4. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    on my VM with Ubuntu 12, i have Always the problem.
    on a physical machine with XUbuntu, i have the problem only if I have the code inside an external DLL

    Create a new project.
    insert this code (decalring variables before..):

    void OnGUI()
    {

    GUILayout.BeginArea(new Rect(10, 30, 100, 20));
    GUILayout.BeginHorizontal();
    GUILayout.Label("Server dati", style);
    GUILayout.EndHorizontal();
    GUILayout.EndArea();

    GUILayout.BeginArea(new Rect(10, 50, 100, 20));
    GUILayout.BeginHorizontal();
    GUILayout.Label("Server files audio", style);
    GUILayout.EndHorizontal();
    GUILayout.EndArea();

    GUILayout.BeginArea(new Rect(10, 70, 100, 20));
    GUILayout.BeginHorizontal();
    GUILayout.Label("Login", style);
    GUILayout.EndHorizontal();
    GUILayout.EndArea();

    GUILayout.BeginArea(new Rect(10, 90, 100, 20));
    GUILayout.BeginHorizontal();
    GUILayout.Label("Password", style);
    GUILayout.EndHorizontal();
    GUILayout.EndArea();

    serverDati = GUI.TextField(new Rect(120, 28, 250, 20), serverDati);
    serverFiles = GUI.TextField(new Rect(120, 48, 250, 20), serverFiles);
    login = GUI.TextField(new Rect(120, 68, 250, 20), login);
    password = GUI.PasswordField(new Rect(120, 88, 250, 20), password, "*"[0]);


    if (GUI.Button(new Rect(390, 88, 100, 20), "LogIn"))
    {

    }

    }


    the project build for Linux x86 under my VM, freeze if I change system time decreasing just 1 second!

    on phisical machine I don't have this problem.
     
    Last edited: Oct 17, 2014
  5. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    What happens if you close Unity, change the time and restart Unity?
     
  6. Mabenan

    Mabenan

    Joined:
    Feb 7, 2014
    Posts:
    132
    Hm it seems that this is a problem with the vm have you searched specific for time change problems with you vm software.
     
  7. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    It's not a VM problem because i have the same error on a physical hw.

    I'm not using unity in linux but a small test project build for linux
     
  8. Mabenan

    Mabenan

    Joined:
    Feb 7, 2014
    Posts:
    132
    oh sorry then i have misunderstood the last line of your post
     
  9. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Hopefully users will not change system time, just leave the system to report a different timezone.
     
  10. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Hi Magnetica,

    I've been looking at this for the past few days, and I wanted to give you a quick update of my progress, and also to share information in case you've found some things that I haven't.

    So the three projects I've been looking at are:
    - A simple kart project I have on my machine which I use for general testing
    - case-645788-UPVC (The full 'UPVC' project you submitted to fogbugz)
    - case-645788-forum (The minimal code fragment you posted in this thread)

    5.0.0b11, Ubuntu 14.04 64bit, kart = no freeze
    4.5.5p1, Ubuntu 14.04 64-bit, case-645788-UPVC = freeze
    4.5.5p1, Windows 8.1, case-645788-UPVC = no freeze
    5.0.0b11, Ubuntu 14.04 64bit, case-645788-forum = no freeze
    5.0.0b11, Ubuntu 14.04 64-bit, case-645788-UPVC = could not compile / run due to these errors:
    Invalid serialized file version.
    The asset bundle can't be loaded because it was not built with the right version or build target.

    I was just curious what you have tested, in particular if:
    - The code fragment you posted in this thread freezes on your machine, because I can't reproduce it
    - Have you reproduced it on 5.0 beta by any chance?
    - Have you tested any other combination of Unity version/OS/project which I haven't which might offer a clue to a minimal repro case?
    - Do you have any information about where it hangs exactly (e.g. is it definitely in Unity code, and were you able to see a callstack at all?)

    I'm probably going to test 4.5.5p1 + Ubuntu 14.04 64bit, case-645788-forum next.

    Dave
     
  11. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    Hi Dave,
    thanks for your time.

    i haven't tested my SW with 4.6b or 5.0b because i'm working only with last stable and complete version of unity.
    i've found this problem from version 4.3.x

    the code posted in this forum it's only a simple example and it freeze if you run the build in a vmware virtual machine.
    it doesn't freeze on a physical machine.

    the UPVC project freeze with both VMs and physical hardware.

    i've tested my full project on different hardware and 3 build of ubuntu: 12, 13 and xubuntu.
    the same result on each build.

    i've made a simple project with the code posted before.
    I can send you the zipped folder if you want.

    please send me a private message.
    otherwise I could upload the file here.

    let me know.

    thanks again for your support

    Emiliano
     
  12. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    my project needs to synch the local time with a remote server time.
    ..and.. i think a player cannot stop playing because his PC is setting a wrong system time.
    isn't it?
     
  13. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Yep confirmed the repro from the forum doesn't freeze in 4.5.5p1 (on a physical Ubuntu box)

    5.0.0b11, Ubuntu 14.04 64bit, kart = no freeze
    5.0.0b11, Ubuntu 14.04 64bit, case-645788-forum = no freeze
    4.5.5p1 + Ubuntu 14.04 64bit, case-645788-forum = no freeze
    4.5.5p1, Ubuntu 14.04 64-bit, case-645788-UPVC = freeze
    4.5.5p1, Windows 8.1, case-645788-UPVC = no freeze

    Now to figure out what the difference is between case-645788-forum and the full case-645788-UPVC project which causes a freeze (have you done this yet Emiliano by any chance?)
     
  14. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Hi Emiliano,

    So, if I commented out the asset bundle load, and case-645788-UPVC doesn't freeze, so I'm guessing the cause of the freezing on time switch is related to something in that bundle.
    What happens if you remove all code in that bundle and run on (a real) Ubuntu machine?

    Dave
     
  15. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    hi,
    the strange things is:
    - only the code in my loader project (the UPVC project i've sent you) without the asset bundle, no freeze.
    - only the code in the asset bundle compiled as a separate build, no freeze
    - the loader that execute the code in the asset bundle, freeze

    but.. the loader project has only few lines of code that load the asset bundle and runs all the application logic.
    all the code is in the asset budle.
    so.. why it doesn't freeze if I compile a build with the code in the asset bundle?
    the application runs and it's fully functional.
    the loader is necessary for autoupdate.
    during Runtime I download a new assetbundle and send a message to the load application that dispose the running bundle and load the new one, so the application is the new version.

    I can't install a new clean version of Ubuntu because I have about 500 running installation.
    i'm making experiments with a physical machine with xubuntu 14.04 and a VM with Ubuntu 12.10, but almost all installation are running with xubuntu 12.04

    another strange thing..
    the project uploaded in this forum freeze on my VMs but not on my physical machine.
    i think the problem is the user interface, because this project has no assetbundle or code but only few textboxes.

    what do you think about?
     
  16. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    Hi Dave,
    any news for me?
    have you tried the uploaded project?
    (I forgot to save file in the previous post..)
     

    Attached Files:

  17. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    What happens if you load the Asset Bundle but don't execute any code in it, does it still hang?

    Is it basically the case that the freeze (on the actual Linux PC) is the combination of three things?
    - Running on Linux (or Ubuntu x64 at the very least)
    - Loading an asset bundle
    - Executing code from that asset bundle

    In that case I think the previous bug report (which is currently assigned to the linux devs) may not be enough because they would need to actually modify the code in the asset bundle to identify the cause...

    Perhaps it would be better to have a bug report like this:
    - Here is the source to build the asset bundle, with instructions
    - Here is the source to build the application (with instructions where to put the asset bundle, if not automatic)
    - Instructions for how to repro the hang

    Also, I think the other issue (the freeze on the VM) may well be a separate issue, so it might be worth making a separate bug report for that one (they could always be duped against each other if they turn out to be the same thing...)
     
  18. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    thanks Dave.
    so.. how can I send you the sources? I cannot publish all files here because the SW is protected by copyright..
    can I send them with a PM or something else?

    thanks

    Emiliano
     
  19. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Will they fit in a fogbugz report maybe?
     
  20. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    I have already sent the project loader using fogbuz.
    I cannot send the code in assetbundle because I compile the bundle using shell.
    I can send you a zipped file with all the code in that folder and instructions.
     
  21. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Hi Magnetica,

    Please add the code and the instructions for how to build everything from scratch to a fogbugz report.
    If you can edit or add to the existing fogbugz report then go ahead and do that. If you can't then by all means make a new fogbugz report, post the new fogbugz ID here and I will link the two together.

    Cheers,
    Dave
     
  22. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    i have tried with the final 4.6 release but it freeze.
    i've also used the test project "test_orario" because the syntoms are the same, but it freeze only on a VM.
    cleaning the prject step by step we finally have a running version.
    i think there is something with the user interface.
    maybe when the time is changed the player reset/restart the UI or something else..
    the running version seems to have a little delay and loose the focus.
    maybe it could be interesting for you.
    i've opened a new fogbuz case
    Case 651520

    let me know

    thanks
     
  23. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    Hi Dave!
    i've discovered something very interesting!
    you can replicate it on full project and "test_orario".
    when the application freeze, if you wait the same amount of time you have subtracted, the application restart to work.
    so.. if you sibtract 1 minute, you have to wait 1 minute and it runs again.
    so.. it's not a problem of my code but something connected with Linux/unity events, maybe awake or start event.
    let me know it you can replicate.

    thanks
     
  24. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
  25. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Ok so just clarify the current situation:

    So I suspect we might be dealing with two bugs masquerading as one. One happens on an VM and one happens on a real Ubuntu box. It's possible they are different manifestations of the same bug, but let's treat them as separate for the time being.

    You submitted 645788 (which happens on a real Ubuntu install), but you haven't yet sent us the source code to upvc0057.bin asset bundle. I think previously I suggested making a new report, because there's no way that I know of to add files to an existing bug report. (Although you could use a file sharing service if you are comfortable with that.)
    I did reproduce 645788 on my machine but I'm pretty sure that if I commented out the load of upvc0057.bin the freeze went away, which I found suspicious, which is why I suggested adding the source code to upvc0057.bin. I sent it to the dev team to investigate and they couldn't reproduce it, which is odd. It's now at QA to try and reproduce it there.

    You've sent 651520 (which you say only happens on a VM). This doesn't seem to have any asset bundle loading. It hasn't yet been processed by QA. Do you want me to investigate both 645788 and 651520, or is 645788 more important (i.e. is your app going to be run on an Ubuntu VM or on a real machine, or both?)

    Which should I start looking at first?
     
  26. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    You just hit reply to the email that tells you the case number and add a file to it.
     
  27. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    hi,
    thank you for your answers.
    tomorrow i'll send you all the code included in asset bundle.
    about opened tickets, the final product must run on a real machine, so the first bug is more important, but..
    I've made a third sample project including in the asset bundle only the code that create the UI and I have the same result like the second one (651520).
    the ticket 651520 is about a very simple project, and I think it contains the root of the real problem, so maybe you could start with the ticket 651520.

    i'll send you the asset bundle code, anyway.. so you have all elements to investigate.
    (tomorrow, because it's midnight in italy)

    thanks

    Emiliano
     
  28. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Ok so to clarify, the first bug (645788, real machine) is more important to you, but you want me to start looking at 651520 (VM only) first because it's a simpler repro case?
     
  29. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    yes, please.
    I'm ready to send you the asset bundle.
    how can I share you a private link?
     
  30. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    If you could reply to the fogbugz email with the information, and attach it, that would be great
     
  31. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    mail sent.
    thanks
     
  32. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Sorry for the delay, I've been pretty busy, but I found some time today to reproduce 651520 on VirtualBox.
    It did reproduce for me so I've processed the bug and assigned it to the Linux team
     
  33. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    GREAT!!
    let me know
     
  34. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    hi,
    any news about 651520 ticket?
    thanks