Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E escet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 92
    • Issues 92
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse ProjectsEclipse Projects
  • Eclipse ESCET (Supervisory Control Engineering Toolkit)
  • escet
  • Issues
  • #207
Closed
Open
Issue created Oct 26, 2021 by Dennis Hendriks@ddennisMaintainer

NullPointerException in case of SVG load error

Simulating the following .chi file:

model M():
  file f = open("SVG:does_not_exist.svg", "w");
  close(f);
end

results in:

ERROR: Invalid input was encountered.
CAUSE: Failed to open editor "org.eclipse.escet.common.svg.SvgVisualizer" for file "C:\Programs\Siemens\escet\dev121-2\runtime-product-escet\test\does_not_exist.svg".
CAUSE: (NullPointerException) <cause details not available>

The following is logged:

java.lang.NullPointerException
	at org.eclipse.escet.common.svg.SvgViewer.createContents(SvgViewer.java:322)
	at org.eclipse.escet.common.eclipse.ui.ControlEditor.createPartControl(ControlEditor.java:123)
[...]

The SvgViewer crashes with a NullPointerException if the SVG file could not be loaded, rather than opening and then displaying the error in the visualizer, and forwarding it to the simulator. The expected simulation result is:

ERROR: Failed to load SVG image "[...]\test\does_not_exist.svg".
CAUSE: SVG image file "[...]\test\does_not_exist.svg" could not be found, is a directory, or for some other reason could not be opened for reading.
CAUSE: (FileNotFoundException) [...]\test\does_not_exist.svg (The system cannot find the file specified)
Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent