Android Project too large to build 4-architecture .apk?

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Pineapple Lake, Sep 29, 2019.

  1. Pineapple Lake

    Pineapple Lake Member

    Joined:
    Aug 25, 2016
    Posts:
    96
    Hi guys,

    I'm currently on the 2.2.4 beta (IDE+runtime) and building projects in Android YYC for API 28.

    I've built several apk's for single architectures and they all work fine.

    However, when I build Android YYC for all 4 architectures at the same time (Armv7, x86, Arm64, x86_64) this results in the following error:

    Code:
    Writing all stuff etc...
    
    ClangExeLocation=C:\Users\Tim\AppData\Local\Android\Sdk\ndk\20.0.5594570\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe
    Using NDKDir = C:\Users\Tim\AppData\Local\Android\Sdk\ndk\20.0.5594570
    Using PlatformDir = C:\Users\Tim\AppData\Local\Android\Sdk\ndk\20.0.5594570\platforms\android-29
    Using ARMToolChain = C:\Users\Tim\AppData\Local\Android\Sdk\ndk\20.0.5594570\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64
    Using X86ToolChain = C:\Users\Tim\AppData\Local\Android\Sdk\ndk\20.0.5594570\toolchains\x86-4.9\prebuilt\windows-x86_64
    Using ARM64ToolChain = C:\Users\Tim\AppData\Local\Android\Sdk\ndk\20.0.5594570\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64
    Using X86_64ToolChain = C:\Users\Tim\AppData\Local\Android\Sdk\ndk\20.0.5594570\toolchains\x86_64-4.9\prebuilt\windows-x86_64
    saving file Y:/Project51_1C03754A_YYC\Project51.droid
    Android NDK: android-14 is unsupported. Using minimum supported version android-16.
    Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 14 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-16. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
    Stats : GMA : Elapsed=59070,4915
    Stats : GMA : sp=951,au=152,bk=0,pt=21,sc=126,sh=0,fo=4,tl=0,ob=565,ro=138,da=0,ex=0,ma=18264,fm=0x60B31D6FF92AB4
    
    
    X://bin/GMAssetCompiler.exe exited with non-zero status (-1073741819)

    If I select a single architecture or combinations of 2 or 3 it builds fine, this only happens when checking all 4...
    Cleaning cache doesn't make a difference...

    Any suggestions? Or should this be filed as a bug?

    EDIT:
    Check my new post in this thread for more info on the problem
     
    Last edited: Oct 5, 2019
  2. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,556
    I'm on Beta Runtime 2.2.4.357, and I can compile a blank project just fine with all 4 architectures selected. Either your SDK is misconfigured, or something specific to your project is stopping the compile. Always verify your setup with a blank project before trying to build anything real.
     
  3. Pineapple Lake

    Pineapple Lake Member

    Joined:
    Aug 25, 2016
    Posts:
    96
    Indeed, I can successfully compile a blank project with all 4 architectures selected...

    Well that means it's project specific...but I find it very strange that I can successfully build all architectures in any combination, as long as it's not all 4 together.
    What would the compiler do different when it builds all 4 together, compared to when building 1,2 or 3?
     
  4. Pineapple Lake

    Pineapple Lake Member

    Joined:
    Aug 25, 2016
    Posts:
    96
    Ok, finally, after hours and hours of trying to pinpoint the problem, I was able to narrow it down to the following:

    Somehow my error is related to the number of object and script files in my project.

    I was able to build an .apk for all 4 architectures after deleting a lot of objects, resulting in the following no. of files:
    -Total resources: 29750 (according to yyz builder)
    -Total files in objects folder on disk: 39002
    -Total project size on disk: 174mb

    So, if I then add a single event containing ANY script to ANY object in my project the build fails, resulting in the error mentioned in my first post.
    After this the no. of files is like this (obviously):
    -Total resources: 29751
    -Total files in objects folder on disk: 39003
    -Total project size on disk: 174mb

    If i then delete ANY event or script the project builds successfully again

    I guess the number of files is too much for the GMAssetCompiler.exe and it runs out of memory or space?

    I tried the following but none worked:
    -Switching to v2.2.3
    -Changing JDK maximum heap size to 8GB
    -Trying to build for different API's (26,27,28,29)
    -Deleting large resources like music, thereby making the project smaller in size
    -Installing SDK and NDK in a different directory
    -Clearing up space on my harddrive (free space is 120gb)
    -Building the project on a different harddrive (free space 600gb)

    I have the following specs:
    -Intel Core i7 8750H
    -16GB DDR4 RAM
    -256GB SSD with 120GB free space
    -Windows 10

    That shouldn't be the bottleneck...

    My questions:
    -Could this indeed be related to my project containing too many files for the GMAssetCompiler?
    -Anyone else with a large project experiencing this problem?
    -Any solutions?

    EDIT 1 (05-10-19):

    I was able to replicate the error in a new project only containing objects

    1. Download and import this .yyz
    2. In Android Options check all 4 architectures
    3. Build for Android YYC
    4. Observe the non-zero exit status error
    5. Clear cache (important!)
    6. Delete one object
    7. Build again
    8. Observe it now builds successfully

    EDIT 2 (07-10-19):

    Yoyo added it to the bug database
    Issue # 31412
     
    Last edited: Oct 7, 2019

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice