Re: Master on Windows 10

2016-05-05 Thread Robert Fewell
Hi John,

I will make a PR request later.

Robert

On 5 May 2016 at 12:27, John Ralls  wrote:

>
> On May 5, 2016, at 6:16 AM, Robert Fewell <14ubo...@gmail.com> wrote:
>
> I have looked into these errors and have found the problem, the windows
> version of strftime does not support all the format flags on Linux and so
> the errors.
>
> There are two places I see this error..
> The first is from function gnc_ctime at line 234 of gnc-date.cpp, the
> format string uses a %e for the day of the month with a leading space. This
> I think can be changed to %d, a leading zero if required, as searching for
> that function shows it is only used in PINFO statements.
>
> The second is generate_statusbar_lastmodified_message at line 1654 of
> gnc-main-window.cpp, again the format string uses %e so could be replaced
> with %d but also uses %P for a lower case am/pm but this could be changed
> to %p for upper case.
>
> I looked at these references...
>
> http://www.boost.org/doc/libs/1_60_0/doc/html/date_time/date_time_io.html#date_time.format_flags
> https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx
>
>
> Robert,
>
> Thanks for troubleshooting it. Yes, those changes are quite acceptable. Do
> you want to make a PR or shall I just change it?
>
> Regards,
> John Ralls
>
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-05 Thread John Ralls

> On May 5, 2016, at 6:16 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> 
> I have looked into these errors and have found the problem, the windows 
> version of strftime does not support all the format flags on Linux and so the 
> errors.
> 
> There are two places I see this error..
> The first is from function gnc_ctime at line 234 of gnc-date.cpp, the format 
> string uses a %e for the day of the month with a leading space. This I think 
> can be changed to %d, a leading zero if required, as searching for that 
> function shows it is only used in PINFO statements.
> 
> The second is generate_statusbar_lastmodified_message at line 1654 of 
> gnc-main-window.cpp, again the format string uses %e so could be replaced 
> with %d but also uses %P for a lower case am/pm but this could be changed to 
> %p for upper case.
> 
> I looked at these references...
> http://www.boost.org/doc/libs/1_60_0/doc/html/date_time/date_time_io.html#date_time.format_flags
>  
> 
> https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx 
> 

Robert,

Thanks for troubleshooting it. Yes, those changes are quite acceptable. Do you 
want to make a PR or shall I just change it?

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-05 Thread Robert Fewell
I have looked into these errors and have found the problem, the windows
version of strftime does not support all the format flags on Linux and so
the errors.

There are two places I see this error..
The first is from function gnc_ctime at line 234 of gnc-date.cpp, the
format string uses a %e for the day of the month with a leading space. This
I think can be changed to %d, a leading zero if required, as searching for
that function shows it is only used in PINFO statements.

The second is generate_statusbar_lastmodified_message at line 1654 of
gnc-main-window.cpp, again the format string uses %e so could be replaced
with %d but also uses %P for a lower case am/pm but this could be changed
to %p for upper case.

I looked at these references...
http://www.boost.org/doc/libs/1_60_0/doc/html/date_time/date_time_io.html#date_time.format_flags
https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx

Robert


On 1 May 2016 at 13:21, Robert Fewell <14ubo...@gmail.com> wrote:

