nlplab / brat

brat rapid annotation tool (brat) - for all your textual annotation needs
http://brat.nlplab.org
Other
1.82k stars 509 forks source link

Ungraceful crash on broken annotation #179

Closed spyysalo closed 11 years ago

spyysalo commented 13 years ago

(Not sure if this is server- or clientside, but guessing server)

I encountered a case of broken annotation (not sure how I managed to create this) that causes the system to fail ungracefully. There is no message explaining the cause of the crash, and the client writes out "Cannot save SVG: corrupt" and goes into a state where nothing can be visualized without reload.

To replicate, create the following .txt

The relationship of glycosylation and isoelectric point with tumor accumulation of avidin. 
Radiolabeled avidin markedly accumulated in intraperitoneal tumors and was cleared rapidly from circulation when given intraperitoneally. This study investigated the mechanisms of the tumor localization of avidin. METHODS: Avidin was deglycosylated through endoglycosydase-H digestion and/or neutralized by acetylation of its lysine amino acids with acetic acid N-hydroxysuccinimide ester. Avidin and modified avidins were analyzed using sodium dodecylsulfate-polyacrylamide gel electrophoresis (SDS/PAGE) and isoelectric focusing. A tumor model was established by intraperitoneal injection of human colon cancer cells, LS180, in nude mice. Avidin and modified avidins were labeled with 111In using diethyleneamine pentaacetic acid-biotin and were administered intraperitoneally into the tumor-bearing mice. The biodistribution of radioactivity was examined 2 and 24 h postinjection. RESULTS: Deglycosylated avidins revealed a major band of smaller molecules on SDS/PAGE. The isoelectric point of neutralized avidins was reduced to less than 5, whereas that of unneutralized avidins was more than 9.5. Biodistribution study demonstrated that liver uptake was decreased by deglycosylation and kidney accumulation was decreased by neutralization, respectively. The blood clearance was remarkably slowed by combined modification of deglycosylation and neutralization. The tumor uptake of radioactivity was reduced by either deglycosylation or neutralization and was further decreased with combined modification. CONCLUSION: Both high glycosylation and positive charge of avidin contributed to its accumulation in tumor. This study may facilitate development of a new vehicle for the delivery of therapeutic agents to intraperitoneal tumors.

And the following .ann

T2  Entity 105 111  avidin
T26 Protein 92 104  Radiolabeled
T27 Entity 183 187  from
*   Equiv T2 T26
E13 Protein:T26 Protein-Component:T2

(Here, E13 is semantically incoherent.)

This and similar cases should be handled gracefully -- there's no need to try to display broken annotation, but the system should report the problem and the interface should not go into a lock state.

ghost commented 13 years ago

I'll verify where it as breaking and then assign it to me or @amadanmath.

ghost commented 13 years ago

Okay, as @spyysalo pointed out, the annotations themselves are semantically non-sense. Thus the server won't pick it up and will send it over to the client (unless verification is turned on, which can catch it). The client then goes down in flames with:

 console.error('FIXME Error during rendering: ', x); // FIXME

But this does not halt the client and what the server is then getting from the client as an SVG is:

INFO:root:dispatcher will call storeSVG('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="0" height="0"/>')

Giving the infamous SVG error. Handing this one to @amadanmath, it will be just fine if the server halts and warns if it can't render and we'll leave it at that point for now.

ghost commented 13 years ago

A fix for this one is possibly related to #131.

ghost commented 11 years ago

@amadanmath: Given that the rendering logic has changed over the last two years, is this still an issue?

amadanmath commented 11 years ago

No crash, sensible error messages, closing.