Closed MrLavender closed 3 years ago
Thanks, I'll update Steam and see if I can replicate.
Had some time on my hands and looked into this further. It's a strange one, so I'm not surprised if you couldn't replicate it.
SHORT VERSION
It's possible for config.vdf to contain values with line breaks in them, this crashes the parser. E.g. saving this as config.vdf will crash it;
"InstallConfigStore"
{
"Name" "Value1
Value2"
}
This commit fixes the crash and all seems ok. I haven't submitted a pull request because I didn't spend any time checking it for correctness beyond running the app and opening a world.
LONG VERSION
I have a custom HID game controller which isn't recognized by some SDL2 apps, most notably DuckStation. To fix this I created a controller mapping and set the SDL_GAMECONTROLLERCONFIG
environment variable to that mapping. DuckStation now sees the controller.
The Steam client also looks at this environment variable, and if present uses it to set the "SDL_GamepadBind" property in config.vdf. E.g.
"SDL_GamepadBind" "03000000eb0300004320000001000000,PSXtoHID,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,"
The problem is that there appears to be a bug now where the Steam client will keep adding the same mapping every time it is launched, with line break seperators. So my config contains something like this (note opening " only on first line and closing " on last line).
"SDL_GamepadBind" "03000000eb0300004320000001000000,PSXtoHID,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,
03000000eb0300004320000001000000,PSXtoHID,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,
03000000eb0300004320000001000000,PSXtoHID,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,
03000000eb0300004320000001000000,PSXtoHID,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,
03000000eb0300004320000001000000,PSXtoHID,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,
03000000eb0300004320000001000000,PSXtoHID,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,"
Thanks good catch. I'll release an update today.
Terrafirma crashes when launched on MacOS since the Steam Client update on 7 Dec. The cause is Steam config parsing so I guess something changed there.
This can be proved by renaming the config file (~/Library/Application Support/Steam/config/config.vdf) so Terrafirma can't find it, then it launches and works perfectly.
Relevant portion of crash report;