#1736 closed defect (fixed)
WMS getFeatureInfo with OracleSpatial layer crashes
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 5.0 release |
Component: | Input - Native Oracle Spatial Support | Version: | unspecified |
Severity: | major | Keywords: | |
Cc: | umn-ms@… |
Description (last modified by )
Hi, I've made some tests of WMS getFeatureInfo with VML output and I get some crashes when I was using OracleSpatial layers. After some debug I found there is an error in function msOracleSpatialLayerGetShape. This function creates a 1 position array. An then access more positions of this array. the lines involved are: 2069: OCIDefine *adtp = NULL, *items[QUERY_SIZE] = { NULL }; and 2151: success = TRY( hand, OCIDefineByPos( dthand->stmthp, &items[i], hand- >errhp, (ub4)i+1, (dvoid *)layerinfo->items_query[i], (sb4)TEXT_SIZE, SQLT_STR, (sb2 *)&nullind[i], (ub2 *)0, (ub2 *)0, (ub4)OCI_DEFAULT ) ); I modified last line to: success = TRY( hand, OCIDefineByPos( dthand->stmthp, &items[0], hand->errhp, (ub4)i+1, (dvoid *)layerinfo->items_query[i], (sb4)TEXT_SIZE, SQLT_STR, (sb2 *) &nullind[i], (ub2 *)0, (ub2 *)0, (ub4)OCI_DEFAULT ) ); and the crash disappeared. I don't know OCI's API so I don't know if this solution correct. Any Oracle guru that can check it ? Albert Rovira Nexus Geografics
Attachments (2)
Change History (9)
comment:2 by , 18 years ago
Hi, I added a sample map file, I use mapscript to generate it so it is a bit verbose. In the first line (in comment) there is the query url. The layer are polygons. But geometry type seems irrelevant to get the error. In my case when the table contains few columns works, if I add some more columns in the table mapserver crashes in an OCI Oracle function. The size and type of column added seem also irrelevant. The tests I worked are in windows platform. Thank you, Albert Rovira Nexus Geografics
comment:3 by , 18 years ago
Hi, I checked your mapfile and I saw that you defined the data parameter as a "select * from table". I already saw problems when the data was defined using this way. Did you already tried to change your data parameter to include the columns (all or just the columns that you want) instead of "*"? Best regards.
comment:4 by , 18 years ago
Hi Fernando, I clean a bit the test and added the columns in the select (with and without the geom column) all this tests crash the original mapserver and works fine with the modified version. I have only one doubt: What is the real utility of items array ? Should I use a different elements for each call OCIDefineByPos or can I reuse the same? Thank you, Albert Rovira
comment:5 by , 17 years ago
Cc: | added |
---|
comment:6 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I committed the code with the fix in the SVN this afternoon. The revision is 6435. If the problem persist you can reopen the bug. Best regards.
comment:7 by , 17 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 5.0 release |
Note:
See TracTickets
for help on using tickets.