[Bug] Building Starter Game in Release mode cause AI to not show up in game. Version 1.1.0

I build the Starter Game in several different modes to see if the behavior of the standalone game are the same between Release, Performance, and Profile. Performance and Profile works fine. Release mode seem to have a bug where AI does not spawn. I delete the files in BinTemp and rebuild 3 times, and still got the same bug. Looks like Release doesn’t generate error log, other than the boot up sequence. I a curious if you can recreate this bug.

Reproduce Steps

  1. Build and package Starter Game in Release mode.

  2. AI doesn’t spawn in game.

  3. AI do spawn in game when built with Performance and Profile mode.

Hi @timber3,

There’s a bit more process involved for Release builds. Release builds require compiled pak assets (including shaders) and you’ll need to take some steps to provide those. Fortunately those steps are outlined in this doc: http://docs.aws.amazon.com/lumberyard/latest/userguide/game-build-release.html.

The key thing to note with that doc is that it uses SamplesProject as an example. Adapting it to StarterGame is pretty straightforward though. What you’ll want to do is create copies of the bat files it requests you to run for StarterGame. In those bats you’ll want to change the references to SamplesProject to StarterGame. You could parameterize the game name alternatively as well.

The doc also lists disabling Asset Processor as an optional step 5. I’d recommend taking that step.

Let me know if you have additional questions here!

Yep, I am well aware of what you just wrote. Have you try to build the Starter Game in Lumberyard 1.10? I assumed that you have and didn’t encounter this problem, because it is ridiculous to comment on a potential bug without actually trying to reproduce it. I’ll upload the 3 versions of Starter Game that I built on Google Drive and update this post with a link when it is done.


The package Starter Game link is here (Project Link). There are 3 different builts: Release, Performance, and Profile. The Release binary has the issue that Performance and Profile do not. These builts are created from the unmodified Lumberyard + Starter Games 1.10. Run it by creating a shortcut with “+map startergame”.

Hey @timber3,

This appears to be a subtle race condition hence the ability for it to fail for some and succeed for others. I’m presently investigating the nature of it. What would be helpful is if, as a workaround, you could change the default value of EnableAISpawning in debugmanager.lua to true and try rebuilding. If possible, it’d be great if you could delete your PAK build directory and build it fresh to eliminate any possibility of noise.

From what I’m seeing, that change does get the AI to spawn consistently. If that works for you it’d put more stock in my current theory. Hopefully that also unblocks you for the time being while a proper fix is worked on. :slight_smile:

Hi @timber3,

Thanks for confirming your build process. Yes, I was unable to reproduce in release mode. I appreciate the upload, I’ll take a look at it. I’ll also try a clean copy and build on a few other machines to see if I can get the repro.

Thank you for looking into it and confirming that this might be an issue on my end. If you find anything please let me know, else I’ll try the build process again when 1.11 get released.

I changed the default value of EnableAISpawning to true in debugmanager.lua and the AI didn’t spawn. I remove all the build related code from debugmanager.lua and the AI now spawn in Release build. Looks like doing both solves the issue.

The two lines I commented out are:

 --if (Config.Build ~= Config.Release) then
Debug.Log("Debug manager enabled");
self.tickHandler = TickBus.Connect(self);
self.performedFirstTick = false;
 --if (Config.Build == Config.Release) then
--res = releaseVal;

Great, thanks for confirming. Glad to hear you have a workaround here as well! I’ll be passing the bug up to our engineering team to implement the proper fix. Thanks for bringing this to our attention and feel free to continue raising other issues to us. We’ll be happy to provide workarounds where possible while permanent fixes are being implemented.