Page 1 of 1

Bug report in dayfile editor

Posted: Sun 05 Feb 2012 12:37 pm
by Vathek
Hi, in the last build i finally found the time to manually inspect and remove spikes from last year data log.

THe problem I faced is that when I remove a line from dayfile editor and I click on recreate line, it adds a line with values written as 0.0 (with dot)
My regional settings want that it should be written as 0,0 (with comma) so at this point the "all time values" submit an error when parsing the dayfile.ini because it finds 0.0 dotted values.

After fixing them with notepad (search 0.0 and replace with 0,0) the dayfile works flawlessly.

Probably there's a bug in "insert new line" of dayfile editor which doesn't check for regional settings?
Thanks!

Re: Bug report in dayfile editor

Posted: Sun 05 Feb 2012 12:46 pm
by steve
Marco-Luis reported the same problem in this thread: https://cumulus.hosiene.co.uk/viewtopic.php?f=6&t=6752

I tried to reproduce it by changing my system settings to use a comma, but the editor created the data correctly with a comma. Is the data shown in the editor with a comma before you save it? Could you zip up your diags folder and attach it, please?

Re: Bug report in dayfile editor

Posted: Sun 05 Feb 2012 3:45 pm
by mcrossley
Steve, is it anything to do with a conflict between the System and User regional settings? Part of your code picking up the system settings rather than the user?

Re: Bug report in dayfile editor

Posted: Sun 05 Feb 2012 4:04 pm
by steve
The grid component handles it all as text, it doesn't even know they're numbers. You can type any random garbage you want in the cells, and it will accept it and save it to the file exactly as you type it - even the date. The only 'intelligence' it applies is if you put some text in there which contains your list separator character; it will then save that cell with quotes around it so as not to break the CSV structure.

Re: Bug report in dayfile editor

Posted: Mon 06 Feb 2012 2:55 am
by yv1hx
I got the same bug again Steve, trying to reproduce the bug, I do the following steps:

1) Make a backup of dayfile.txt (Just in case...) ;)
2) Opened the dayfile.txt with Notepad ++ editor and arbitrarily deleted a line, in this case the 03 Feb line...
3) Opened the dayfile.txt editor, pushed the "create missing" and effectively got and recreate the missing line..but with dots in the last field....
4) Closed cumulus, make it a zip file with the \data, \diags folders inside and attached to this post..
5) Opened the again dayfile.txt with Notepad ++ editor changed the "offending" character (dot to comma) ...
6) Restarted Cumulus again ...

I hope Steve can recover some useful information from this post...

Re: Bug report in dayfile editor

Posted: Mon 06 Feb 2012 9:25 am
by steve
Ah, so it's not all of the numbers. It's the ones where there is no data available for that field and I've hard coded the string '0.0'. I can fix that.

Re: Bug report in dayfile editor

Posted: Mon 06 Feb 2012 6:20 pm
by Vathek
:D :D :clap: Thanks !!

Re: Bug report in dayfile editor

Posted: Mon 06 Feb 2012 6:57 pm
by yv1hx
steve wrote:Ah, so it's not all of the numbers. It's the ones where there is no data available for that field and I've hard coded the string '0.0'. I can fix that.
Great to heard that Steve!

Let me know if you need further help from here! :D