satisfactorymodding / satisfactorymodding/SatisfactoryModLoader

PIE crashes on levels with pre-placed buildings unless game state is a subclass of `AFGGameState`

Open
#381 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
344
Forks
225
PR merge metrics
No merged PRs in 30d

Description

Try to play in editor in ExampleLevel, expect a crash on this line: https://github.com/satisfactorymodding/SatisfactoryModLoader/blob/476dd90a033cd17aea0c1064e6802f01127d7390/Source/FactoryGame/Private/Buildables/FGBuildable.cpp#L324

Suggested workaround: modding edit that makes the cast not checked, and adds checks where gameState gets used.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash in the editor using ExampleLevel, then inspect Source/FactoryGame/Private/Buildables/FGBuildable.cpp around line 324 and trace how gameState is used. The fix is complete when levels with pre-placed buildings no longer crash when the game state is not an AFGGameState subclass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, unreal-engine
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.