Opened 11 years ago

Closed 11 years ago

#361 closed defect (duplicate)

v.mkgrid - segmentation fault

Reported by: paoloC Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: svn-develbranch6
Keywords: Cc:
CPU: x86-32 Platform: Linux

Description

If I compile (configure) grass6.4 svn with this: CFLAGS="-O2 -march=pentium-m -Wall" LDFLAGS="-s" ./configure ...

I get a "segmentation fault" message: v.mkgrid map=pp grid=12,12 position=region --o Segmentation fault

No error if I compile (configure) with this: CFLAGS="-ggdb -Wall -Werror-implicit-function-declaration" ./configure ....

Change History (7)

comment:1 Changed 11 years ago by neteler

What is the gcc version (gcc -v)? There seems to be a problem with the optimization.

Markus

comment:2 Changed 11 years ago by paoloC

paolo@gis-laptop:~$ gcc -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)

Paolo

comment:3 Changed 11 years ago by marisn

Paolo, can You, please, compile v.mkgrid with also "-g" flag and then run it in gdb. Also provide region information.

comment:4 in reply to:  3 Changed 11 years ago by paoloC

Replying to marisn:

Paolo, can You, please, compile v.mkgrid with also "-g" flag and then run it in gdb. Also provide region information.

If I compile with this: CFLAGS="-O2 -march=pentium-m -Wall -g" ./configure ...

gdb which v.mkgrid

... (gdb) run myvectgrid position=region grid=12,12 box=1,1 --o

Starting program: /usr/local/grass-6.4.svn/bin/v.mkgrid myvectgrid position=region grid=12,12 box=1,1 --o

[Thread debugging using libthread_db enabled]

warning: Lowest section in /usr/lib/libicudata.so.38 is .hash at 000000d4

WARNING: 'box' option ignored with 'position=region'

[New Thread 0xb59c1940 (LWP 8329)]

0%

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0xb59c1940 (LWP 8329)]

0xb799cd4b in sincos () from /usr/lib/libgdal1.5.0.so.1

Location is a simple xy loc: g.region -p

projection: 0 (x,y) zone: 0 north: 12 south: 0 west: 0 east: 12 nsres: 1 ewres: 1 rows: 12 cols: 12 cells: 144

I hope this will be useful.

Paolo

comment:5 Changed 11 years ago by glynn

This is a known issue with GDAL:

http://trac.osgeo.org/gdal/ticket/2497

comment:6 Changed 11 years ago by msieczka

Paolo,

What GDAL version do you use? If you use GDAL 1.5.2 + SVN r14997 or greater is the problem gone? I suggest to close the ticket then.

comment:7 Changed 11 years ago by paoloC

Resolution: duplicate
Status: newclosed

Sorry. Of course, ticket must be close. Many thanks.

Note: See TracTickets for help on using tickets.