Bug #4582

Deleting an imported image from model browser when image is opened in editor throws NoSingleResultException

Added by Jani Simomaa about 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:4Due date:
Assignee:Tuukka Lehtonen% Done:

100%

Category:-Spent time:-
Target version:1.13.1
Release notes:
Story pointsS
Velocity based estimate-
ReleaseSimantics 1.13.2Release relationshipAuto

Description

Import an image to a library. Double click the imported image to open it in editor. Now delete the image from browser. Following exception is thrown:

org.simantics.db.exception.NoSingleResultException: 
    at org.simantics.db.impl.graph.ReadGraphImpl.getSingleType(ReadGraphImpl.java:674)
    at org.simantics.image.ui.editor.ImageEditor$4.perform(ImageEditor.java:298)
    at org.simantics.db.impl.query.ReadEntry$1.recompute(ReadEntry.java:86)
    at org.simantics.db.impl.query.QueryProcessor.compareTo(QueryProcessor.java:2322)
    at org.simantics.db.impl.query.QueryProcessor.performScheduledUpdates(QueryProcessor.java:2398)
    at fi.vtt.simantics.procore.internal.State.commitWriteTransaction(State.java:350)
    at fi.vtt.simantics.procore.internal.SessionRequestManager$4.run(SessionRequestManager.java:240)
    at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:239)

Related issues

Related to Platform - Bug #4591: Undo-Redo failure with literals larger than 30KB Closed 2014-06-17 2014-09-05

Associated revisions

Revision 28499
Added by Tuukka Lehtonen about 4 years ago

Fixing an unexpected exception case in ImageEditor than happens if the input image is removed while an editor is open for it.
The fix changes the editor so that it tracks whether its input is still a valid resource with a URI. The editor is closed automatically if not and the input calculation request can now handle situations where the input is no longer a valid SVG/bitmap image.

refs #4582

History

#1 Updated by Jani Simomaa about 4 years ago

  • Description updated (diff)

#2 Updated by Jani Simomaa about 4 years ago

  • Description updated (diff)

#3 Updated by Tuukka Lehtonen about 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Tuukka Lehtonen
  • Target version set to 1.13.1
  • % Done changed from 0 to 100

#4 Updated by Tuukka Lehtonen about 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF