freezy / dmd-extensions

A toolbox for virtual pinball dot matrix displays.
GNU General Public License v2.0
127 stars 54 forks source link

Duplicate section in DmdDevice.ini => empty .ini file #380

Closed elabree closed 1 year ago

elabree commented 1 year ago

Let's confess 1st: "I used Notepad++ to modify the .ini"

Unfortunately I made a mistake: my DmdDevice.ini contained two entries for the same game/rom (I forgot to rename the copy). After starting VPX the virtual DMD appears at the default location with default size.

As a result I ended up with a DmdDevice.ini containing 1 entry for the table I was running. All virtual dmd and other settings gone :-(

In the DmdDevice.log:

 [1] 2023/06/10 15:12:28.056 ERROR | Error parsing .ini file at D:\vPinball\VisualPinball\VPinMAME\DmdDevice.ini: Duplicate section with name 'wd_12' on line '[wd_12]' while parsing line number 0 with value '' - IniParser version: 2.5.2.0 while parsing line number 1064 with value '[wd_12]' - IniParser version: 2.5.2.0 IniParser.Exceptions.ParsingException: Duplicate section with name 'wd_12' on line '[wd_12]' while parsing line number 0 with value '' - IniParser version: 2.5.2.0 while parsing line number 1064 with value '[wd_12]' - IniParser version: 2.5.2.0 ---> IniParser.Exceptions.ParsingException: Duplicate section with name 'wd_12' on line '[wd_12]' while parsing line number 0 with value '' - IniParser version: 2.5.2.0
   at IniParser.Parser.IniDataParser.ProcessSection(String line, IniData currentIniData)
   at IniParser.Parser.IniDataParser.ProcessLine(String currentLine, IniData currentIniData)
   at IniParser.Parser.IniDataParser.Parse(String iniDataString)
   --- End of inner exception stack trace ---
   at IniParser.Parser.IniDataParser.Parse(String iniDataString)
   at IniParser.StreamIniDataParser.ReadData(StreamReader reader)
   at IniParser.FileIniDataParser.ReadFile(String filePath, Encoding fileEncoding)
   at LibDmd.DmdDevice.Configuration..ctor(String iniPath)

Although this happened because I messed up the DmdDevice.ini I think it might happen to others. So maybe it's worthwile to see if this situation can be handled more elegantly ?

freezy commented 1 year ago

Do you still have the entire log, to be sure which version you were using? I think this might got already fixed.

elabree commented 1 year ago

Thanks for your response. Yes this is the log:

 [1] 2023/06/10 15:12:28.056 ERROR | Error parsing .ini file at D:\vPinball\VisualPinball\VPinMAME\DmdDevice.ini: Duplicate section with name 'wd_12' on line '[wd_12]' while parsing line number 0 with value '' - IniParser version: 2.5.2.0 while parsing line number 1064 with value '[wd_12]' - IniParser version: 2.5.2.0 IniParser.Exceptions.ParsingException: Duplicate section with name 'wd_12' on line '[wd_12]' while parsing line number 0 with value '' - IniParser version: 2.5.2.0 while parsing line number 1064 with value '[wd_12]' - IniParser version: 2.5.2.0 ---> IniParser.Exceptions.ParsingException: Duplicate section with name 'wd_12' on line '[wd_12]' while parsing line number 0 with value '' - IniParser version: 2.5.2.0
   at IniParser.Parser.IniDataParser.ProcessSection(String line, IniData currentIniData)
   at IniParser.Parser.IniDataParser.ProcessLine(String currentLine, IniData currentIniData)
   at IniParser.Parser.IniDataParser.Parse(String iniDataString)
   --- End of inner exception stack trace ---
   at IniParser.Parser.IniDataParser.Parse(String iniDataString)
   at IniParser.StreamIniDataParser.ReadData(StreamReader reader)
   at IniParser.FileIniDataParser.ReadFile(String filePath, Encoding fileEncoding)
   at LibDmd.DmdDevice.Configuration..ctor(String iniPath)
 [1] 2023/06/10 15:12:28.148  INFO | No altcolor folder found, ignoring palettes. 
 [1] 2023/06/10 15:12:29.741  WARN | Could not parse time zone West-Europa (standaardtijd). 
 [1] 2023/06/10 15:12:29.741  INFO | Starting VPinMAME API 2.1.2 through Setup.exe. 
 [1] 2023/06/10 15:12:29.741  INFO | Assembly located at D:\vPinball\VisualPinball\VPinMAME\DmdDevice.dll 
 [1] 2023/06/10 15:12:29.741  INFO | Running in D:\vPinball\VisualPinball\VPinMAME 
 [1] 2023/06/10 15:12:29.741  INFO | [vpm] Open(0) 
 [1] 2023/06/10 15:12:29.741  INFO | [vpm] PM_GameSettings(0, twenty4_150, 0) 
 [1] 2023/06/10 15:12:29.741  INFO | Disabling game colorization 
 [1] 2023/06/10 15:12:29.741  INFO | Setting game name: twenty4_150 
 [1] 2023/06/10 15:12:29.754  INFO | Setting color: #FFFF5820 
 [1] 2023/06/10 15:12:29.754  INFO | Opening virtual display... 
[10] 2023/06/10 15:12:29.910  INFO | Added VirtualDMD renderer. 
[10] 2023/06/10 15:12:29.930  INFO | Loading alphanumeric SVGs... 
[10] 2023/06/10 15:12:29.985  INFO | Loading alphanumeric SVGs... 
[10] 2023/06/10 15:12:29.985  INFO | Loading numeric (8) SVGs... 
[10] 2023/06/10 15:12:29.985  INFO | Loading numeric (8) SVGs... 
[10] 2023/06/10 15:12:29.985  INFO | Loading numeric (10) SVGs... 
[10] 2023/06/10 15:12:29.995  INFO | Loading numeric (10) SVGs... 
[10] 2023/06/10 15:12:29.995  INFO | All SVGs loaded. 
[10] 2023/06/10 15:12:29.995  INFO | Added virtual alphanumeric renderer. 
[10] 2023/06/10 15:12:29.995  INFO | Transformation options: Resize=Fit, HFlip=False, VFlip=False 
[10] 2023/06/10 15:12:29.995  INFO | Applying default color to render graphs (#FFFF5820). 
[10] 2023/06/10 15:12:30.008  INFO | Setting up 2-bit VPM Graph for 2 destination(s) 
[10] 2023/06/10 15:12:30.008  INFO | Connecting VPM 2-bit Source to Virtual DMD (Gray2 => Gray2) 
[10] 2023/06/10 15:12:30.028  INFO | Setting up 4-bit VPM Graph for 2 destination(s) 
[10] 2023/06/10 15:12:30.028  INFO | Connecting VPM 4-bit Source to Virtual DMD (Gray4 => Gray4) 
[10] 2023/06/10 15:12:30.028  INFO | Setting up RGB24-bit VPM Graph for 2 destination(s) 
[10] 2023/06/10 15:12:30.028  INFO | Connecting VPM RGB24 Source to Virtual DMD (Rgb24 => Rgb24) 
[10] 2023/06/10 15:12:30.028  INFO | Setting up Alphanumeric VPM Graph for 2 destination(s) 
[10] 2023/06/10 15:12:30.028  INFO | Connecting VPM Alpha Numeric Source to Virtual Alphanumeric Display (AlphaNumeric => AlphaNumeric) 
[10] 2023/06/10 15:12:30.422  INFO | Creating FBOs for 128x32 
 [1] 2023/06/10 15:12:32.983  INFO | [vpm] Close(0) 
 [1] 2023/06/10 15:12:32.983  INFO | Closing up. 
 [1] 2023/06/10 15:12:33.547  INFO | Clearing Display 
 [1] 2023/06/10 15:12:33.551  INFO | Clearing Display 
 [1] 2023/06/10 15:12:33.551  INFO | Clearing Display 
 [1] 2023/06/10 15:12:33.551  INFO | Clearing Display 
 [1] 2023/06/10 15:12:33.567  INFO | Source for 1 renderer(s) stopped. 
 [1] 2023/06/10 15:12:33.582  INFO | Source for 1 renderer(s) stopped. 
 [1] 2023/06/10 15:12:33.582  INFO | Source for 1 renderer(s) stopped. 
 [1] 2023/06/10 15:12:33.582  INFO | Source for 1 renderer(s) stopped. 
freezy commented 1 year ago

Okay, I've tested this and it seems to be fine. Build here if you want to re-test.

freezy commented 1 year ago

Fixed in #374.