Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdi01/gdi02: Lua exception "LoadPassenger requires the passenger to be idle" at mission start #21156

Closed
shihan42 opened this issue Oct 26, 2023 · 2 comments · Fixed by #21076
Closed
Labels
Milestone

Comments

@shihan42
Copy link

Issue Summary

At the start of gdi01 and after a few seconds in gdi02, a lua exception is thrown.
"LoadPassenger requires the passenger to be idle."

throw new LuaException("LoadPassenger requires the passenger to be idle.");

It is called through

https://github.com/OpenRA/OpenRA/blob/a3c0cee2ccc43d7d04e4a48e91af249be6b2ecdd/mods/cnc/scripts/campaign.lua#L36C9

The actor in question is the MCV. I stepped through with the debugger and found the CurrentActivity to be OpenRA.Mods.Common.Traits.Mobile.LeaveProductionActivity. That leads to IsIdle == false, which triggers the exception.

I tried to edit the script and explicitly stop the activity, but it didn't work.

ReinforceWithLandingCraft = function(player, units, transportStart, transportUnload, rallypoint)
	local transport = Actor.Create("lst", true, { Owner = player, Facing = Angle.North, Location = transportStart })
	local subcell = 0
	Utils.Do(units, function(a)
		local newUnit = Actor.Create(a, false, { Owner = transport.Owner, Facing = transport.Facing, Location = transportUnload, SubCell = subcell })
		-- immediately stop the actor
		newUnit.Stop()
		-- throws regardless
		transport.LoadPassenger(newUnit)
		subcell = subcell + 1
	end)

Disclaimer: I'm using the Gold Edition ISOs.

Reproduction

  1. Compile a3c0cee
  2. Start mod cnc
  3. Start singleplayer missions gdi01 or gdi02

Expected behavior

  1. ReinforceWithLandingCraft creates units without a current activity.
  2. The lua exception does not rise.
@shihan42 shihan42 added the Bug label Oct 26, 2023
@PunkPun
Copy link
Member

PunkPun commented Oct 26, 2023

Thanks for the report. The issue is known and already has a fixed lined up #21076

@shihan42
Copy link
Author

Ah, that's great :)

Sorry that I didn't search for existing pull requests, only for existing issues.

@abcdefg30 abcdefg30 added this to the Next Release milestone Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants