SynBioDex / SBOLCanvas

Apache License 2.0
12 stars 6 forks source link

Bug exporting SBOL #287

Closed cjmyers closed 3 months ago

cjmyers commented 3 months ago

After creating a new Component, adding a CDS, and importing LacI from the Cello library, I try to export the SBOL, and I get this error:

Type Exception Report

Message Index: 2, Size: 2

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 java.util.ArrayList.rangeCheck(ArrayList.java:659) java.util.ArrayList.get(ArrayList.java:435) utils.MxToSBOL.loadDictionary(MxToSBOL.java:996) utils.MxToSBOL.setupDocument(MxToSBOL.java:143) utils.MxToSBOL.toSBOL(MxToSBOL.java:86) servlets.Convert.doPost(Convert.java:58) javax.servlet.http.HttpServlet.service(HttpServlet.java:681) javax.servlet.http.HttpServlet.service(HttpServlet.java:764) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.apache.catalina.filters.CorsFilter.handleSimpleCORS(CorsFilter.java:264) org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:168) Note The full stack trace of the root cause is available in the server logs.

Seems the problem is that the 2nd entry in this table does not exist. Should check size before fetching entry.

cjmyers commented 3 months ago

Fixed by PR #289