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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

PSDImporter/SpriteSkin: Crash when exiting a build on Windows

Discussion in '2D Experimental Preview' started by HarryCodder, Mar 27, 2019.

  1. HarryCodder

    HarryCodder

    Joined:
    Feb 20, 2015
    Posts:
    82
    Hi,

    We have encountered a problem when using game objects generated with the PSD Importer from a PSB file.
    We use them to animate illustrations, the prefabs are loaded using asset bundles.

    At runtime, the prefabs are instantiated in a hierarchy of RectTransform to be displayed in our UI (not sure if this is relevant for the crash).
    Everything works fine during the lifetime of the application but when we try to exit the application it freezes and must be killed manually.
    There is nothing in the log file noting anything went wrong.

    Only removing the instantiation of these prefabs in our code prevent the crash from happening.
    Note that this only happen on Windows builds, MacOS builds were fine.
    I think the crash does not occur when no Animator is attached but it might just occur less.

    The instantiated game objects do not need to be displayed when the application is exited for the crash to occur.
    As long as it's been instantiated once, the crash will occur, even if the instantiated game objects have been destroyed.

    I've already spent quite some time trying to reproduce the problem in a minimal bug report, using the same assets, but without success. The bug seems to only occur in very specific conditions and timing might be a factor. I recently lacked time to investigate further but it looks like some kind of race condition to me.

    We're using the latest 2018.3 version.

    If you have or need any information, this would be much appreciated.
    Thanks in advance.
     
    AcademyOfFetishes likes this.
  2. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    595
    Could you please submit a bug report with a simple project with the workflow? That would help us investigate better.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,326
    Could you please submit a bug-report as described in this document:
    https://unity3d.com/unity/qa/bug-reporting

    It's important that you report these issues together with a reproduction project if you want them to get fixed. If you don't do it, it might be a long time until someone else reports them or until Unity Technologies find them.

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. You can post the Case number (number only, not the link) in this forum thread for Unity staff to pick up, in case they see it.
     
  4. HarryCodder

    HarryCodder

    Joined:
    Feb 20, 2015
    Posts:
    82
    Yes, I'm used to do bug reports and I usually like to make them as small as possible but as I said this one is tricky to reproduce when starting a project from scratch.
    I can't just upload our whole project because it would not work outside our work environment (and is quite big anyway).
    I started to rework our project, gradually removing stuff while keeping the crash reproductible but it will take me some more time to finish this.

    I was mainly posting here to gather information if anyone had the same problem and maybe found a cause or some workaround.

    Anyway, thanks for your replies.
     
  5. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219
    I think I have the same issue. For the first time ever, someone played my game for over an hour. At that point, 88% of their physical memory was used up. If you and I are getting the same problem, you might also have a memleak.

    Anyway, there is a plugin you can get to turn your scene into its own project. Maybe you can do that to submit it? More info here: https://bitbucket.org/Unity-Technologies/repro-project-wizard

    Unity Devs: I'm happy to submit my own project with the bug, but my game is NSFW and so are my art assets. They're clothed, but there's nudity under the clothing layers.
     
  6. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    165
    No worries about NSFW; it's for work purposes so it'll be fine with us. Just make sure to post a link to the issue here so we can be sure the ones to handle the bug from the start.
     
  7. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219
    I'm uploading a project now, but this is taking forever. Literally over an hour. I think it's uploading my 1+ gig library directory with everything. Is there a way to avoid that so this takes less time?
     
  8. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219
  9. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    165
    AcademyOfFetishes likes this.
  10. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    I have the same bug in Windows Editor, can you share a workaround please if possible? Thanks
     
  11. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219
    Can you tell me how to upload a smaller bug report next time? This literally took 1.5 hours to upload, and I was afraid to use Unity while it was happening, so I lost 1.5 hours of a day doing this. Most of the size was in the Library directory, but if I delete that, I'm pretty sure Unity is just going to recreate it before I submit the bug.
     
  12. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    I need an ETA of a fix if possible please..
     
  13. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    595
    I believe you could zip the project without Library folder and attach to the bug report.

    Thanks. Will take a look and will update this thread.
     
    KhyC and AcademyOfFetishes like this.
  14. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    This is fixed in 2019.1.0f2 and the new previews
     
  15. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    No its not fixed. It works in some cases and doesnt in other cases.
     
  16. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    595
    We believe we have fixed the issue and are currently testing it. Will reply this thread once we have an update.
     
  17. zeknurn

    zeknurn

    Joined:
    Dec 6, 2018
    Posts:
    1
    Any updates regarding this? We're experiencing it in 2018.3.8 and in 2019.1.3 after upgrading.
     
  18. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    415
    Hi, this should be fix in animation for v2.1.0-preview.5 for 2019.1