> John,
>
> Here are the first 8 frames, I was a bit to keen on cutting output...
>
> #0  0x74c4e420 in OutputDebugStringA () from
> C:\WINDOWS\SYSTEM32\KernelBase.dll
> #1  0x754489f4 in msvcrt!_invalid_parameter () from
> C:\WINDOWS\SYSTEM32\msvcrt.dll
> #2  0x753f4e60 in wctype () from C:\WINDOWS\SYSTEM32\msvcrt.dll
> #3  0x00010001 in ?? ()
> #4  0x7547b72a in msvcrt!_Strftime () from C:\WINDOWS\SYSTEM32\msvcrt.dll
> #5  0x7547b76a in strftime () from C:\WINDOWS\SYSTEM32\msvcrt.dll
> #6  0x00ecf89a in libstdc++-6!_ZNKSt11__timepunctIcE6_M_putEPcjPKcPK2tm
> ()   from c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> #7  0x00ee3193 in
> libstdc++-6!_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE6do_putES3_RSt8ios_basecPK2tmcc
> () from c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> #8  0x00ee3022 in
> libstdc++-6!_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE3putES3_RSt8ios_basecPK2tmPKcSB_
> () from c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
>
>
> Robert
>
> On 29 April 2016 at 16:13, John Ralls  wrote:
>
>>
>> > On Apr 29, 2016, at 4:09 AM, Robert Fewell <14ubo...@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > After a recent install of Windows10, I tried to install the latest
>> nightly
>> > build, this installs OK but fails to run with the following error...
>> >
>> > terminate called after throwing an instance of 'std::out_of_range'
>> >  what():  Year 2016 isn't covered by this time zone.
>> >
>> > I then set about building my own, this built OK but fails to start from
>> the
>> > inst directory with the same error as above.
>> >
>> > Running it from GDB, I get a back trace of...
>> >
>> > #8  0x008c77df in libstdc++-6!.cxa_throw () from
>> > c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
>> >
>> > #9  0x00a6efc6 in TimeZoneProvider::get (this=0xb3957c , year=2016)
>> > at c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:661
>> > #10 0x00a6f6d8 in LDT_from_unix_local (time=1461847455) at
>> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:106
>> > #11 0x00a91796 in GncDateTimeImpl::GncDateTimeImpl (this=0x733d638,
>> > time=1461847455)at
>> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:136
>> > #12 0x00a70561 in GncDateTime::GncDateTime (this=0x64ea5c,
>> > time=1461847455)at
>> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:272
>> > #13 0x00a6280a in gnc_localtime_r (secs=0x64eab8, time=0x64ea94)at
>> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:117
>> > #14 0x00a635b6 in timespecCanonicalDayTime (t=...) at
>> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:459
>> >
>> > #15 0x635e799c in _wrap_timespecCanonicalDayTime (s_0=0x8690a80) at
>> > swig-engine.c:19965
>> >
>> > As a test, I changed my Time Zone from 'UTC Dublin' to 'UTC+1 Amsterdam'
>> > and got the same output.
>> >
>> > Changing it to 'UTC+2 Cairo', the out put is different as below...
>> >
>> > #5  0x00f377ec in libstdc++-6!.cxa_throw () from
>> > c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
>> >
>> > #6  0x008d79fc in boost::throw_exception
>> > (e=...)at c:/gcdev/boost/include/boost/throw_exception.hpp:70
>> > #7  0x008dc6da in boost::CV::simple_exception_policy> > (unsigned short)1, (unsigned short)12,
>> > boost::gregorian::bad_month>::on_error () at
>> > c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:110
>> > #8  0x008dc39d in
>> > boost::CV::constrained_value > short, (unsigned short)1, (unsigned short)12,
>> boost::gregorian::bad_month>
>> >> ::assign (this=0x64f5e8, value=0)at
>> > c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:69
>> > #9  0x008dc410 in
>> > boost::CV::constrained_value > short, (unsigned short)1, (unsigned short)12,
>> boost::gregorian::bad_month>
>> >> ::constrained_value (this=0x64f5e8, value=0)at
>> > c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:48
>> > #10 0x00903f2d in boost::gregorian::greg_month::greg_month
>> (this=0x64f5e8,
>> > 

Re: Master on Windows 10

2016-05-02 Thread John Ralls

> On May 2, 2016, at 9:57 AM, Geert Janssens  wrote:
> 
> On Monday 02 May 2016 17:31:36 Robert Fewell wrote:
> > Just checked all four systems, both Linux systems are Gentoo based
> > with a timezone of 'Europe/London', used date +'%:z %Z' which
> > returned +01:00 BST for both.
> > 
> > XP VM has time zone of '(GMT) Casablanca' with DST ticked and
> > Windows10 is '(UTC) Dublin, Edinburgh, Lisbon, London' with DST
> > ticked. All systems synced to a NTP clock.
> > 
> > So there appears to be a discrepancy between Linux and windows stored
> > date-times unless I am confused ?
> > 
> > Robert
> > 
> > On 2 May 2016 at 16:11, John Ralls  wrote:
> > > > On May 2, 2016, at 6:33 AM, Robert Fewell <14ubo...@gmail.com>
> > > > wrote:
> > > > 
> > > > John,
> > > > 
> > > > I think I have found the problem, well may be the start, in
> > > 
> > > gnc-timezone.cpp on line 230, I think it should be max_year instead
> > > of 0.> 
> > > > If I change that, then Gnucash starts up but I think some thing
> > > > else is> 
> > > wrong also. If I create a new file with two transactions, one today
> > > and one 02/03/2016 before BST, they are stored in the xml files as
> > > follows, all entered between 13:00 and 14:00 local time...
> > > 
> > > > XFCE, Gnucash 2.6.11
> > > > 
> > > > date posted  2016-03-02 00:00:00 +
> > > > date entered 2016-05-02 13:31:39 +0100
> > > > 
> > > > date posted  2016-05-02 00:00:00 +0100
> > > > date entered 2016-05-02 13:31:24 +0100
> > > > 
> > > > Gnome VM, Gnucash Master
> > > > 
> > > > date posted  2016-03-02 00:00:00 +
> > > > date entered 2016-05-02 13:24:39 +0100
> > > > 
> > > > date posted  2016-05-02 00:00:00 +0100
> > > > date entered 2016-05-02 13:24:39 +0100
> > > > 
> > > > Win10, Gnucash Master
> > > > 
> > > > date posted  2016-03-02 00:00:00 -0100
> > > > date entered 2016-05-02 12:45:55 +
> > > > 
> > > > date posted  2016-05-02 00:00:00 +
> > > > date entered 2016-05-02 12:45:39 +
> > > > 
> > > > WinXP VM, Gnucash Master
> > > > 
> > > > date posted  2016-03-02 00:00:00 -0100
> > > > date entered 2016-05-02 12:55:46 +
> > > > 
> > > > date posted  2016-05-02 00:00:00 +
> > > > date entered 2016-05-02 12:55:32 +
> > > > 
> > > > Just looking for confirmation before I start looking further.
> > > 
> > > Robert,
> > > 
> > > Yes, I think you're right about line 230.
> > > 
> > > As for the stored date-times, are the timezones the same on the
> > > various systems and VMs? Looks like it's -1/0 (standard/summer,
> > > relative to UTC) on Windows and 0/+1 on Linux.
> > > 
> Perhaps our windows build (which depends on mingw) isn't picking up daylight 
> saving time information from the windows time configuration.
>  
> I ran into this problem with MSYS also:
> http://stackoverflow.com/questions/2563044/changing-timezone-in-msys/4016076#4016076

