FM fatal error when reading config file it just wrote
Brought to you by:
mieszkolassota,
phoforge
v1.5.2873
I get this FM fatal error after I restart it:
----------------------------------------------
Message: Parameter is not valid.
Stack trace:
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at FreeMeter.Form1.Form1_Borders()
at FreeMeter.Form1..ctor()
at FreeMeter.Form1.Main()
----------------------------------------------
If I delete the config file I can start FM. If I then shut down FM and restart it I get this error when it tries to read the config file that it just wrote.
P.S.: would be nice to know which line it was complaining about.
Logged In: NO
I find that if this line is in the config file is True: <WindowIsVisible>True</WindowIsVisible>
Which means, when you shutdown FreeMeter, the 'Show Desktop Meter' option is checked.
Then this error will not pop up when you restart FreeMeter.
But if this is false, i.e., the user has decided not to 'Show Desktop Meter' and shutdowns FreeMeter, the above error will appear.
I have v1.5.2873.
Logged In: YES
user_id=1960110
Originator: NO
I think I've managed to find my own fix for this although i'm not 100% sure it doesn't break something else. It seems to be working fine for me though.
In Form1.cs find the following code in public Form1():
try
{
SetDefaults();
LoadConfiguration();
}
catch
{ }
and change it to:
try
{
LoadConfiguration();
}
catch
{ SetDefaults(); }
then in the LoadConfiguration() method delete or comment out the following line:
MailServers.RemoveAt(0); //remove the default value