#1 ✓resolved
Darren Hart

task xml file corruption

Reported by Darren Hart | November 21st, 2008 @ 07:49 PM | in BrainDump 1.0

Some yet-unknown circumstance will cause braindump to fail to complete the write-out of the task xml files. The application will fail to load with a SAX error. Manually adding:

to the end of each corrupt file will allow the application to start up again.

Comments and changes to this ticket

  • Darren Hart

    Darren Hart November 23rd, 2008 @ 11:14 AM

    • Tag set to defect
    • State changed from “new” to “open”
  • Darren Hart

    Darren Hart November 25th, 2008 @ 06:35 PM

    Here is an example output and trace of an example corrumpted task file. I'll post the xml of the file in the next comment.

    Start element: task ID_STR: 6d6d9f4e-d45d-44f2-841d-2cb5e971b851 6d6d9f4e-d45d-44f2-841d-2cb5e971b851 not in cache, generating adding task 6d6d9f4e-d45d-44f2-841d-2cb5e971b851 to cache setting subject to 6d6d9f4e-d45d-44f2-841d-2cb5e971b851

    Start element: title End element: title

    Start element: notes End element: notes

    Start element: start_date End element: start_date

    Start element: due_date End element: due_date

    Start element: project_ref ID_STR: 9b870e95-09e8-4d38-b736-d36b95465ed5 found 9b870e95-09e8-4d38-b736-d36b95465ed5 in cache End element: project_ref Traceback (most recent call last): File "/usr/bin/braindump", line 73, in

    main()
    
    

    File "/usr/bin/braindump", line 68, in main

    app = BrainDump()
    
    

    File "/usr/lib/python2.5/site-packages/braindump/braindump.py", line 115, in init

    self.backing_store.load()
    
    

    File "/usr/lib/python2.5/site-packages/braindump/xmlstore.py", line 94, in load

    parser.parse(os.path.join(self.__path, file))
    
    

    File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse

    xmlreader.IncrementalParser.parse(self, source)
    
    

    File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 125, in parse

    self.close()
    
    

    File "/usr/lib/python2.5/xml/sax/expatreader.py", line 217, in close

    self.feed("", isFinal = 1)
    
    

    File "/usr/lib/python2.5/xml/sax/expatreader.py", line 211, in feed

    self._err_handler.fatalError(exc)
    
    

    File "/usr/lib/python2.5/xml/sax/handler.py", line 38, in fatalError

    raise exception
    
    

    xml.sax._exceptions.SAXParseException: /home/dvhart/braindump/6d6d9f4e-d45d-44f2-841d-2cb5e971b851.xml:8:0: no element found

  • Darren Hart

    Darren Hart November 25th, 2008 @ 06:45 PM

    • Milestone set to BrainDump 1.0
  • Darren Hart

    Darren Hart November 25th, 2008 @ 06:55 PM

    Example truncated XML file.

    
    <?xml version="1.0" encoding="iso-8859-1"?>
    <task id="6d6d9f4e-d45d-44f2-841d-2cb5e971b851">
    <title>Launchpad prototype 2</title>
    <notes></notes>
    <start_date>2008-11-25 16:26:35</start_date>
    <due_date>2008-12-01 23:59:59</due_date>
    <project_ref id="9b870e95-09e8-4d38-b736-d36b95465ed5"></project_ref>
    
  • Darren Hart

    Darren Hart March 8th, 2009 @ 11:04 PM

    Commit f02fe717b7d16f83a94b40251f886a2e21e33f0a adds some debug() statements and also ensures every file is closed after write. Perhaps we were losing some data. We'll run like this for a while, should it not be reproducible with the additional fd.close() calls, we'll close this ticket out.

  • Darren Hart

    Darren Hart March 18th, 2009 @ 09:48 PM

    • State changed from “open” to “resolved”

    I haven't seen this since the commit in comment 7 (f02fe717b7d16f83a94b40251f886a2e21e33f0a). Marking resolved.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A context based task management system.

People watching this ticket

Tags

Pages