No, it's picking up DST: Notice that the TZ for the posted date on 2016-03-02 
is -0100 and for 2016-0502 is +. What it's doing is miscalculating the TZ 
by an hour on Windows. The line 
   duration std_off (0, regtzi.StandardBias - regtzi.Bias, 0);
isn't quite right because regtzi.Bias (a.k.a the Bias element of the 
TIME_ZONE_INFORMATION struct) changes with DST. When in DST it needs an 
additional correction with regtzi.DaylightBias to obtain the standard offset. 
It's a harmless bug, the times are correctly recorded since they correctly 
reflect the UTC time, they just look weird because the timezone is off.

A separate issue, though: I thought I'd moved the transaction recording time to 
be 1300Z from midnight local. Obviously not.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-02 Thread Geert Janssens
On Monday 02 May 2016 17:31:36 Robert Fewell wrote:
> Just checked all four systems, both Linux systems are Gentoo based
> with a timezone of 'Europe/London', used date +'%:z %Z' which
> returned +01:00 BST for both.
> 
> XP VM has time zone of '(GMT) Casablanca' with DST ticked and
> Windows10 is '(UTC) Dublin, Edinburgh, Lisbon, London' with DST
> ticked. All systems synced to a NTP clock.
> 
> So there appears to be a discrepancy between Linux and windows stored
> date-times unless I am confused ?
> 
> Robert
> 
> On 2 May 2016 at 16:11, John Ralls  wrote:
> > > On May 2, 2016, at 6:33 AM, Robert Fewell <14ubo...@gmail.com>
> > > wrote:
> > > 
> > > John,
> > > 
> > > I think I have found the problem, well may be the start, in
> > 
> > gnc-timezone.cpp on line 230, I think it should be max_year instead
> > of 0.> 
> > > If I change that, then Gnucash starts up but I think some thing
> > > else is> 
> > wrong also. If I create a new file with two transactions, one today
> > and one 02/03/2016 before BST, they are stored in the xml files as
> > follows, all entered between 13:00 and 14:00 local time...
> > 
> > > XFCE, Gnucash 2.6.11
> > > 
> > > date posted  2016-03-02 00:00:00 +
> > > date entered 2016-05-02 13:31:39 +0100
> > > 
> > > date posted  2016-05-02 00:00:00 +0100
> > > date entered 2016-05-02 13:31:24 +0100
> > > 
> > > Gnome VM, Gnucash Master
> > > 
> > > date posted  2016-03-02 00:00:00 +
> > > date entered 2016-05-02 13:24:39 +0100
> > > 
> > > date posted  2016-05-02 00:00:00 +0100
> > > date entered 2016-05-02 13:24:39 +0100
> > > 
> > > Win10, Gnucash Master
> > > 
> > > date posted  2016-03-02 00:00:00 -0100
> > > date entered 2016-05-02 12:45:55 +
> > > 
> > > date posted  2016-05-02 00:00:00 +
> > > date entered 2016-05-02 12:45:39 +
> > > 
> > > WinXP VM, Gnucash Master
> > > 
> > > date posted  2016-03-02 00:00:00 -0100
> > > date entered 2016-05-02 12:55:46 +
> > > 
> > > date posted  2016-05-02 00:00:00 +
> > > date entered 2016-05-02 12:55:32 +
> > > 
> > > Just looking for confirmation before I start looking further.
> > 
> > Robert,
> > 
> > Yes, I think you're right about line 230.
> > 
> > As for the stored date-times, are the timezones the same on the
> > various systems and VMs? Looks like it's -1/0 (standard/summer,
> > relative to UTC) on Windows and 0/+1 on Linux.
> > 
Perhaps our windows build (which depends on mingw) isn't picking up daylight 
saving time 
information from the windows time configuration.

