Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
d825f6dd
Commit
d825f6dd
authored
14 years ago
by
Mickael Savinaud
Browse files
Options
Downloads
Patches
Plain Diff
ENH: solve a weird seg fault with the dora nightly test about hdf4
parent
4982fc97
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMake/TestHDF4Open.cxx
+6
-3
6 additions, 3 deletions
CMake/TestHDF4Open.cxx
with
6 additions
and
3 deletions
CMake/TestHDF4Open.cxx
+
6
−
3
View file @
d825f6dd
...
...
@@ -65,13 +65,16 @@ int main(int argc, char * argv[])
int
xSizeROI
=
xSize
/
100
;
int
ySizeROI
=
ySize
/
100
;
// To solve a weird seg fault with this test under dora and gdal 1.7.2, we move from 0,0 to 0,1.
int
xBeginROI
=
0
;
int
yBeginROI
=
1
;
int
ret
=
0
;
if
(
pxlType
==
GDT_Byte
)
{
typedef
unsigned
char
UCHAR
;
UCHAR
*
buffer
=
new
UCHAR
[
xSizeROI
*
ySizeROI
];
CPLErr
lCrGdal
=
rb
->
RasterIO
(
GF_Read
,
0
,
0
,
xSizeROI
,
ySizeROI
,
buffer
,
xSizeROI
,
ySizeROI
,
pxlType
,
0
,
0
);
CPLErr
lCrGdal
=
rb
->
RasterIO
(
GF_Read
,
xBeginROI
,
yBeginROI
,
xSizeROI
,
ySizeROI
,
buffer
,
xSizeROI
,
ySizeROI
,
pxlType
,
0
,
0
);
if
(
lCrGdal
==
CE_Failure
)
{
ret
=
1
;
...
...
@@ -82,7 +85,7 @@ int main(int argc, char * argv[])
{
typedef
short
int
SHORT
;
SHORT
*
buffer
=
new
SHORT
[
xSizeROI
*
ySizeROI
];
CPLErr
lCrGdal
=
rb
->
RasterIO
(
GF_Read
,
0
,
0
,
xSizeROI
,
ySizeROI
,
buffer
,
xSizeROI
,
ySizeROI
,
pxlType
,
0
,
0
);
CPLErr
lCrGdal
=
rb
->
RasterIO
(
GF_Read
,
xBeginROI
,
yBeginROI
,
xSizeROI
,
ySizeROI
,
buffer
,
xSizeROI
,
ySizeROI
,
pxlType
,
0
,
0
);
if
(
lCrGdal
==
CE_Failure
)
{
ret
=
1
;
...
...
@@ -92,7 +95,7 @@ int main(int argc, char * argv[])
else
if
(
pxlType
==
GDT_Float32
)
{
float
*
buffer
=
new
float
[
xSizeROI
*
ySizeROI
];
CPLErr
lCrGdal
=
rb
->
RasterIO
(
GF_Read
,
0
,
0
,
xSizeROI
,
ySizeROI
,
buffer
,
xSizeROI
,
ySizeROI
,
pxlType
,
0
,
0
);
CPLErr
lCrGdal
=
rb
->
RasterIO
(
GF_Read
,
xBeginROI
,
yBeginROI
,
xSizeROI
,
ySizeROI
,
buffer
,
xSizeROI
,
ySizeROI
,
pxlType
,
0
,
0
);
if
(
lCrGdal
==
CE_Failure
)
{
ret
=
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment