Opened 4 years ago

Closed 4 years ago

#288 closed defect (fixed)

WCPS segfaults when using invalid axis name

Reported by: arezaeim Owned by: abeccati
Priority: minor Milestone: 8.4
Component: petascope Version: 8.3
Keywords: Cc: dmisev
Complexity:

Description (last modified by dmisev)

The NN3_1 has one axis x, but if a query uses t then WCPS will segfault rather than give a proper error message.

Example query:

for t1 in ( NN3_1 ) return encode( t1[ t(0:49) ], "csv" )

Below is tomcat stack trace:

 TRACE [11:10:22] RangeElement@67: Range Element { name 'dynamic_type', type 'unsigned int'}
 ERROR [11:10:22] PetascopeInterface@390: Runtime error : null
 ERROR [11:10:22] PetascopeInterface@436: Error stack trace:
RuntimeError: Runtime error while processing request
        at petascope.PetascopeInterface.doGet(PetascopeInterface.java:391)
        at petascope.PetascopeInterface.doPost(PetascopeInterface.java:214)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
        at petascope.wcps.server.core.DimensionIntervalElement.<init>(DimensionIntervalElement.java:173)
        at petascope.wcps.server.core.TrimCoverageExpr.<init>(TrimCoverageExpr.java:67)
        at petascope.wcps.server.core.SubsetOperationCoverageExpr.<init>(SubsetOperationCoverageExpr.java:55)
        at petascope.wcps.server.core.CoverageExpr.<init>(CoverageExpr.java:124)
        at petascope.wcps.server.core.EncodeDataExpr.<init>(EncodeDataExpr.java:67)
        at petascope.wcps.server.core.XmlQuery.startParsing(XmlQuery.java:109)
        at petascope.wcps.server.core.ProcessCoveragesRequest.<init>(ProcessCoveragesRequest.java:94)
        at petascope.wcps.server.core.Wcps.pcPrepare(Wcps.java:120)
        at petascope.wcps.server.core.Wcps.pcPrepare(Wcps.java:114)
        at petascope.PetascopeInterface.handleProcessCoverages(PetascopeInterface.java:635)
        at petascope.PetascopeInterface.doGet(PetascopeInterface.java:355)
        ... 15 more
 DEBUG [11:10:22] PetascopeInterface@487: Done marshalling Error Report.

Change History (5)

comment:1 Changed 4 years ago by dmisev

  • Milestone set to 8.4
  • Priority changed from major to minor
  • Reporter changed from a.rezaeim@… to arezaeim

We have discovered the error is because the query uses axis name t, but in the database it's x. This should result in a proper error rather than a null pointer exception however, so it's still a valid bug.

comment:2 Changed 4 years ago by abeccati

  • Cc dmisev added

Looks like this ticket belongs better to the OSGEO Live tracker?

comment:3 Changed 4 years ago by dmisev

  • Description modified (diff)
  • Summary changed from Some of ID demos do not work on osgeo-live to WCPS segfaults when using invalid axis name

comment:5 Changed 4 years ago by dmisev

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.