Opened 6 years ago

Closed 6 years ago

#1773 closed defect (fixed)

RDF read from disk works once, fails after [patch]

Reported by: fbennett Owned by: dstillman
Priority: minor Milestone:
Component: data layer Version: 2.1
Keywords: Cc:

Description

During testing of a translator, I found that I could read an RDF file from disk once once; subsequent attempts failed, with an error that seemed to indicate that the stream was no longer available.

I'm not sure whether the attached patch is the right fix, but it gets things going, and might be a starting point for identifying exactly what the failure is.

Attachments (2)

repeat-rdf-read.patch (724 bytes) - added by fbennett 6 years ago.
Screenshot-6.png (120.9 KB) - added by fbennett 6 years ago.
Lingering empty panel at start of file import, patch applied to Z2.1b5 xpi.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by fbennett

comment:1 Changed 6 years ago by simon

I would guess that this is caused by nsIDOMParser.parseFromStream() closing the stream when it's done with it, but I can't actually reproduce the bug. Is:

var io = new Zotero.Translate.IO.Read(someNsIFile, "rdf");
io.reset("block");
io.reset("rdf");
io.reset("block");

sufficient to reproduce this on your end, or is there something else I need to do?

comment:2 Changed 6 years ago by simon

That code block should read

var io = new Zotero.Translate.IO.Read(someNsIFile, "rdf");
io.reset("block");
io.reset("rdf");
io.reset("block"); 

comment:3 Changed 6 years ago by fbennett

I'll check whether r7879 resolved this, and get back.

comment:4 Changed 6 years ago by simon

(In [7946]) addresses #1773, RDF read from disk works once, fails after

This fixes some issues with streams being closed due to overzealous garbage collection in Firefox 3.6. I'm not sure if this is the same as #1773 or not, but it certainly produces export errors.

comment:5 Changed 6 years ago by simon

I don't think r7879 would have resolved this. It may be specific to Firefox 3.6, which may be why I couldn't reproduce, but it should be fixed in r7946. When you have a chance, let me know if you still see issues.

comment:6 Changed 6 years ago by fbennett

I did check with r7879 applied, and go the failure but didn't get around to writing it up. With r7946, the import goes through to completion without error. There's an odd effect with the content of the popup menu clearing, but then not being destroyed for a time. Not sure if it's related to this patch, and it's a cosmetic thing that doesn't interfere with the import, but I'm putting up a screenshot for reference just in case.

Changed 6 years ago by fbennett

Lingering empty panel at start of file import, patch applied to Z2.1b5 xpi.

comment:7 Changed 6 years ago by simon

  • Resolution set to fixed
  • Status changed from new to closed

Fixed. I think I may also have fixed the UI issue in r8088, but if not, feel free to create a new ticket for it.

Note: See TracTickets for help on using tickets.