Master on Windows 10

Robert Fewell 14ubobit at gmail.com
Sun May 1 08:44:08 EDT 2016


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 <tzp>, 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 = <optimized out>,
    _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x2da7744 "GMT Standard Time"}}, std_zone_abbrev_ = {static npos =
<optimized out>,
    _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x2da770c "GMT Standard Time"}}, dst_zone_name_ = {static npos =
<optimized out>,
    _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x2da76d4 "GMT Summer Time"}}, dst_zone_abbrev_ = {static npos =
<optimized out>,
    _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_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::_Vector_base<std::pair<int,
boost::shared_ptr<boost::date_time::time_zone_base<boost::posix_time::ptime,
char> > >, std::allocator<std::pair<int,
boost::shared_ptr<boost::date_time::time_zone_base<boost::posix_time::ptime,
char> > > > >> = {
    _M_impl = {<std::allocator<std::pair<int,
boost::shared_ptr<boost::date_time::time_zone_base<boost::posix_time::ptime,
char> > > >> = {<__gnu_cxx::new_allocator<std::pair<int,
boost::shared_ptr<boost::date_time::time_zone_base<boost::posix_time::ptime,
char> > > >> = {<No data fields>}, <No data fields>}, _M_start = 0x2da78b0,
_M_finish = 0x2da78bc,
      _M_end_of_storage = 0x2da78bc}}, <No data fields>}
(gdb)



On 29 April 2016 at 16:13, John Ralls <jralls at ceridwen.us> wrote:

>
> > On Apr 29, 2016, at 4:09 AM, Robert Fewell <14ubobit at 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 <tzp>, 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<boost::gregorian::bad_month>
> > (e=...)    at c:/gcdev/boost/include/boost/throw_exception.hpp:70
> > #7  0x008dc6da in boost::CV::simple_exception_policy<unsigned short,
> > (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<boost::CV::simple_exception_policy<unsigned
> > 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<boost::CV::simple_exception_policy<unsigned
> > 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
> > <tzp>, key=0x17c, names=...)    at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:199
> > #13 0x008aecab in TimeZoneProvider::TimeZoneProvider (this=0x97957c
> <tzp>,
> > identifier=...)    at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:283
> > #14 0x008d1823 in TimeZoneProvider::TimeZoneProvider (this=0x97957c
> > <tzp>)    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<boost::gregorian::date,
> > char, std::ostreambuf_iterator<char, std::char_traits<char> >
> >::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::local_time::local_date_time_base<boost::posix_time::ptime,
> > boost::date_time::time_zone_base<boost::posix_time::ptime, char> >, char,
> > std::ostreambuf_iterator<char, std::char_traits<char> > >::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<< <char,
> > std::char_traits<char> > (os=..., ldt=...)    at
> > c:/gcdev/boost/include/boost/date_time/local_time/local_time_io.hpp:43
> > #12 0x008a0285 in GncDateTimeImpl::format (this=0x7e0e8e8,
> > format=0x91884b <boost::container::default_init+23> "%a %b %e %H:%M:%S
> > %Y")    at c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:233
> > #13 0x008a080d in GncDateTime::format (this=0x64f538,    format=0x91884b
> > <boost::container::default_init+23> "%a %b %e %H:%M:%S %Y")    at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-datetime.cpp:316
> > #14 0x00893131 in gnc_print_time64 (time=1461891600,    format=0x91884b
> > <boost::container::default_init+23> "%a %b %e %H:%M:%S %Y")    at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:346
> > #15 0x00892e32 in gnc_ctime (secs=0x64f5b0) at
> > c:/gcdev/gnucash.git/src/libqof/qof/gnc-date.cpp:234
> >
> > #16 0x635a7e2b in xaccTransSetDateInternal (trans=0x7dae520,
> > dadate=0x7dae548, val=...)    at
> > c:/gcdev/gnucash.git/src/engine/Transaction.c:1939
> > #17 0x635a80cb in xaccTransSetDatePostedGDate (trans=0x7dae520,
> > date=...)    at c:/gcdev/gnucash.git/src/engine/Transaction.c:1995
> > #18 0x635a7ffa in xaccTransSetDatePostedSecsNormalized (trans=0x7dae520,
> > time=1461891600)    at c:/gcdev/gnucash.git/src/engine/Transaction.c:1979
> >
> > Will investigate further...
>
> Robert,
>
> The first failure would seem to be that windows_default_timezone isn't
> getting a valid timezone, maybe because MS changed the registry key.
>
> Please show the first 8 frames of the second backtrace; you're not even
> showing what C runtime function is getting the bad parameter.
>
> Regards,
> John Ralls
>
>


More information about the gnucash-devel mailing list