Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#623 closed defect (fixed)

Do not write timestamp when not managed to connect

Reported by: skierpage Owned by: erikos
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: 0.84.x
Severity: Blocker Keywords: r+
Cc: Distribution/OS: Fedora
Bug Status: Resolved

Description

I booted recent Rawhide-XO on my XO off SD card. After logging in to Sugar, after the cursor got chunky but before the Home view appeared, the screen went black and the Gnome spinning cursor returned.

I looked in Sugar's shell.log and saw:

Traceback (most recent call last):
  File "/usr/bin/sugar-session", line 173, in <module>
    main()
  File "/usr/bin/sugar-session", line 157, in main
    home_window = HomeWindow()
  File "/usr/lib/python2.6/site-packages/jarabe/desktop/homewindow.py", line 57, in __init__
    self._mesh_box = MeshBox()
  File "/usr/lib/python2.6/site-packages/jarabe/desktop/meshbox.py", line 755, in __init__
    netmgr_observer.listen()
  File "/usr/lib/python2.6/site-packages/jarabe/desktop/meshbox.py", line 654, in listen
    settings = network.get_settings()
  File "/usr/lib/python2.6/site-packages/jarabe/model/network.py", line 312, in get_settings
    load_connections()
  File "/usr/lib/python2.6/site-packages/jarabe/model/network.py", line 365, in load_connections
    timestamp = int(config.get(section, 'timestamp'))
ValueError: invalid literal for int() with base 10: 'None'

I guess Python won't turn 'None' into an int, so the code needs to handle this. I looked in older shell.log files and it happened another time. I don't know whether this is the reason my Sugar session didn't start. If it is, it seems all this networking code should be in a try-catch block -- a network failure shouldn't stop the Sugar desktop from launching.

Attachments (3)

623.patch (1.6 KB) - added by erikos 12 years ago.
better error handling when reading in connections file
623.2.patch (2.4 KB) - added by erikos 12 years ago.
623.3.patch (1.4 KB) - added by erikos 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by tomeu

  • Severity changed from Major to Blocker

comment:2 Changed 12 years ago by erikos

  • Milestone changed from Unspecified by Release Team to 0.84

comment:3 Changed 12 years ago by erikos

  • Bug Status changed from Unconfirmed to Needinfo

It actually is in a try block.

http://git.sugarlabs.org/projects/sugar/repos/mainline/blobs/master/src/jarabe/model/network.py#line354

If a setting does not have a timestamp it will be caught by ConfigParser.Error. Can you paste the content of ~/.sugar/default/nm/connections.cfg ?

comment:4 Changed 12 years ago by erikos

Ok, I see now, the file you are reading from must be corrupted. Will handle corrupted files in an upcoming patch better.

Changed 12 years ago by erikos

better error handling when reading in connections file

comment:5 Changed 12 years ago by erikos

  • Keywords r? added
  • Owner changed from tomeu to erikos
  • Status changed from new to assigned

Changed 12 years ago by erikos

Changed 12 years ago by erikos

comment:6 Changed 12 years ago by erikos

  • Bug Status changed from Needinfo to Resolved
  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from assigned to closed
  • Summary changed from traceback in jarabe/model/network.py getting timestamp to Do not write timestamp when not managed to connect

comment:7 Changed 8 years ago by godiard

  • Milestone 0.84 deleted

Milestone 0.84 deleted

Note: See TracTickets for help on using tickets.