Skip to content

If a recipe listed for a factory doesn't exist in the recipes list, entire game hard crashes... #56

Open

Description

@GavJenks

something as simple as recipe: stone, instead of recipe: Stone, for example, can crash the whole game at RUN-time, no less. It happens when you're in the menu and you try to click on the recipe that has no recipe entry for it.

The plugin should simply skip any recipes in the factory's list that cannot be found. Failing that, it could skip the whole factory. Failing that, the whole plugin should sacrifice itself and not run.

Activity

  1. ProgrammerDan commented on Oct 28, 2018

    @ProgrammerDan
  2. GavJenks commented on Oct 28, 2018

    @GavJenks
    Author

    This is on factorymod 2.4.2. It seems like there's some sort of insufficient initial validity check, but then actual runtime has details that the initial check didn't cover and it isn't itself in a try{} block, so it crashes.

    Because the menu DOES show the correct output. For example, I had a crash with make_tnt vs. make_TNT, and the factory menu showed a TNT block as the recipe icon, so it had read some of the details. But it is as if an initial check said "Oh yeah that looks formatted correctly, carry on" and that check was case insensitive, whereas at runtime, it needs case sensitivity. Or something like that.

    Another example was I used Material.NETHER_WART, instead of Material.NETHER_STALK, which caused again the recipe's correct output to show up but a crash when you tried to use it. As if it initially checked formatting but not valid materials, or something.

    Ideally, the actual runtime execution should just be in a try block so that no matter what happens it's fine. Cancel the inventory event, do nothing else, move on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions