Opened 5 years ago

Closed 5 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

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(
        at petascope.PetascopeInterface.doPost(
        at javax.servlet.http.HttpServlet.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.apache.catalina.core.StandardWrapperValve.invoke(
        at org.apache.catalina.core.StandardContextValve.invoke(
        at org.apache.catalina.core.StandardHostValve.invoke(
        at org.apache.catalina.valves.ErrorReportValve.invoke(
        at org.apache.catalina.core.StandardEngineValve.invoke(
        at org.apache.catalina.connector.CoyoteAdapter.service(
        at org.apache.coyote.http11.Http11Processor.process(
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Caused by: java.lang.NullPointerException
        at petascope.wcps.server.core.DimensionIntervalElement.<init>(
        at petascope.wcps.server.core.TrimCoverageExpr.<init>(
        at petascope.wcps.server.core.SubsetOperationCoverageExpr.<init>(
        at petascope.wcps.server.core.CoverageExpr.<init>(
        at petascope.wcps.server.core.EncodeDataExpr.<init>(
        at petascope.wcps.server.core.XmlQuery.startParsing(
        at petascope.wcps.server.core.ProcessCoveragesRequest.<init>(
        at petascope.wcps.server.core.Wcps.pcPrepare(
        at petascope.wcps.server.core.Wcps.pcPrepare(
        at petascope.PetascopeInterface.handleProcessCoverages(
        at petascope.PetascopeInterface.doGet(
        ... 15 more
 DEBUG [11:10:22] PetascopeInterface@487: Done marshalling Error Report.

Change History (5)

comment:1 Changed 5 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 5 years ago by abeccati

  • Cc dmisev added

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

comment:3 Changed 5 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 5 years ago by dmisev

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