Opened 10 years ago

Closed 9 years ago

#1032 closed defect (fixed)

ErrorCommandExecution g.proj

Reported by: sallar Owned by: grass-dev@…
Priority: critical Milestone: 6.4.0
Component: Default Version: 6.4.0 RCs
Keywords: g.proj Cc:
CPU: x86-32 Platform: Linux

Description

By starting with grass wxgui, hangs with the following error [1]

In the shell appears as follows:

File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/wxgui_utils.py", line 84, in __init__
    self.Map = render.Map()    # instance of render.Map to be associated with display
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/render.py", line 402, in __init__
    self.projinfo = self.ProjInfo()
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/render.py", line 765, in ProjInfo
    p = gcmd.Command(['g.proj', '-p'])
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/gcmd.py", line 369, in __init__
    _("Error: ") + self.GetError()))
gui_modules.gcmd.CmdError

[1]-http://www.filedropper.com/errorincommandexecutiongproj

Attachments (2)

gproj_valgrind.txt (34.3 KB) - added by neteler 9 years ago.
valgrind output but from a 64bit Linux machine where g.proj works
gproj_valgrind_32bit.txt (64.6 KB) - added by aghisla 9 years ago.
valgrind output of a 32bit Debian testing machine where g.proj -p works

Download all attachments as: .zip

Change History (22)

comment:1 Changed 10 years ago by martinl

Keywords: wxGUI removed

Please try to run

g.proj -p

What is says?

comment:2 in reply to:  1 Changed 10 years ago by sallar

Replying to martinl:

Please try to run

g.proj -p

What is says?

This is part of the output:

GRASS 6.4.0RC6 (PIT):~ > g.proj -p
XY location (unprojected)
*** glibc detected *** g.proj: double free or corruption (fasttop): 0x0804e510 ***

comment:3 Changed 10 years ago by hamish

could you run with DEBUG level set to 5?

g.gisenv set="DEBUG=5"

could you post a gdb backtrace?

http://grass.osgeo.org/wiki/Bugs#Using_GDB

Hamish

comment:4 Changed 10 years ago by martinl

Component: wxGUIdefault

comment:5 in reply to:  3 ; Changed 10 years ago by sallar

Replying to hamish:

could you run with DEBUG level set to 5?

g.gisenv set="DEBUG=5"

ok, I set the debug level to 5! then....

could you post a gdb backtrace?

http://grass.osgeo.org/wiki/Bugs#Using_GDB

......

GRASS 6.4.0RC6 (PIT):~ > gdb g.gui
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /usr/local/grass-6.4.0RC6/bin/g.gui 
D1/5: Attempting to start 'wxpython' GUI ...
Error: Reading settings from file </home/sam/.grasswx6> failed.
       Details: need more than 1 value to unpack
       Line: 'profile:raster2:pstyle:solid:pwidth:1:pcolor:(0, 255, 0, 255)'
Error: Reading settings from file </home/sam/.grasswx6> failed.
       Details: need more than 1 value to unpack
       Line: 'profile:raster2:pstyle:solid:pwidth:1:pcolor:(0, 255, 0, 255)'
*** glibc detected *** g.proj: double free or corruption (fasttop): 0x0804e510 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb784a624]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb784c826]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb74c82e1]
/usr/lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1d)[0xb74a4b2d]
/usr/lib/libstdc++.so.6(_ZNSsD1Ev+0x51)[0xb74a6501]
/lib/i686/cmov/libc.so.6(__cxa_finalize+0xc1)[0xb780ae51]
/usr/lib/libgeos-3.1.0.so[0xb731cdc4]
/usr/lib/libgeos-3.1.0.so[0xb73c5cd0]
/lib/ld-linux.so.2[0xb7f4a453]
/lib/i686/cmov/libc.so.6(exit+0x89)[0xb780aab9]
g.proj(main+0x3d2)[0x804a7d2]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb77f2455]
g.proj[0x8049a21]
======= Memory map: ========
08048000-0804c000 r-xp 00000000 03:03 1164337    /usr/local/grass-6.4.0RC6/bin/g.proj
0804c000-0804d000 rw-p 00004000 03:03 1164337    /usr/local/grass-6.4.0RC6/bin/g.proj
0804d000-0806e000 rw-p 0804d000 00:00 0          [heap]
b6d00000-b6d21000 rw-p b6d00000 00:00 0 
b6d21000-b6e00000 ---p b6d21000 00:00 0 
b6e4b000-b6e4e000 rw-p b6e4b000 00:00 0 
b6e4e000-b6eb4000 r-xp 00000000 03:03 819183     /usr/lib/libgcrypt.so.11.4.4
b6eb4000-b6eb6000 rw-p 00066000 03:03 819183     /usr/lib/libgcrypt.so.11.4.4
b6eb6000-b6eb9000 r-xp 00000000 03:03 818510     /usr/lib/libgpg-error.so.0.3.0
b6eb9000-b6eba000 rw-p 00002000 03:03 818510     /usr/lib/libgpg-error.so.0.3.0
b6eba000-b6ec9000 r-xp 00000000 03:03 818452     /usr/lib/libtasn1.so.3.0.15
b6ec9000-b6eca000 rw-p 0000e000 03:03 818452     /usr/lib/libtasn1.so.3.0.15
b6eca000-b6f61000 r-xp 00000000 03:03 818764     /usr/lib/libgnutls.so.26.4.6
b6f61000-b6f67000 rw-p 00097000 03:03 818764     /usr/lib/libgnutls.so.26.4.6
b6f67000-b6f68000 rw-p b6f67000 00:00 0 
b6f68000-b6f7e000 r-xp 00000000 03:03 817192     /usr/lib/libsasl2.so.2.0.22
b6f7e000-b6f7f000 rw-p 00015000 03:03 817192     /usr/lib/libsasl2.so.2.0.22
b6f7f000-b6f8b000 r-xp 00000000 03:03 817395     /usr/lib/liblber-2.4.so.2.1.0
b6f8b000-b6f8c000 rw-p 0000c000 03:03 817395     /usr/lib/liblber-2.4.so.2.1.0
b6f8c000-b6f9c000 r-xp 00000000 03:03 51464      /lib/i686/cmov/libresolv-2.7.so
b6f9c000-b6f9e000 rw-p 0000f000 03:03 51464      /lib/i686/cmov/libresolv-2.7.so
b6f9e000-b6fa0000 rw-p b6f9e000 00:00 0 
b6fa0000-b6fa2000 r-xp 00000000 03:03 32806      /lib/libkeyutils-1.2.so
b6fa2000-b6fa3000 rw-p 00001000 03:03 32806      /lib/libkeyutils-1.2.so
b6fa3000-b6faa000 r-xp 00000000 03:03 277767     /usr/lib/libkrb5support.so.0.1
b6faa000-b6fab000 rw-p 00006000 03:03 277767     /usr/lib/libkrb5support.so.0.1
b6fab000-b6fac000 rw-p b6fab000 00:00 0 
b6fac000-b6fcf000 r-xp 00000000 03:03 277757     /usr/lib/libk5crypto.so.3.1
b6fcf000-b6fd0000 rw-p 00023000 03:03 277757     /usr/lib/libk5crypto.so.3.1
b6fd0000-b6fe5000 r-xp 00000000 03:03 51453      /lib/i686/cmov/libpthread-2.7.so
b6fe5000-b6fe7000 rw-p 00014000 03:03 51453      /lib/i686/cmov/libpthread-2.7.so
b6fe7000-b6fe9000 rw-p b6fe7000 00:00 0 
b6fe9000-b7029000 r-xp 00000000 03:03 817426     /usr/lib/libldap_r-2.4.so.2.1.0
b7029000-b702b000 rw-p 0003f000 03:03 817426     /usr/lib/libldap_r-2.4.so.2.1.0
b702b000-b702c000 rw-p b702b000 00:00 0 
b702c000-b7035000 r-xp 00000000 03:03 50035      /lib/i686/cmov/libcrypt-2.7.so
b7035000-b7037000 rw-p 00008000 03:03 50035      /lib/i686/cmov/libcrypt-2.7.so
b7037000-b705e000 rw-p b7037000 00:00 0 
b705e000-b7087000 r-xp 00000000 03:03 277751     /usr/lib/libgssapi_krb5.so.2.2
b7087000-b7088000 rw-p 00028000 03:03 277751     /usr/lib/libgssapi_krb5.so.2.2
b7088000-b7089000 rw-p b7088000 00:00 0 
b7089000-b708b000 r-xp 00000000 03:03 32652      /lib/libcom_err.so.2.1
b708b000-b708c000 rw-p 00001000 03:03 32652      /lib/libcom_err.so.2.1
b708c000-b711e000 r-xp 00000000 03:03 277766     /usr/lib/libkrb5.so.3.3
b711e000-b7120000 rw-p 00092000 03:03 277766     /usr/lib/libkrb5.so.3.3
b7120000-b725a000 r-xp 00000000 03:03 1354596    /usr/lib/i686/cmov/libcrypto.so.0.9.8
b725a000-b7270000 rw-p 0013a000 03:03 1354596    /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7270000-b7273000 rw-p b7270000 00:00 0 
b7273000-b72b6000 r-xp 00000000 03:03 1354592    /usr/lib/i686/cmov/libssl.so.0.9.8
b72b6000-b72ba000 rw-p 00042000 03:03 1354592    /usr/lib/i686/cmov/libssl.so.0.9.8
b72ba000-b73fd000 r-xp 00000000 03:03 821737     /usr/lib/libgeos-3.1.0.so
b73fd000-b7402000 rw-p 00143000 03:03 821737     /usr/lib/libgeos-3.1.0.so
b7402000-b7403000 rw-p b7402000 00:00 0 
b7403000-b740f000 r-xp 00000000 03:03 32763      /lib/libgcc_s.so.1
b740f000-b7410000 rw-p 0000b000 03:03 32763      /lib/libgcc_s.so.1
b7410000-b74f3000 r-xp 00000000 03:03 821240     /usr/lib/libstdc++.so.6.0.10
b74f3000-b74f6000 r--p 000e2000 03:03 821240     /usr/lib/libstdc++.so.6.0.10
b74f6000-b74f8000 rw-p 000e5000 03:03 821240     /usr/lib/libstdc++.so.6.0.10
b74f8000-b74fe000 rw-p b74f8000 00:00 0 
b74fe000-b7505000 r-xp 00000000 03:03 51463      /lib/i686/cmov/librt-2.7.so
b7505000-b7507000 rw-p 00006000 03:03 51463      /lib/i686/cmov/librt-2.7.so
b7507000-b7525000 r-xp 00000000 03:03 817705     /usr/lib/libpq.so.5.1
b7525000-b7526000 rw-p 0001e000 03:03 817705     /usr/lib/libpq.so.5.1
b7526000-b7544000 r-xp 00000000 03:03 505926     /usr/local/lib/libNCSUtil.so.0.0.0
b7544000-b7546000 rw-p 0001d000 03:03 505926     /usr/local/lib/libNCSUtil.so.0.0.0
b7546000-b7548000 rw-p b7546000 00:00 0 
b7548000-b755b000 r-xp 00000000 03:03 505938     /usr/local/lib/libNCSCnet.so.0.0.0
b755b000-b755c000 rw-p 00013000 03:03 505938     /usr/local/lib/libNCSCnet.so.0.0.0
b755c000-b766f000 r-xp 00000000 03:03 505921     /usr/local/lib/libNCSEcw.so.0.0.0
b766f000-b7677000 rw-p 00112000 03:03 505921     /usr/local/lib/libNCSEcw.so.0.0.0
b7677000-b7684000 rw-p b7677000 00:00 0 
b7684000-b77be000 r-xp 00000000 03:03 277624     /usr/lib/libgeos-3.0.0.so
b77be000-b77c3000 rw-p 00139000 03:03 277624     /usr/lib/libgeos-3.0.0.so
b77c3000-b77d6000 r-xp 00000000 03:03 825564     /usr/lib/libgeos_c.so.1.5.0
b77d6000-b77d7000 rw-p 00012000 03:03 825564     /usr/lib/libgeos_c.so.1.5.0
b77d7000-b77d9000 r-xp 00000000 03:03 51457      /lib/i686/cmov/libdl-2.7.so
b77d9000-b77db000 rw-p 00001000 03:03 51457      /lib/i686/cmov/libdl-2.7.so
b77db000-b77dc000 rw-p b77db000 00:00 0 
b77dc000-b7931000 r-xp 00000000 03:03 51460      /lib/i686/cmov/libc-2.7.so
b7931000-b7932000 r--p 00155000 03:03 51460      /lib/i686/cmov/libc-2.7.so
b7932000-b7934000 rw-p 00156000 03:03 51460      /lib/i686/cmov/libc-2.7.so
b7934000-b7937000 rw-p b7934000 00:00 0 
b7937000-b795b000 r-xp 00000000 03:03 49893      /lib/i686/cmov/libm-2.7.so
b795b000-b795d000 rw-p 00023000 03:03 49893      /lib/i686/cmov/libm-2.7.so
b795d000-b7e21000 r-xp 00000000 03:03 832370     /usr/local/lib/libgdal.so.1.12.2
b7e21000-b7e76000 rw-p 004c4000 03:03 832370     /usr/local/lib/libgdal.so.1.12.2
b7e76000-b7e78000 rw-p b7e76000 00:00 0 
b7e78000-b7eab000 r-xp 00000000 03:03 825803     /usr/lib/libproj.so.0.6.6
b7eab000-b7ead000 rw-p 00032000 03:03 825803     /usr/lib/libproj.so.0.6.6
b7ead000-b7ec1000 r-xp 00000000 03:03 819787     /usr/lib/libz.so.1.2.3.3
b7ec1000-b7ec2000 rw-p 00013000 03:03 819787     /usr/lib/libz.so.1.2.3.3
b7edb000-b7edc000 rw-p b7edb000 00:00 0 
b7edc000-b7ee3000 r-xp 00000000 03:03 1390077    /usr/local/grass-6.4.0RC6/lib/libgrass_datetime.6.4.0RC6.so
b7ee3000-b7ee4000 rw-p 00006000 03:03 1390077    /usr/local/grass-6.4.0RC6/lib/libgrass_datetime.6.4.0RC6.so
b7ee4000-b7ee5000 rw-p b7ee4000 00:00 0 
b7ee5000-b7f2e000 r-xp 00000000 03:03 1390098    /usr/local/grass-6.4.0RC6/lib/libgrass_gis.6.4.0RC6.so
b7f2e000-b7f30000 rw-p 00048000 03:03 1390098    /usr/local/grass-6.4.0RC6/lib/libgrass_gis.6.4.0RC6.so
b7f30000-b7f31000 rw-p b7f30000 00:00 0 
b7f31000-b7f38000 r-xp 00000000 03:03 1390107    /usr/local/grass-6.4.0RC6/lib/libgrass_gproj.6.4.0RC6.so
b7f38000-b7f39000 rw-p 00007000 03:03 1390107    /usr/local/grass-6.4.0RC6/lib/libgrass_gproj.6.4.0RC6.so
b7f39000-b7f3b000 rw-p b7f39000 00:00 0 
b7f3b000-b7f3c000 r-xp b7f3b000 00:00 0          [vdso]
b7f3c000-b7f56000 r-xp 00000000 03:03 34485      /lib/ld-2.7.so
b7f56000-b7f58000 rw-p 0001a000 03:03 34485      /lib/ld-2.7.so
bffeb000-c0000000 rw-p bffeb000 00:00 0          [stack]
Traceback (most recent call last):
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1819, in <module>
    sys.exit(main())
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1812, in main
    app = GMApp(workspaceFile)
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1737, in __init__
    wx.App.__init__(self, False)
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7836, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7433, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1755, in OnInit
    workspace = self.workspaceFile)
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 185, in __init__
    self.NewDisplay(show=False)
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1236, in NewDisplay
    auimgr=self._auimgr, showMapDisplay=show)
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/wxgui_utils.py", line 84, in __init__
    self.Map = render.Map()    # instance of render.Map to be associated with display
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/render.py", line 402, in __init__
    self.projinfo = self.ProjInfo()
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/render.py", line 765, in ProjInfo
    p = gcmd.Command(['g.proj', '-p'])
  File "/usr/local/grass-6.4.0RC6/etc/wxpython/gui_modules/gcmd.py", line 369, in __init__
    _("Error: ") + self.GetError()))
gui_modules.gcmd.CmdError

Hamish

I hope I have done everything correctly!

comment:6 in reply to:  5 ; Changed 10 years ago by martinl

Replying to sallar:

Replying to hamish:

could you run with DEBUG level set to 5?

g.gisenv set="DEBUG=5"

ok, I set the debug level to 5! then....

could you post a gdb backtrace?

http://grass.osgeo.org/wiki/Bugs#Using_GDB

> GRASS 6.4.0RC6 (PIT):~ > gdb g.gui

Please run

gdb g.proj
run -p

instead.

comment:7 in reply to:  6 Changed 10 years ago by sallar

Replying to martinl:

Please run

gdb g.proj
run -p

instead.

I get this:

GRASS 6.4.0RC6 (PIT):~ > gdb g.proj
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run -p
Starting program: /usr/local/grass-6.4.0RC6/bin/g.proj -p
[Thread debugging using libthread_db enabled]
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj:       0
D3/5: region item: zone:       0
D3/5: region item: north:      4526334.08251007
D3/5: region item: south:      4474101.25111007
D3/5: region item: east:       563815.12526504
D3/5: region item: west:       528349.01576504
D3/5: region item: cols:       20
D3/5: region item: rows:       20
D3/5: region item: e-w resol:  1773.305475
D3/5: region item: n-s resol:  2611.64157
D3/5: region item: top:        1
D3/5: region item: bottom:     0
D3/5: region item: cols3:      20
D3/5: region item: rows3:      20
D3/5: region item: depths:     1
D3/5: region item: e-w resol3: 1773.305475
D3/5: region item: n-s resol3: 2611.64157
D3/5: region item: t-b resol:  1
XY location (unprojected)
*** glibc detected *** /usr/local/grass-6.4.0RC6/bin/g.proj: double free or corruption (fasttop): 0x0804e510 ***
[New Thread 0xb6e036d0 (LWP 10727)]
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb7802624]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7804826]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb74802e1]
/usr/lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1d)[0xb745cb2d]
/usr/lib/libstdc++.so.6(_ZNSsD1Ev+0x51)[0xb745e501]
/lib/i686/cmov/libc.so.6(__cxa_finalize+0xc1)[0xb77c2e51]
/usr/lib/libgeos-3.1.0.so[0xb72d4dc4]
/usr/lib/libgeos-3.1.0.so[0xb737dcd0]
/lib/ld-linux.so.2[0xb7f02453]
/lib/i686/cmov/libc.so.6(exit+0x89)[0xb77c2ab9]
/usr/local/grass-6.4.0RC6/bin/g.proj(main+0x3d2)[0x804a7d2]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb77aa455]
/usr/local/grass-6.4.0RC6/bin/g.proj[0x8049a21]
======= Memory map: ========
08048000-0804c000 r-xp 00000000 03:03 1164337    /usr/local/grass-6.4.0RC6/bin/g.proj
0804c000-0804d000 rw-p 00004000 03:03 1164337    /usr/local/grass-6.4.0RC6/bin/g.proj
0804d000-0806e000 rw-p 0804d000 00:00 0          [heap]
b6d00000-b6d21000 rw-p b6d00000 00:00 0 
b6d21000-b6e00000 ---p b6d21000 00:00 0 
b6e03000-b6e06000 rw-p b6e03000 00:00 0 
b6e06000-b6e6c000 r-xp 00000000 03:03 819183     /usr/lib/libgcrypt.so.11.4.4
b6e6c000-b6e6e000 rw-p 00066000 03:03 819183     /usr/lib/libgcrypt.so.11.4.4
b6e6e000-b6e71000 r-xp 00000000 03:03 818510     /usr/lib/libgpg-error.so.0.3.0
b6e71000-b6e72000 rw-p 00002000 03:03 818510     /usr/lib/libgpg-error.so.0.3.0
b6e72000-b6e81000 r-xp 00000000 03:03 818452     /usr/lib/libtasn1.so.3.0.15
b6e81000-b6e82000 rw-p 0000e000 03:03 818452     /usr/lib/libtasn1.so.3.0.15
b6e82000-b6f19000 r-xp 00000000 03:03 818764     /usr/lib/libgnutls.so.26.4.6
b6f19000-b6f1f000 rw-p 00097000 03:03 818764     /usr/lib/libgnutls.so.26.4.6
b6f1f000-b6f20000 rw-p b6f1f000 00:00 0 
b6f20000-b6f36000 r-xp 00000000 03:03 817192     /usr/lib/libsasl2.so.2.0.22
b6f36000-b6f37000 rw-p 00015000 03:03 817192     /usr/lib/libsasl2.so.2.0.22
b6f37000-b6f43000 r-xp 00000000 03:03 817395     /usr/lib/liblber-2.4.so.2.1.0
b6f43000-b6f44000 rw-p 0000c000 03:03 817395     /usr/lib/liblber-2.4.so.2.1.0
b6f44000-b6f54000 r-xp 00000000 03:03 51464      /lib/i686/cmov/libresolv-2.7.so
b6f54000-b6f56000 rw-p 0000f000 03:03 51464      /lib/i686/cmov/libresolv-2.7.so
b6f56000-b6f58000 rw-p b6f56000 00:00 0 
b6f58000-b6f5a000 r-xp 00000000 03:03 32806      /lib/libkeyutils-1.2.so
b6f5a000-b6f5b000 rw-p 00001000 03:03 32806      /lib/libkeyutils-1.2.so
b6f5b000-b6f62000 r-xp 00000000 03:03 277767     /usr/lib/libkrb5support.so.0.1
b6f62000-b6f63000 rw-p 00006000 03:03 277767     /usr/lib/libkrb5support.so.0.1
b6f63000-b6f64000 rw-p b6f63000 00:00 0 
b6f64000-b6f87000 r-xp 00000000 03:03 277757     /usr/lib/libk5crypto.so.3.1
b6f87000-b6f88000 rw-p 00023000 03:03 277757     /usr/lib/libk5crypto.so.3.1
b6f88000-b6f9d000 r-xp 00000000 03:03 51453      /lib/i686/cmov/libpthread-2.7.so
b6f9d000-b6f9f000 rw-p 00014000 03:03 51453      /lib/i686/cmov/libpthread-2.7.so
b6f9f000-b6fa1000 rw-p b6f9f000 00:00 0 
b6fa1000-b6fe1000 r-xp 00000000 03:03 817426     /usr/lib/libldap_r-2.4.so.2.1.0
b6fe1000-b6fe3000 rw-p 0003f000 03:03 817426     /usr/lib/libldap_r-2.4.so.2.1.0
b6fe3000-b6fe4000 rw-p b6fe3000 00:00 0 
b6fe4000-b6fed000 r-xp 00000000 03:03 50035      /lib/i686/cmov/libcrypt-2.7.so
b6fed000-b6fef000 rw-p 00008000 03:03 50035      /lib/i686/cmov/libcrypt-2.7.so
b6fef000-b7016000 rw-p b6fef000 00:00 0 
b7016000-b703f000 r-xp 00000000 03:03 277751     /usr/lib/libgssapi_krb5.so.2.2
b703f000-b7040000 rw-p 00028000 03:03 277751     /usr/lib/libgssapi_krb5.so.2.2
b7040000-b7041000 rw-p b7040000 00:00 0 
b7041000-b7043000 r-xp 00000000 03:03 32652      /lib/libcom_err.so.2.1
b7043000-b7044000 rw-p 00001000 03:03 32652      /lib/libcom_err.so.2.1
b7044000-b70d6000 r-xp 00000000 03:03 277766     /usr/lib/libkrb5.so.3.3
b70d6000-b70d8000 rw-p 00092000 03:03 277766     /usr/lib/libkrb5.so.3.3
b70d8000-b7212000 r-xp 00000000 03:03 1354596    /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7212000-b7228000 rw-p 0013a000 03:03 1354596    /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7228000-b722b000 rw-p b7
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6e036d0 (LWP 10727)]
0xb7ef3424 in __kernel_vsyscall ()
(gdb) 

comment:8 Changed 10 years ago by hamish

... and then type "bt full" at the (gdb) prompt after it breaks.

did you install from pre-packaged binaries or self-compile? which linux distro/version? (smells like a recent ubuntu) If it's a binary install, where did you get the binaries from?

AFAICT the only thing it could be is this in g.proj/main.c,

    if (projinfo != NULL)
	G_free_key_value(projinfo);
    if (projunits != NULL)
	G_free_key_value(projunits);

but I'm not sure how that could happen as your debug message shows region proj:0. If you built from source could you try to rebuild, running "make distclean" before ./configure?

Hamish

comment:9 in reply to:  8 Changed 10 years ago by sallar

Replying to hamish:

... and then type "bt full" at the (gdb) prompt after it breaks.

(gdb) bt full
#0  0xb7f8e424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb785a640 in raise () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb785c018 in abort () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#3  0xb789734d in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#4  0x00000005 in ?? ()
No symbol table info available.
#5  0xbfffc6ac in ?? ()
No symbol table info available.
#6  0x00000400 in ?? ()
No symbol table info available.
#7  0xbfffc9a8 in ?? ()
No symbol table info available.
#8  0xb7f72780 in G__read_Cell_head (fd=0x2, cellhd=0xb796d648, 
    is_cellhd=-1073747515) at rd_cellhd.c:74
	count = <value optimized out>
	result = 0x400 <Address 0x400 out of bounds>
	array = (char **) 0x77722030
	buf = "-p b72c3000 00:00 0 \nb72c6000-b7309000 r-xp 00000000 03:03 1354592    /usr/lib/i686/cmov/libssl.so.0.9.8\nb7309000-b730d000 rw-p 00042000 03:03 

did you install from pre-packaged binaries or self-compile? which linux distro/version? (smells like a recent ubuntu) If it's a binary install, where did you get the binaries from?

I installed grass by self-compile! My distro is Debian/lenny!

AFAICT the only thing it could be is this in g.proj/main.c,

    if (projinfo != NULL)
	G_free_key_value(projinfo);
    if (projunits != NULL)
	G_free_key_value(projunits);

but I'm not sure how that could happen as your debug message shows region proj:0. If you built from source could you try to rebuild, running "make distclean" before ./configure?

I rebuilt it but without success!

Hamish

thanks

Salvatore

comment:10 Changed 10 years ago by hamish

gdb ... No symbol table info available

I installed grass by self-compile!

can you rebuild without optimization and stripping the binaries? then the gdb output is more informative.

http://grass.osgeo.org/wiki/Bugs#Using_GDB

My distro is Debian/lenny!

same here; but works for me. I wonder if turning on compiler optimization (-O3) is to blame?

as per comment:8 I'm fairly stumped as to how this could happen. (unless perhaps the stack is corrupted)

see also #827, #820, and #555 ... there is certainly a smell of smoke.

Hamish

comment:11 Changed 10 years ago by hamish

this is of course rather suspicious,

#8  0xb7f72780 in G__read_Cell_head (fd=0x2, cellhd=0xb796d648, 
    is_cellhd=-1073747515) at rd_cellhd.c:74
	count = <value optimized out>
	result = 0x400 <Address 0x400 out of bounds>

comment:12 in reply to:  11 Changed 10 years ago by glynn

Replying to hamish:

this is of course rather suspicious,

I wouldn't put too much faith in gdb's output when the binary has been optimised.

Also, the is_cellhd parameter is ignored.

comment:13 Changed 10 years ago by sallar

Hi, I rebuilded whitout optimization and stripping but the result is the same.

I get this by gdb:

GRASS 6.4.0RC6 (PIT):~ > gdb g.proj
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...

then run -p:

(gdb) run -p
Starting program: /usr/local/grass-6.4.0RC6/bin/g.proj -p
[Thread debugging using libthread_db enabled]
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj:       0
D3/5: region item: zone:       0
D3/5: region item: north:      4526334.08251007
D3/5: region item: south:      4474101.25111007
D3/5: region item: east:       563815.12526504
D3/5: region item: west:       528349.01576504
D3/5: region item: cols:       20
D3/5: region item: rows:       20
D3/5: region item: e-w resol:  1773.305475
D3/5: region item: n-s resol:  2611.64157
D3/5: region item: top:        1
D3/5: region item: bottom:     0
D3/5: region item: cols3:      20
D3/5: region item: rows3:      20
D3/5: region item: depths:     1
D3/5: region item: e-w resol3: 1773.305475
D3/5: region item: n-s resol3: 2611.64157
D3/5: region item: t-b resol:  1
XY location (unprojected)
*** glibc detected *** /usr/local/grass-6.4.0RC6/bin/g.proj: double free or corruption (fasttop): 0x0804f510 ***
[New Thread 0xb6dff6d0 (LWP 19967)]
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb77fe624]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7800826]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb747c2e1]
/usr/lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1d)[0xb7458b2d]
/usr/lib/libstdc++.so.6(_ZNSsD1Ev+0x51)[0xb745a501]
/lib/i686/cmov/libc.so.6(__cxa_finalize+0xc1)[0xb77bee51]
/usr/lib/libgeos-3.1.0.so[0xb72d0dc4]
/usr/lib/libgeos-3.1.0.so[0xb7379cd0]
/lib/ld-linux.so.2[0xb7f0c453]
/lib/i686/cmov/libc.so.6(exit+0x89)[0xb77beab9]
/usr/local/grass-6.4.0RC6/bin/g.proj(print_projinfo+0x0)[0x804abec]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb77a6455]
/usr/local/grass-6.4.0RC6/bin/g.proj[0x80499f1]
======= Memory map: ========
08048000-0804d000 r-xp 00000000 03:03 1195911    /usr/local/grass-6.4.0RC6/bin/g.proj
0804d000-0804e000 rw-p 00004000 03:03 1195911    /usr/local/grass-6.4.0RC6/bin/g.proj
0804e000-0806f000 rw-p 0804e000 00:00 0          [heap]
b6c00000-b6c21000 rw-p b6c00000 00:00 0 
b6c21000-b6d00000 ---p b6c21000 00:00 0 
b6dff000-b6e02000 rw-p b6dff000 00:00 0 
b6e02000-b6e68000 r-xp 00000000 03:03 819183     /usr/lib/libgcrypt.so.11.4.4
b6e68000-b6e6a000 rw-p 00066000 03:03 819183     /usr/lib/libgcrypt.so.11.4.4
b6e6a000-b6e6d000 r-xp 00000000 03:03 818510     /usr/lib/libgpg-error.so.0.3.0
b6e6d000-b6e6e000 rw-p 00002000 03:03 818510     /usr/lib/libgpg-error.so.0.3.0
b6e6e000-b6e7d000 r-xp 00000000 03:03 818452     /usr/lib/libtasn1.so.3.0.15
b6e7d000-b6e7e000 rw-p 0000e000 03:03 818452     /usr/lib/libtasn1.so.3.0.15
b6e7e000-b6f15000 r-xp 00000000 03:03 818764     /usr/lib/libgnutls.so.26.4.6
b6f15000-b6f1b000 rw-p 00097000 03:03 818764     /usr/lib/libgnutls.so.26.4.6
b6f1b000-b6f1c000 rw-p b6f1b000 00:00 0 
b6f1c000-b6f32000 r-xp 00000000 03:03 817192     /usr/lib/libsasl2.so.2.0.22
b6f32000-b6f33000 rw-p 00015000 03:03 817192     /usr/lib/libsasl2.so.2.0.22
b6f33000-b6f3f000 r-xp 00000000 03:03 817395     /usr/lib/liblber-2.4.so.2.1.0
b6f3f000-b6f40000 rw-p 0000c000 03:03 817395     /usr/lib/liblber-2.4.so.2.1.0
b6f40000-b6f50000 r-xp 00000000 03:03 51464      /lib/i686/cmov/libresolv-2.7.so
b6f50000-b6f52000 rw-p 0000f000 03:03 51464      /lib/i686/cmov/libresolv-2.7.so
b6f52000-b6f54000 rw-p b6f52000 00:00 0 
b6f54000-b6f56000 r-xp 00000000 03:03 32806      /lib/libkeyutils-1.2.so
b6f56000-b6f57000 rw-p 00001000 03:03 32806      /lib/libkeyutils-1.2.so
b6f57000-b6f5e000 r-xp 00000000 03:03 277584     /usr/lib/libkrb5support.so.0.1
b6f5e000-b6f5f000 rw-p 00006000 03:03 277584     /usr/lib/libkrb5support.so.0.1
b6f5f000-b6f60000 rw-p b6f5f000 00:00 0 
b6f60000-b6f83000 r-xp 00000000 03:03 277557     /usr/lib/libk5crypto.so.3.1
b6f83000-b6f84000 rw-p 00023000 03:03 277557     /usr/lib/libk5crypto.so.3.1
b6f84000-b6f99000 r-xp 00000000 03:03 51453      /lib/i686/cmov/libpthread-2.7.so
b6f99000-b6f9b000 rw-p 00014000 03:03 51453      /lib/i686/cmov/libpthread-2.7.so
b6f9b000-b6f9d000 rw-p b6f9b000 00:00 0 
b6f9d000-b6fdd000 r-xp 00000000 03:03 817426     /usr/lib/libldap_r-2.4.so.2.1.0
b6fdd000-b6fdf000 rw-p 0003f000 03:03 817426     /usr/lib/libldap_r-2.4.so.2.1.0
b6fdf000-b6fe0000 rw-p b6fdf000 00:00 0 
b6fe0000-b6fe9000 r-xp 00000000 03:03 50035      /lib/i686/cmov/libcrypt-2.7.so
b6fe9000-b6feb000 rw-p 00008000 03:03 50035      /lib/i686/cmov/libcrypt-2.7.so
b6feb000-b7012000 rw-p b6feb000 00:00 0 
b7012000-b703b000 r-xp 00000000 03:03 277569     /usr/lib/libgssapi_krb5.so.2.2
b703b000-b703c000 rw-p 00028000 03:03 277569     /usr/lib/libgssapi_krb5.so.2.2
b703c000-b703d000 rw-p b703c000 00:00 0 
b703d000-b703f000 r-xp 00000000 03:03 32652      /lib/libcom_err.so.2.1
b703f000-b7040000 rw-p 00001000 03:03 32652      /lib/libcom_err.so.2.1
b7040000-b70d2000 r-xp 00000000 03:03 277457     /usr/lib/libkrb5.so.3.3
b70d2000-b70d4000 rw-p 00092000 03:03 277457     /usr/lib/libkrb5.so.3.3
b70d4000-b720e000 r-xp 00000000 03:03 1354596    /usr/lib/i686/cmov/libcrypto.so.0.9.8
b720e000-b7224000 rw-p 0013a000 03:03 1354596    /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7224000-b7227000
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6dff6d0 (LWP 19967)]
0xb7efd424 in __kernel_vsyscall ()

and bt full:

(gdb) bt full
#0  0xb7efd424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb77bb640 in raise () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb77bd018 in abort () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#3  0xb77f834d in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#4  0x00000005 in ?? ()
No symbol table info available.
#5  0xbfffd0bc in ?? ()
No symbol table info available.
#6  0x00000400 in ?? ()
No symbol table info available.
#7  0x6f736572 in ?? ()
No symbol table info available.
#8  0x20203a6c in ?? ()
No symbol table info available.
#9  0xb78ce648 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#10 0x00000017 in ?? ()
No symbol table info available.
#11 0xbffff9de in ?? ()
No symbol table info available.
#12 0x00000024 in ?? ()
No symbol table info available.
#13 0xb78ce661 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#14 0x00000002 in ?? ()
No symbol table info available.
#15 0xb78ce6dc in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#16 0x00000023 in ?? ()
No symbol table info available.
#17 0xb78ce665 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#18 0x00000004 in ?? ()
No symbol table info available.
#19 0xbfffd5eb in ?? ()
No symbol table info available.
#20 0x00000008 in ?? ()
No symbol table info available.
#21 0xb78ce66b in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#22 0x00000005 in ?? ()
No symbol table info available.
#23 0xb7ea1a6e in ?? () from /usr/local/grass-6.4.0RC6/lib/libgrass_gis.so
No symbol table info available.
#24 0xb779ca8c in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#25 0xb78ce66b in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#26 0x00000005 in ?? ()
No symbol table info available.
#27 0xbfffcff0 in ?? ()
No symbol table info available.
#28 0xb77f81a1 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#29 0xb78ce66c in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#30 0x00000025 in ?? ()
No symbol table info available.
#31 0xb7f075cf in ?? () from /lib/ld-linux.so.2
No symbol table info available.
#32 0xb77fe624 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#33 0x00000002 in ?? ()
No symbol table info available.
#34 0xb78ce648 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#35 0xbffff9de in ?? ()
No symbol table info available.
#36 0xb78ce6dc in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#37 0xbfffd5eb in ?? ()
No symbol table info available.
#38 0xb78ce6dc in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#39 0x30ffd628 in ?? ()
No symbol table info available.
#40 0x66343038 in ?? ()
No symbol table info available.
#41 0x00303135 in ?? ()
No symbol table info available.
#42 0xb78e6ff4 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#43 0xb78e8160 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#44 0x0804f510 in ?? ()
No symbol table info available.
#45 0xbfffd620 in ?? ()
No symbol table info available.
#46 0xb7800826 in free () from /lib/i686/cmov/libc.so.6
No symbol table info available.
Backtrace stopped: frame did not save the PC

thanks!

comment:14 in reply to:  13 ; Changed 10 years ago by glynn

Replying to sallar:

Hi, I rebuilded whitout optimization and stripping but the result is the same.

I get this by gdb:

#46 0xb7800826 in free () from /lib/i686/cmov/libc.so.6
No symbol table info available.
Backtrace stopped: frame did not save the PC

I'm not sure why the backtrace stopped (maybe the caller was built with -fomit-frame-pointer?), but it looks like heap corruption. In which case, the stack trace doesn't really help, as the error is in whatever caused the heap corruption, not whatever happens to get bitten by it. valgrind might be able to help here.

comment:15 in reply to:  14 ; Changed 10 years ago by martinl

Replying to glynn:

I'm not sure why the backtrace stopped (maybe the caller was built with -fomit-frame-pointer?), but it looks like heap corruption. In which case, the stack trace doesn't really help, as the error is in whatever caused the heap corruption, not whatever happens to get bitten by it. valgrind might be able to help here.

Can you post here valgrind output ?

http://grass.osgeo.org/wiki/GRASS_Debugging#Using_Valgrind

comment:16 in reply to:  15 ; Changed 9 years ago by martinl

Replying to martinl:

Replying to glynn:

I'm not sure why the backtrace stopped (maybe the caller was built with -fomit-frame-pointer?), but it looks like heap corruption. In which case, the stack trace doesn't really help, as the error is in whatever caused the heap corruption, not whatever happens to get bitten by it. valgrind might be able to help here.

Can you post here valgrind output ?

http://grass.osgeo.org/wiki/GRASS_Debugging#Using_Valgrind

The ticket is marked as "blocker", valgrind output could help to solved this issue.

comment:17 in reply to:  16 Changed 9 years ago by martinl

Priority: blockercritical

Replying to martinl:

I'm not sure why the backtrace stopped (maybe the caller was built with -fomit-frame-pointer?), but it looks like heap corruption. In which case, the stack trace doesn't really help, as the error is in whatever caused the heap corruption, not whatever happens to get bitten by it. valgrind might be able to help here.

Can you post here valgrind output ?

http://grass.osgeo.org/wiki/GRASS_Debugging#Using_Valgrind

The ticket is marked as "blocker", valgrind output could help to solved this issue.

downgrading the priority...

Changed 9 years ago by neteler

Attachment: gproj_valgrind.txt added

valgrind output but from a 64bit Linux machine where g.proj works

comment:18 Changed 9 years ago by neteler

I have added valgrind output (but here g.proj -p works)

Changed 9 years ago by aghisla

Attachment: gproj_valgrind_32bit.txt added

valgrind output of a 32bit Debian testing machine where g.proj -p works

comment:19 Changed 9 years ago by aghisla

same valgrind command, ran on self-compiled, non optimised GRASS 6.4 r42675.

comment:20 in reply to:  5 Changed 9 years ago by mmetz

Resolution: fixed
Status: newclosed

Replying to sallar:

I see two possibly unrelated problems here, fist is with wxGUI reading a corrupt preferences file, second is g.proj itself. About the first:

Replying to hamish:

could you run with DEBUG level set to 5?

g.gisenv set="DEBUG=5"

ok, I set the debug level to 5! then....

could you post a gdb backtrace?

http://grass.osgeo.org/wiki/Bugs#Using_GDB

> GRASS 6.4.0RC6 (PIT):~ > gdb g.gui
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> (gdb) run
> Starting program: /usr/local/grass-6.4.0RC6/bin/g.gui 
> D1/5: Attempting to start 'wxpython' GUI ...
> Error: Reading settings from file </home/sam/.grasswx6> failed.
>        Details: need more than 1 value to unpack
>        Line: 'profile:raster2:pstyle:solid:pwidth:1:pcolor:(0, 255, 0, 255)'
> Error: Reading settings from file </home/sam/.grasswx6> failed.
>        Details: need more than 1 value to unpack
>        Line: 'profile:raster2:pstyle:solid:pwidth:1:pcolor:(0, 255, 0, 255)'

In the file /home/sam/.grasswx6, delete the lines reading

profile:raster2:pstyle:solid:pwidth:1:pcolor:(0, 255, 0, 255)

and

profile:raster2:pstyle:solid:pwidth:1:pcolor:(0, 255, 0, 255)

The format of .grasswx6 has changed some time ago, entries are now separated by ';' and not by ':', color entries must be e.g. 0:255:0 and not (0, 255, 0, 255). The wxGUI can't read color settings like (0, 255, 0, 255) although it sometimes writes them as such.

About g.proj itself, this has been fixed some time ago. Last week I have installed a recent grass6.4 svn snapshot on various Linux (various distros) and Windows (XP, Vixta, 7) machines and it worked everywhere.

I close this ticket as fixed because last week I have witnessed successful tests with g.proj on 30+ different systems.

Markus M

Note: See TracTickets for help on using tickets.