I ran into this problem with MSYS also:
http://stackoverflow.com/questions/2563044/changing-timezone-in-msys/4016076#4016076

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-02 Thread Robert Fewell
Just checked all four systems, both Linux systems are Gentoo based with a
timezone of 'Europe/London', used date +'%:z %Z' which returned +01:00 BST
for both.

XP VM has time zone of '(GMT) Casablanca' with DST ticked and Windows10 is
'(UTC) Dublin, Edinburgh, Lisbon, London' with DST ticked. All systems
synced to a NTP clock.

So there appears to be a discrepancy between Linux and windows stored
date-times unless I am confused ?

Robert


On 2 May 2016 at 16:11, John Ralls  wrote:

>
> > On May 2, 2016, at 6:33 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> >
> > John,
> >
> > I think I have found the problem, well may be the start, in
> gnc-timezone.cpp on line 230, I think it should be max_year instead of 0.
> >
> > If I change that, then Gnucash starts up but I think some thing else is
> wrong also. If I create a new file with two transactions, one today and one
> 02/03/2016 before BST, they are stored in the xml files as follows, all
> entered between 13:00 and 14:00 local time...
> >
> > XFCE, Gnucash 2.6.11
> >
> > date posted  2016-03-02 00:00:00 +
> > date entered 2016-05-02 13:31:39 +0100
> >
> > date posted  2016-05-02 00:00:00 +0100
> > date entered 2016-05-02 13:31:24 +0100
> >
> > Gnome VM, Gnucash Master
> >
> > date posted  2016-03-02 00:00:00 +
> > date entered 2016-05-02 13:24:39 +0100
> >
> > date posted  2016-05-02 00:00:00 +0100
> > date entered 2016-05-02 13:24:39 +0100
> >
> > Win10, Gnucash Master
> >
> > date posted  2016-03-02 00:00:00 -0100
> > date entered 2016-05-02 12:45:55 +
> >
> > date posted  2016-05-02 00:00:00 +
> > date entered 2016-05-02 12:45:39 +
> >
> > WinXP VM, Gnucash Master
> >
> > date posted  2016-03-02 00:00:00 -0100
> > date entered 2016-05-02 12:55:46 +
> >
> > date posted  2016-05-02 00:00:00 +
> > date entered 2016-05-02 12:55:32 +
> >
> > Just looking for confirmation before I start looking further.
>
> Robert,
>
> Yes, I think you're right about line 230.
>
> As for the stored date-times, are the timezones the same on the various
> systems and VMs? Looks like it's -1/0 (standard/summer, relative to UTC) on
> Windows and 0/+1 on Linux.
>
> Regards,
> John Ralls
>
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-02 Thread John Ralls

> On May 2, 2016, at 6:33 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> 
> John,
> 
> I think I have found the problem, well may be the start, in gnc-timezone.cpp 
> on line 230, I think it should be max_year instead of 0.
> 
> If I change that, then Gnucash starts up but I think some thing else is wrong 
> also. If I create a new file with two transactions, one today and one 
> 02/03/2016 before BST, they are stored in the xml files as follows, all 
> entered between 13:00 and 14:00 local time...
> 
> XFCE, Gnucash 2.6.11
> 
> date posted  2016-03-02 00:00:00 +
> date entered 2016-05-02 13:31:39 +0100
> 
> date posted  2016-05-02 00:00:00 +0100
> date entered 2016-05-02 13:31:24 +0100
> 
> Gnome VM, Gnucash Master
> 
> date posted  2016-03-02 00:00:00 +
> date entered 2016-05-02 13:24:39 +0100
> 
> date posted  2016-05-02 00:00:00 +0100
> date entered 2016-05-02 13:24:39 +0100
> 
> Win10, Gnucash Master
> 
> date posted  2016-03-02 00:00:00 -0100
> date entered 2016-05-02 12:45:55 +
> 
> date posted  2016-05-02 00:00:00 +
> date entered 2016-05-02 12:45:39 +
> 
> WinXP VM, Gnucash Master
> 
> date posted  2016-03-02 00:00:00 -0100
> date entered 2016-05-02 12:55:46 +
> 
> date posted  2016-05-02 00:00:00 +
> date entered 2016-05-02 12:55:32 +
> 
> Just looking for confirmation before I start looking further.

Robert,

Yes, I think you're right about line 230.

As for the stored date-times, are the timezones the same on the various systems 
and VMs? Looks like it's -1/0 (standard/summer, relative to UTC) on Windows and 
0/+1 on Linux.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-02 Thread Robert Fewell
John,

I think I have found the problem, well may be the start, in
gnc-timezone.cpp on line 230, I think it should be max_year instead of 0.

If I change that, then Gnucash starts up but I think some thing else is
wrong also. If I create a new file with two transactions, one today and one
02/03/2016 before BST, they are stored in the xml files as follows, all
entered between 13:00 and 14:00 local time...

XFCE, Gnucash 2.6.11

date posted  2016-03-02 00:00:00 +
date entered 2016-05-02 13:31:39 +0100

date posted  2016-05-02 00:00:00 +0100
date entered 2016-05-02 13:31:24 +0100

Gnome VM, Gnucash Master

date posted  2016-03-02 00:00:00 +
date entered 2016-05-02 13:24:39 +0100

date posted  2016-05-02 00:00:00 +0100
date entered 2016-05-02 13:24:39 +0100

Win10, Gnucash Master

date posted  2016-03-02 00:00:00 -0100
date entered 2016-05-02 12:45:55 +

date posted  2016-05-02 00:00:00 +
date entered 2016-05-02 12:45:39 +

WinXP VM, Gnucash Master

date posted  2016-03-02 00:00:00 -0100
date entered 2016-05-02 12:55:46 +

date posted  2016-05-02 00:00:00 +
date entered 2016-05-02 12:55:32 +

Just looking for confirmation before I start looking further.

Robert


On 1 May 2016 at 18:25, John Ralls  wrote:

>
> > On May 1, 2016, at 9:34 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> >
> > The comparison to Linux was the contents of zone_vector was being
> populated, I understand that it gets it gets populated differently but
> assume the information contained in zone_vector was the same.
>
>
> Bob,
>
> Well, sort of. Unix's database goes back to the beginning of time zones
> and IIRC Microsoft's goes back only to 1970 -- and only goes back at all
> starting with either XP SP3 or Vista. But there should always be at least
> one entry.
>
> My point was that you should be comparing the results on Win10 with those
> on Win7 because they both use the same code path.
>
> Regards,
> John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-01 Thread John Ralls

> On May 1, 2016, at 9:34 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> 
> The comparison to Linux was the contents of zone_vector was being populated, 
> I understand that it gets it gets populated differently but assume the 
> information contained in zone_vector was the same.


Bob,

Well, sort of. Unix's database goes back to the beginning of time zones and 
IIRC Microsoft's goes back only to 1970 -- and only goes back at all starting 
with either XP SP3 or Vista. But there should always be at least one entry.

My point was that you should be comparing the results on Win10 with those on 
Win7 because they both use the same code path.

Regards,
John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-01 Thread Robert Fewell
The comparison to Linux was the contents of zone_vector was being
populated, I understand that it gets it gets populated differently but
assume the information contained in zone_vector was the same.

Robert

On 1 May 2016 at 15:37, John Ralls  wrote:

>
> > On May 1, 2016, at 5:44 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> >
> > John,
> >
> > I have poked around in GDB for the timezone problem and this is what I
> have found after setting break points on lines, 86, 117, 142, 169, 219,
> 242, 257 of gnc-timezone.cpp
> >
> > From 258 to 90 returns with key_name = 'GMT Standard Time'
> > To 123 and returns with std_name = 'GMT Standard Time' and dlt_name =
> 'GMT Summer Time'
> > From 222 to 148 and then onto the failure at 658
> >
> > Some GDB output below, I also added some code to print the zone_vector
> in a loop at line 657 before the find operation and got NO out put compared
> to my Linux VM which produced 24 entries.
> >
> > I am not sure zone_vector is being populated !!
>
> Robert,
>
> Seriously, "GMT Standard Time", not "British Standard Time"? What's the
> key_name on Win7?
>
> Comparing with Linux isn't useful, Windows has its own way of handling
> time zone information that's different from Unix.
>
> Regards,
> John Ralls
>
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-01 Thread John Ralls

> On May 1, 2016, at 5:44 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> 
> John,
> 
> I have poked around in GDB for the timezone problem and this is what I have 
> found after setting break points on lines, 86, 117, 142, 169, 219, 242, 257 
> of gnc-timezone.cpp
> 
> From 258 to 90 returns with key_name = 'GMT Standard Time'
> To 123 and returns with std_name = 'GMT Standard Time' and dlt_name = 'GMT 
> Summer Time'
> From 222 to 148 and then onto the failure at 658
> 
> Some GDB output below, I also added some code to print the zone_vector in a 
> loop at line 657 before the find operation and got NO out put compared to my 
> Linux VM which produced 24 entries.
> 
> I am not sure zone_vector is being populated !!

Robert,

Seriously, "GMT Standard Time", not "British Standard Time"? What's the 
key_name on Win7?

Comparing with Linux isn't useful, Windows has its own way of handling time 
zone information that's different from Unix.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Master on Windows 10

2016-05-01 Thread Robert Fewell
John,

I have poked around in GDB for the timezone problem and this is what I have
found after setting break points on lines, 86, 117, 142, 169, 219, 242, 257
of gnc-timezone.cpp

>From 258 to 90 returns with key_name = 'GMT Standard Time'
To 123 and returns with std_name = 'GMT Standard Time' and dlt_name = 'GMT
Summer Time'
>From 222 to 148 and then onto the failure at 658

Some GDB output below, I also added some code to print the zone_vector in a
loop at line 657 before the find operation and got NO out put compared to
my Linux VM which produced 24 entries.

I am not sure zone_vector is being populated !!

Robert

(gdb)
TimeZoneProvider::load_windows_classic_tz (this=0xb5957c , key=0x180,
names=...)
at c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:238
238 RegCloseKey (key);
(gdb) p zone_vector.size()
$16 = 2863311526
(gdb) p names
$17 = {std_zone_name_ = {static npos = ,
_M_dataplus = { =
{<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x2da7744 "GMT Standard Time"}}, std_zone_abbrev_ = {static npos =
,
_M_dataplus = { =
{<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x2da770c "GMT Standard Time"}}, dst_zone_name_ = {static npos =
,
_M_dataplus = { =
{<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x2da76d4 "GMT Summer Time"}}, dst_zone_abbrev_ = {static npos =
,
_M_dataplus = { =
{<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x2da769c "GMT Summer Time"}}}
(gdb) p regtzi
$18 = {Bias = 0, StandardBias = 0, DaylightBias = -60, StandardDate =
{wYear = 0, wMonth = 10, wDayOfWeek = 0,
wDay = 5, wHour = 2, wMinute = 0, wSecond = 0, wMilliseconds = 0},
DaylightDate = {wYear = 0, wMonth = 3,
wDayOfWeek = 0, wDay = 5, wHour = 1, wMinute = 0, wSecond = 0,
wMilliseconds = 0}}
(gdb) p zone_vector
$19 = { > >, std::allocator > > > >> = {
_M_impl = { > > >> = {<__gnu_cxx::new_allocator > > >> = {}, }, _M_start = 0x2da78b0,
_M_finish = 0x2da78bc,
  _M_end_of_storage = 0x2da78bc}}, }
(gdb)



On 29 April 2016 at 16:13, John Ralls  wrote:

>
> > On Apr 29, 2016, at 4:09 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> >
> > Hi,
> >
> > After a recent install of Windows10, I tried to install the latest
> nightly
> > build, this installs OK but fails to run with the following error...
> >
> > terminate called after throwing an instance of 'std::out_of_range'
> >  what():  Year 2016 isn't covered by this time zone.
> >
> > I then set about building my own, this built OK but fails to start from
> the
> > inst directory with the same error as above.
> >
> > Running it from GDB, I get a back trace of...
> >
> > #8  0x008c77df in libstdc++-6!.cxa_throw () from
> > c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> >
> > #9  0x00a6efc6 in TimeZoneProvider::get (this=0xb3957c , year=2016)
> > at c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:661
> > #10 0x00a6f6d8 in LDT_from_unix_local (time=1461847455) at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:106
> > #11 0x00a91796 in GncDateTimeImpl::GncDateTimeImpl (this=0x733d638,
> > time=1461847455)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:136
> > #12 0x00a70561 in GncDateTime::GncDateTime (this=0x64ea5c,
> > time=1461847455)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:272
> > #13 0x00a6280a in gnc_localtime_r (secs=0x64eab8, time=0x64ea94)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:117
> > #14 0x00a635b6 in timespecCanonicalDayTime (t=...) at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:459
> >
> > #15 0x635e799c in _wrap_timespecCanonicalDayTime (s_0=0x8690a80) at
> > swig-engine.c:19965
> >
> > As a test, I changed my Time Zone from 'UTC Dublin' to 'UTC+1 Amsterdam'
> > and got the same output.
> >
> > Changing it to 'UTC+2 Cairo', the out put is different as below...
> >
> > #5  0x00f377ec in libstdc++-6!.cxa_throw () from
> > c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> >
> > #6  0x008d79fc in boost::throw_exception
> > (e=...)at c:/gcdev/boost/include/boost/throw_exception.hpp:70
> > #7  0x008dc6da in boost::CV::simple_exception_policy > (unsigned short)1, (unsigned short)12,
> > boost::gregorian::bad_month>::on_error () at
> > c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:110
> > #8  0x008dc39d in
> > boost::CV::constrained_value short, (unsigned short)1, (unsigned short)12,
> boost::gregorian::bad_month>
> >> ::assign (this=0x64f5e8, value=0)at
> > 

Re: Master on Windows 10

2016-05-01 Thread Robert Fewell
John,

Here are the first 8 frames, I was a bit to keen on cutting output...

#0  0x74c4e420 in OutputDebugStringA () from
C:\WINDOWS\SYSTEM32\KernelBase.dll
#1  0x754489f4 in msvcrt!_invalid_parameter () from
C:\WINDOWS\SYSTEM32\msvcrt.dll
#2  0x753f4e60 in wctype () from C:\WINDOWS\SYSTEM32\msvcrt.dll
#3  0x00010001 in ?? ()
#4  0x7547b72a in msvcrt!_Strftime () from C:\WINDOWS\SYSTEM32\msvcrt.dll
#5  0x7547b76a in strftime () from C:\WINDOWS\SYSTEM32\msvcrt.dll
#6  0x00ecf89a in libstdc++-6!_ZNKSt11__timepunctIcE6_M_putEPcjPKcPK2tm
()   from c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
#7  0x00ee3193 in
libstdc++-6!_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE6do_putES3_RSt8ios_basecPK2tmcc
() from c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
#8  0x00ee3022 in
libstdc++-6!_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE3putES3_RSt8ios_basecPK2tmPKcSB_
() from c:\gcdev\gnucash\inst\bin\libstdc++-6.dll


Robert

On 29 April 2016 at 16:13, John Ralls  wrote:

>
> > On Apr 29, 2016, at 4:09 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> >
> > Hi,
> >
> > After a recent install of Windows10, I tried to install the latest
> nightly
> > build, this installs OK but fails to run with the following error...
> >
> > terminate called after throwing an instance of 'std::out_of_range'
> >  what():  Year 2016 isn't covered by this time zone.
> >
> > I then set about building my own, this built OK but fails to start from
> the
> > inst directory with the same error as above.
> >
> > Running it from GDB, I get a back trace of...
> >
> > #8  0x008c77df in libstdc++-6!.cxa_throw () from
> > c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> >
> > #9  0x00a6efc6 in TimeZoneProvider::get (this=0xb3957c , year=2016)
> > at c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:661
> > #10 0x00a6f6d8 in LDT_from_unix_local (time=1461847455) at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:106
> > #11 0x00a91796 in GncDateTimeImpl::GncDateTimeImpl (this=0x733d638,
> > time=1461847455)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:136
> > #12 0x00a70561 in GncDateTime::GncDateTime (this=0x64ea5c,
> > time=1461847455)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:272
> > #13 0x00a6280a in gnc_localtime_r (secs=0x64eab8, time=0x64ea94)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:117
> > #14 0x00a635b6 in timespecCanonicalDayTime (t=...) at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:459
> >
> > #15 0x635e799c in _wrap_timespecCanonicalDayTime (s_0=0x8690a80) at
> > swig-engine.c:19965
> >
> > As a test, I changed my Time Zone from 'UTC Dublin' to 'UTC+1 Amsterdam'
> > and got the same output.
> >
> > Changing it to 'UTC+2 Cairo', the out put is different as below...
> >
> > #5  0x00f377ec in libstdc++-6!.cxa_throw () from
> > c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> >
> > #6  0x008d79fc in boost::throw_exception
> > (e=...)at c:/gcdev/boost/include/boost/throw_exception.hpp:70
> > #7  0x008dc6da in boost::CV::simple_exception_policy > (unsigned short)1, (unsigned short)12,
> > boost::gregorian::bad_month>::on_error () at
> > c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:110
> > #8  0x008dc39d in
> > boost::CV::constrained_value short, (unsigned short)1, (unsigned short)12,
> boost::gregorian::bad_month>
> >> ::assign (this=0x64f5e8, value=0)at
> > c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:69
> > #9  0x008dc410 in
> > boost::CV::constrained_value short, (unsigned short)1, (unsigned short)12,
> boost::gregorian::bad_month>
> >> ::constrained_value (this=0x64f5e8, value=0)at
> > c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:48
> > #10 0x00903f2d in boost::gregorian::greg_month::greg_month
> (this=0x64f5e8,
> > theMonth=0)at
> > c:/gcdev/boost/include/boost/date_time/gregorian/greg_month.hpp:64
> > #11 0x008adedc in zone_from_regtzi (regtzi=..., names=...) at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:161
> > #12 0x008ae387 in TimeZoneProvider::load_windows_dynamic_tz
> (this=0x97957c
> > , key=0x17c, names=...)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:199
> > #13 0x008aecab in TimeZoneProvider::TimeZoneProvider (this=0x97957c
> ,
> > identifier=...)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:283
> > #14 0x008d1823 in TimeZoneProvider::TimeZoneProvider (this=0x97957c
> > )at c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.hpp:51
> > #15 0x008b088c in __static_initialization_and_destruction_0
> > (__initialize_p=1, __priority=65535)at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:47
> > #16 0x008b0a8c in _GLOBAL__sub_I__ZNK11GncDateImpl14year_month_dayEv ()
> > at c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:317
> >
> > #17 0x008cc0ba in __do_global_ctors () from
> > 

Re: Master on Windows 10

2016-04-29 Thread John Ralls

> On Apr 29, 2016, at 4:09 AM, Robert Fewell <14ubo...@gmail.com> wrote:
> 
> Hi,
> 
> After a recent install of Windows10, I tried to install the latest nightly
> build, this installs OK but fails to run with the following error...
> 
> terminate called after throwing an instance of 'std::out_of_range'
>  what():  Year 2016 isn't covered by this time zone.
> 
> I then set about building my own, this built OK but fails to start from the
> inst directory with the same error as above.
> 
> Running it from GDB, I get a back trace of...
> 
> #8  0x008c77df in libstdc++-6!.cxa_throw () from
> c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> 
> #9  0x00a6efc6 in TimeZoneProvider::get (this=0xb3957c , year=2016)
> at c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:661
> #10 0x00a6f6d8 in LDT_from_unix_local (time=1461847455) at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:106
> #11 0x00a91796 in GncDateTimeImpl::GncDateTimeImpl (this=0x733d638,
> time=1461847455)at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:136
> #12 0x00a70561 in GncDateTime::GncDateTime (this=0x64ea5c,
> time=1461847455)at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:272
> #13 0x00a6280a in gnc_localtime_r (secs=0x64eab8, time=0x64ea94)at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:117
> #14 0x00a635b6 in timespecCanonicalDayTime (t=...) at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:459
> 
> #15 0x635e799c in _wrap_timespecCanonicalDayTime (s_0=0x8690a80) at
> swig-engine.c:19965
> 
> As a test, I changed my Time Zone from 'UTC Dublin' to 'UTC+1 Amsterdam'
> and got the same output.
> 
> Changing it to 'UTC+2 Cairo', the out put is different as below...
> 
> #5  0x00f377ec in libstdc++-6!.cxa_throw () from
> c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> 
> #6  0x008d79fc in boost::throw_exception
> (e=...)at c:/gcdev/boost/include/boost/throw_exception.hpp:70
> #7  0x008dc6da in boost::CV::simple_exception_policy (unsigned short)1, (unsigned short)12,
> boost::gregorian::bad_month>::on_error () at
> c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:110
> #8  0x008dc39d in
> boost::CV::constrained_value
>> ::assign (this=0x64f5e8, value=0)at
> c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:69
> #9  0x008dc410 in
> boost::CV::constrained_value
>> ::constrained_value (this=0x64f5e8, value=0)at
> c:/gcdev/boost/include/boost/date_time/constrained_value.hpp:48
> #10 0x00903f2d in boost::gregorian::greg_month::greg_month (this=0x64f5e8,
> theMonth=0)at
> c:/gcdev/boost/include/boost/date_time/gregorian/greg_month.hpp:64
> #11 0x008adedc in zone_from_regtzi (regtzi=..., names=...) at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:161
> #12 0x008ae387 in TimeZoneProvider::load_windows_dynamic_tz (this=0x97957c
> , key=0x17c, names=...)at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:199
> #13 0x008aecab in TimeZoneProvider::TimeZoneProvider (this=0x97957c ,
> identifier=...)at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:283
> #14 0x008d1823 in TimeZoneProvider::TimeZoneProvider (this=0x97957c
> )at c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.hpp:51
> #15 0x008b088c in __static_initialization_and_destruction_0
> (__initialize_p=1, __priority=65535)at
> c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:47
> #16 0x008b0a8c in _GLOBAL__sub_I__ZNK11GncDateImpl14year_month_dayEv ()
> at c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:317
> 
> #17 0x008cc0ba in __do_global_ctors () from
> c:\gcdev\gnucash\inst\bin\libgnc-qof-1.dll
> 
> BUT if I change to 'UTC-1 Azores' or ANY other 'UTC-' Gnucash would start
> up but in GDB I was getting this error three times "warning: Invalid
> parameter passed to C runtime function."
> This is the back trace...
> 
> #8  0x00ee3022 in
> libstdc++-6!_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE3putES3_RSt8ios_basecPK2tmPKcSB_
> () from c:\gcdev\gnucash\inst\bin\libstdc++-6.dll
> 
> #9  0x008fe711 in boost::date_time::date_facet char, std::ostreambuf_iterator >::do_put_tm
> (this=0x7e0e720, next=..., a_ios=..., fill_char=32 ' ', tm_value=...,
> a_format=...)at
> c:/gcdev/boost/include/boost/date_time/date_facet.hpp:346
> #10 0x008ff0f0 in
> boost::date_time::time_facet boost::date_time::time_zone_base >, char,
> std::ostreambuf_iterator >::put
> (this=0x7e0e720, next_arg=..., ios_arg=..., fill_arg=32 ' ',
> time_arg=...)at
> c:/gcdev/boost/include/boost/date_time/time_facet.hpp:428
> #11 0x008c5120 in boost::local_time::operator<<  std::char_traits >