Search Unity

Error during "Minimizing javascript code"

Discussion in 'Project Tiny' started by tomny, Jan 24, 2019.

  1. tomny

    tomny

    Joined:
    Sep 12, 2015
    Posts:
    16
    I dont have any errors but when I build, I get these errors. Anyone had this error before or know how to solve?
    says that its a memory issue but I have plenty of memory for it. Tried restarting unity, and my pc, but still having this error


    Idle process detected. See console for more details.
    UnityEngine.Debug:LogError(Object)
    Unity.Tiny.TinyShell:WaitForProcess(Process, StringBuilder, Int32) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/TinyShell.cs:294)
    Unity.Tiny.TinyShell:RunInShell(String, ShellProcessArgs) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/TinyShell.cs:190)
    Unity.Tiny.TinyShell:RunTool(String, String[]) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/TinyShell.cs:71)
    Unity.Tiny.TinyHtml5Builder:GenerateHTML(TinyBuildOptions, TinyBuildResults) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/HTML5/TinyHTML5Builder.cs:941)
    Unity.Tiny.TinyHtml5Builder:Build(TinyBuildOptions, TinyBuildResults) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/HTML5/TinyHTML5Builder.cs:68)
    Unity.Tiny.TinyBuildPipeline:Build(TinyBuildOptions) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/TinyBuildPipeline.cs:354)
    Unity.Tiny.TinyBuildPipeline:BuildAndLaunch() (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/TinyBuildPipeline.cs:243)
    Unity.Tiny.ExportOnPlay:HandlePlayStateChanged(PlayModeStateChange) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/ExportOnPlay.cs:30)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


    Exception: Tiny: #
    # Fatal error in , line 0
    # API fatal error handler returned after process out of memory
    #
    Unity.Tiny.TinyShell.RunInShell (System.String command, Unity.Tiny.ShellProcessArgs args) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/TinyShell.cs:217)
    Unity.Tiny.TinyShell.RunTool (System.String name, System.String[] args) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/TinyShell.cs:71)
    Unity.Tiny.TinyHtml5Builder.GenerateHTML (Unity.Tiny.TinyBuildOptions options, Unity.Tiny.TinyBuildResults results) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/HTML5/TinyHTML5Builder.cs:941)
    Unity.Tiny.TinyHtml5Builder.Build (Unity.Tiny.TinyBuildOptions options, Unity.Tiny.TinyBuildResults results) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/HTML5/TinyHTML5Builder.cs:68)
    Unity.Tiny.TinyBuildPipeline.Build (Unity.Tiny.TinyBuildOptions options) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/TinyBuildPipeline.cs:372)
    Unity.Tiny.TinyBuildPipeline.BuildAndLaunch () (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/TinyBuildPipeline.cs:243)
    Unity.Tiny.ExportOnPlay.HandlePlayStateChanged (UnityEditor.PlayModeStateChange change) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/ExportOnPlay.cs:30)
    UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:302)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

     
  2. tomny

    tomny

    Joined:
    Sep 12, 2015
    Posts:
    16
    Just got this error too..

    Exception: Tiny: FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScript heap out of memory
    1: node_module_register
    2: v8::internal::FatalProcessOutOfMemory
    3: v8::internal::FatalProcessOutOfMemory
    4: v8::internal::Heap::MaxHeapGrowingFactor
    5: v8::internal::AccountingAllocator::ClearPool
    6: v8::internal::AccountingAllocator::ClearPool
    7: v8::internal::AccountingAllocator::ClearPool
    8: v8::internal::AccountingAllocator::ClearPool
    9: v8::internal::GCTracer::TotalExternalTime
    10: v8::internal::GCTracer::TotalExternalTime
    11: v8::internal::AccountingAllocator::ClearPool
    12: v8::internal::AccountingAllocator::ClearPool
    13: v8::internal::AccountingAllocator::ClearPool
    14: v8::internal::ScavengeJob::operator=
    15: v8::internal::ScavengeJob::operator=
    16: v8::internal::ScavengeJob::operator=
    17: v8::internal::Factory::NewFillerObject
    18: v8::internal::wasm::WasmOpcodes::TrapReasonMessage
    19: 0000021386C043C1
    Unity.Tiny.TinyShell.RunInShell (System.String command, Unity.Tiny.ShellProcessArgs args) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/TinyShell.cs:217)
    Unity.Tiny.TinyShell.RunTool (System.String name, System.String[] args) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/TinyShell.cs:71)
    Unity.Tiny.TinyHtml5Builder.GenerateHTML (Unity.Tiny.TinyBuildOptions options, Unity.Tiny.TinyBuildResults results) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/HTML5/TinyHTML5Builder.cs:941)
    Unity.Tiny.TinyHtml5Builder.Build (Unity.Tiny.TinyBuildOptions options, Unity.Tiny.TinyBuildResults results) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/HTML5/TinyHTML5Builder.cs:68)
    Unity.Tiny.TinyBuildPipeline.Build (Unity.Tiny.TinyBuildOptions options) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/TinyBuildPipeline.cs:372)
    Unity.Tiny.TinyBuildPipeline.BuildAndLaunch () (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Export/TinyBuildPipeline.cs:243)
    Unity.Tiny.ExportOnPlay.HandlePlayStateChanged (UnityEditor.PlayModeStateChange change) (at Library/PackageCache/com.unity.tiny@0.13.4-preview/Editor/Utility/ExportOnPlay.cs:30)
    UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:302)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


    Maybe it is a memory problem but I'm not sure how to fix it
     
  3. tomny

    tomny

    Joined:
    Sep 12, 2015
    Posts:
    16
    I found out that this error happened because I was using 2 hi resolution images, but I couldnt find a fix besides scaling the images down
     
  4. tomny

    tomny

    Joined:
    Sep 12, 2015
    Posts:
    16
    My game relys on a lot of pictures so I keep getting this error and I don't know how to fix it
     
  5. raymondyunity

    raymondyunity

    Unity Technologies

    Joined:
    Apr 30, 2018
    Posts:
    97
    How large were these images? Resolution and size wise.
     
  6. Zoelovezle

    Zoelovezle

    Joined:
    Aug 7, 2015
    Posts:
    54
    It must be 2048 i had same error for that resolution while exporting . Had to lower to 512 and yah didn't checked for other resolutions
     
    raymondyunity likes this.
  7. Antonia-Chimp

    Antonia-Chimp

    Joined:
    Apr 1, 2019
    Posts:
    11
    Hey ! I ran into that problem too. I tried to minimize my pictures as well and it worked but still my html file is huge. its around 18 MB! Even if I take out most of the big assets I still get a html file with 17 MB! I dont know how I can reduce the file size more.
     
  8. reallyhexln

    reallyhexln

    Joined:
    Jun 18, 2018
    Posts:
    69
    Which compression do you use for your images? In my experience, using jpeg compression has significant impact to resulting size of game bundle.
    Any other resources like a sounds, fonts, videos are not affected by high compression.
    Also, you can try to disable all unused modules, but it probably do not lead to big changes in bundle size. Anyway, I got about 300 kb when I was made it.
     
  9. Antonia-Chimp

    Antonia-Chimp

    Joined:
    Apr 1, 2019
    Posts:
    11
    Thanks ! I found out that my audio file was huge and was able to reduce my filesize to 5MB. Using JPG compression 75%
     
    reallyhexln likes this.