View Single Post
Posts: 5 | Thanked: 2 times | Joined on Dec 2010
#481
Hello all, I've been having crashes from an overflow in erminig.

It seems that google has a date somehow in there with year > 2038, which is past the Unix Epoch overflow, causing a crash.

This is with the patches provided by thomasvs, which fixes a crash earlier in the sync.

Anyone know of a way to fix this?


Code:
Traceback (most recent call last):
  File "/usr/bin/erminig", line 153, sync_all_profiles(widget=<gtk.ToolButton object at 0x41f79a08 (GtkToolButton at 0x4c71f0)>, data=<hildon.StackableWindow object at 0x41f79030 (HildonStackableWindow at 0x457060)>)
        id = i[0]
        do_profile_sync(id, data)
  variables: {'data': ('local', <hildon.StackableWindow object at 0x41f79030 (HildonStackableWindow at 0x457060)>), 'id': ('local', 1), 'do_profile_sync': ('global', <function do_profile_sync at 0x41fa62f0>)}
  File "/usr/bin/erminig", line 125, do_profile_sync(id=1, data=<hildon.StackableWindow object at 0x41f79030 (HildonStackableWindow at 0x457060)>)
            profile['remoteSource'], \
            profile['lastUpdate'], progress)
  variables: {'profile': ('local', {'lastUpdate': 1291137278, 'direction': 0, 'lastLocalUpdate': 1291137281, 'remoteSourceTitle': u'Gabriel Devenyi', 'remoteAccountId': 1, 'enabled': 1, 'localSource': u'1', 'remoteSource': u'myemail', 'localSourceTitle': u'N900', 'id': 1}), 'progress': ('local', <gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>)}
  File "/usr/share/erminig/erminig_core.py", line 524, syncFromGoogle(pid=1, localSource=u'1', remoteSource=u'myemail', lastSync=1291137278, progress=<gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>)
      getNewEventsFromGoogle(pid, int(localSource), remoteSource, lastSync, \
          progress)
  variables: {'progress': ('local', <gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>)}
  File "/usr/share/erminig/erminig_core.py", line 262, getNewEventsFromGoogle(pid=1, localSource=1, remoteSource=u'myemail', lastSync=1291137278, progress=<gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>)
        else:
          start_time = iso8601ToTimestamp(e.when[0].start_time)
          end_time = iso8601ToTimestamp(e.when[0].end_time)
  variables: {'start_time': ('local', None), 'e.when': ('local', [<gdata.calendar.When object at 0x42061fd0>]), 'iso8601ToTimestamp': ('global', <function iso8601ToTimestamp at 0x4107ab70>)}
  File "/usr/share/erminig/erminig_core.py", line 136, iso8601ToTimestamp(date='2050-12-24T22:00:00.000Z')
      return int(iso8601.parse(date))
  variables: {'int': ('builtin', <type 'int'>), 'date': ('local', '2050-12-24T22:00:00.000Z'), 'iso8601.parse': ('global', <function parse at 0x4107a470>)}
  File "/usr/share/erminig/iso8601.py", line 24, parse(s='2050-12-24T22:00:00.000Z')
        gmt = __extract_date(m) + __extract_time(m) + (0, 0, 0)
        return time.mktime(gmt) + __extract_tzd(m) - time.timezone
  variables: {'time.timezone': ('global', 18000), 'time.mktime': ('global', <built-in function mktime>), 'm': ('local', <_sre.SRE_Match object at 0x4107f9a0>), '__extract_tzd': ('global', <function __extract_tzd at 0x4107a5f0>), 'gmt': ('local', (2050, 12, 24, 22, 0, 0, 0, 0, 0))}
OverflowError: mktime argument out of range