TrenchBroom icon indicating copy to clipboard operation
TrenchBroom copied to clipboard

GameConfig.cfg with a single invalid fileformat causes nondescriptive error "Unknown error while saving .map" when saving

Open hedgewizards opened this issue 1 year ago • 3 comments

System Information

Version 2023.1 on Windows 10

Expected Behavior

trenchbroom provides a more verbose error that the selected fileFormat is invalid. ideally, it does this when you create a new map instead of at the time the error currently appears (when saving)

Steps to Reproduce

Pogo3d.zip

  1. Add the above as a new game to trenchbroom (unzipping into %appdata%/TrenchBroom/games on windows)
  2. Create a new map for that game (pogo3D). The only option for FileFormat should be "Pogo3d" and it should be grayed out
  3. save document anywhere

Error

Trenchbroom spawns an error that says "Unknown error while saving (map name)". there is no context. nothing appears in the logs. the file is successfully written and contains only this:

// Game: Pogo3D
// Format: Unknown

hedgewizards avatar Feb 02 '24 07:02 hedgewizards

TrenchBroom has no idea what a Pogo3D map format is.

    "version" : 6,
    "name" : "Pogo3D",
    "icon": "Icon.png",
    "fileformats": [
        { "format": "Pogo3D" }
    ],

eGax avatar Feb 02 '24 07:02 eGax

Supported map formats :

{ "format": "Quake2" } { "format": "Quake2 (Valve)"} { "format": "Valve" } { "format": "Standard" } { "format": "Quake3 (Valve)" } { "format": "Quake3 (legacy)" } { "format": "Daikatana" }

eGax avatar Feb 02 '24 07:02 eGax

yeah. I know pogo3D is not a real map format. it was just a mistake when creating the config. I think trenchbroom should be smart enough to warn the user they have made this mistake though

hedgewizards avatar Feb 02 '24 09:02 hedgewizards