Opened 12 years ago

Closed 12 years ago

#288 closed defect (fixed)

WCPS segfaults when using invalid axis name

Reported by: Alireza Owned by: abeccati
Priority: minor Milestone: 8.4
Component: petascope Version: 8.3
Keywords: Cc: Dimitar Misev
Complexity: Medium

Description (last modified by Dimitar Misev)

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 by Dimitar Misev, 12 years ago

Milestone: 8.4
Priority: majorminor
Reporter: changed from a.rezaeim@… to Alireza

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 by abeccati, 12 years ago

Cc: Dimitar Misev added

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

comment:3 by Dimitar Misev, 12 years ago

Description: modified (diff)
Summary: Some of ID demos do not work on osgeo-liveWCPS segfaults when using invalid axis name

comment:5 by Dimitar Misev, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.