[GRASS-dev] [GRASS GIS] #201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output" is checked

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Details:

1. Download http://download.geonames.org/export/dump/PL.zip, unzip.

2. Run:
{{{
v.in.geonames &
}}}

from the terminal, select the geonames file, check "Verbose module
output", press Run - the window freezes and a backtrace is printed to the
terminal:

{{{
  *** glibc detected *** menuform.py: double free or corruption (fasttop):
0x0000000001b62bf0 ***
======= Backtrace: =========
/lib/libc.so.6[0x2b43193c501d]
/lib/libc.so.6(cfree+0x76)[0x2b43193c6d26]
/usr/lib/libwx_gtk2u_stc-2.8.so.0(_ZN10LineLayout4FreeEv+0x12)[0x2b43259b76e2]
/usr/lib/libwx_gtk2u_stc-2.8.so.0(_ZN10LineLayoutD0Ev+0x17)[0x2b43259b7767]
/usr/lib/libwx_gtk2u_stc-2.8.so.0(_ZN15LineLayoutCache8RetrieveEiiiiii+0x18f)[0x2b43259b7f4f]
/usr/lib/libwx_gtk2u_stc-2.8.so.0(_ZN6Editor18RetrieveLineLayoutEi+0xa6)[0x2b43259b8076]
/usr/lib/libwx_gtk2u_stc-2.8.so.0(_ZN6Editor5PaintEP7Surface10PRectangle+0x60b)[0x2b43259c22eb]
/usr/lib/libwx_gtk2u_stc-2.8.so.0(_ZN11ScintillaWX7DoPaintEP4wxDC6wxRect+0xd1)[0x2b43259a1531]
/usr/lib/libwx_gtk2u_stc-2.8.so.0(_ZN16wxStyledTextCtrl7OnPaintER12wxPaintEvent+0x8f)[0x2b43259a8f6f]
/usr/lib/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent+0x7f)[0x2b431c167fdf]
/usr/lib/libwx_baseu-2.8.so.0(_ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler+0x9f)[0x2b431c16817f]
/usr/lib/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0xb9)[0x2b431c1682c9]
/usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN8wxWindow18GtkSendPaintEventsEv+0x1c7)[0x2b431b7e01b7]
/usr/lib/libwx_gtk2u_core-2.8.so.0[0x2b431b7e06a5]
/usr/lib/libgtk-x11-2.0.so.0[0x2b431cc634df]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x10f)[0x2b431f071b5f]
/usr/lib/libgobject-2.0.so.0[0x2b431f0855ec]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x586)[0x2b431f086d16]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83)[0x2b431f0873b3]
/usr/lib/libgtk-x11-2.0.so.0[0x2b431cd6a8f5]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x48e)[0x2b431cc5d97e]
/usr/lib/libgdk-x11-2.0.so.0[0x2b431d106b94]
/usr/lib/libgdk-
x11-2.0.so.0(gdk_window_process_all_updates+0xd7)[0x2b431d1071b7]
/usr/lib/libgdk-x11-2.0.so.0[0x2b431d1071d9]
/usr/lib/libgdk-x11-2.0.so.0[0x2b431d0ee82e]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1f2)[0x2b431f8ef0f2]
/usr/lib/libglib-2.0.so.0[0x2b431f8f2396]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1b7)[0x2b431f8f2657]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa3)[0x2b431cc5db63]
/usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN11wxEventLoop3RunEv+0x6d)[0x2b431b7cd8ed]
/usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN9wxAppBase8MainLoopEv+0x4b)[0x2b431b8619eb]
/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-
unicode/wx/_core_.so(_ZN7wxPyApp8MainLoopEv+0x37)[0x2b431a284137]
/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-
unicode/wx/_core_.so[0x2b431a2b5e1e]
menuform.py(PyObject_Call+0x13)[0x417d03]
menuform.py(PyEval_EvalFrameEx+0x4043)[0x486643]
menuform.py(PyEval_EvalCodeEx+0x776)[0x4899d6]
menuform.py[0x4d3c48]
menuform.py(PyObject_Call+0x13)[0x417d03]
menuform.py[0x41e50f]
menuform.py(PyObject_Call+0x13)[0x417d03]
menuform.py(PyEval_EvalFrameEx+0x314a)[0x48574a]
menuform.py(PyEval_EvalFrameEx+0x5bd7)[0x4881d7]
menuform.py(PyEval_EvalCodeEx+0x776)[0x4899d6]
menuform.py(PyEval_EvalCode+0x32)[0x489af2]
menuform.py(PyRun_FileExFlags+0x10e)[0x4aaf8e]
menuform.py(PyRun_SimpleFileExFlags+0x1a9)[0x4ab229]
menuform.py(Py_Main+0x8fe)[0x41445e]
/lib/libc.so.6(__libc_start_main+0xf4)[0x2b43193741c4]
menuform.py[0x4139d9]
======= Memory map: ========
00400000-0051b000 r-xp 00000000 08:01 28662
/usr/bin/python2.5
0071b000-0074d000 rw-p 0011b000 08:01 28662
/usr/bin/python2.5
0074d000-01e91000 rw-p 0074d000 00:00 0
[heap]
40000000-40001000 ---p 40000000 00:00 0
40001000-40801000 rw-p 40001000 00:00 0
40801000-40802000 ---p 40801000 00:00 0
40802000-41002000 rw-p 40802000 00:00 0
41002000-41003000 ---p 41002000 00:00 0
41003000-41803000 rw-p 41003000 00:00 0
2aaaaaaab000-2aaaaaab2000 r--p 00000000 08:01 31205
/usr/share/locale/pl/LC_MESSAGES/libgnomeui-2.0.mo
2aaaaaab5000-2aaaaab15000 rw-s 00000000 00:08 8093725
/SYSV00000000 (deleted)
2aaaaab15000-2aaaaab1b000 r-xp 00000000 08:01 82154
/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
2aaaaab1b000-2aaaaad1a000 ---p 00006000 08:01 82154
/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
2aaaaad1a000-2aaaaad1b000 rw-p 00005000 08:01 82154
/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
2aaaaad1b000-2aaaaad26000 r-xp 00000000 08:01 82828
/usr/lib/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
2aaaaad26000-2aaaaaf26000 ---p 0000b000 08:01 82828
/usr/lib/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
2aaaaaf26000-2aaaaaf27000 rw-p 0000b000 08:01 82828
/usr/lib/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
2aaaaaf27000-2aaaaaf8a000 r-xp 00000000 08:01 30948
/usr/lib/libgnomevfs-2.so.0.2200.0
2aaaaaf8a000-2aaaab189000 ---p 00063000 08:01 30948
/usr/lib/libgnomevfs-2.so.0.2200.0
2aaaab189000-2aaaab18e000 rw-p 00062000 08:01 30948
/usr/lib/libgnomevfs-2.so.0.2200.0
2aaaab18e000-2aaaab225000 r-xp 00000000 08:01 31218
/usr/lib/libgnomeui-2.so.0.2000.1
2aaaab225000-2aaaab424000 ---p 00097000 08:01 31218
/usr/lib/libgnomeui-2.so.0.2000.1
2aaaab424000-2aaaab42a000 rw-p 00096000 08:01 31218
/usr/lib/libgnomeui-2.so.0.2000.1
2aaaab42a000-2aaaab462000 r-xp 00000000 08:01 30805
/usr/lib/libgconf-2.so.4.1.5
2aaaab462000-2aaaab662000 ---p 00038000 08:01 30805
/usr/lib/libgconf-2.so.4.1.5
2aaaab662000-2aaaab667000 rw-p 00038000 08:01 30805
/usr/lib/libgconf-2.so.4.1.5
2aaaab667000-2aaaab687000 r-xp 00000000 08:01 228103
/usr/lib/libdbus-glib-1.so.2.1.0
2aaaab687000-2aaaab886000 ---p 00020000 08:01 228103
/usr/lib/libdbus-glib-1.so.2.1.0
2aaaab886000-2aaaab888000 rw-p 0001f000 08:01 228103
/usr/lib/libdbus-glib-1.so.2.1.0
2aaaab888000-2aaaab8c3000 r-xp 00000000 08:01 28469
/usr/lib/libdbus-1.so.3.4.0
2aaaab8c3000-2aaaabac2000 ---p 0003b000 08:01 28469
/usr/lib/libdbus-1.so.3.4.0
2aaaabac2000-2aaaabac4000 rw-p 0003a000 08:01 28469
/usr/lib/libdbus-1.so.3.4.0
2aaaabac4000-2aaaabb42000 r-xp 00000000 08:01 26956
/usr/lib/libgnutls.so.26.1.6
2aaaabb42000-2aaaabd42000 ---p 0007e000 08:01 26956
/usr/lib/libgnutls.so.26.1.6
2aaaabd42000-2aaaabd4d000 rw-p 0007e000 08:01 26956
/usr/lib/libgnutls.so.26.1.6
2aaaabd4d000-2aaaabd50000 r-xp 00000000 08:01 30822
/usr/lib/libavahi-glib.so.1.0.1
2aaaabd50000-2aaaabf4f000 ---p 00003000 08:01 30822
/usr/lib/libavahi-glib.so.1.0.1
2aaaabf4f000-2aaaabf50000 rw-p 00002000 08:01 30822
/usr/lib/libavahi-glib.so.1.0.1
2aaaabf50000-2aaaabf5c000 r-xp 00000000 08:01 28467
/usr/lib/libavahi-common.so.3.5.0
2aaaabf5c000-2aaaac15b000 ---p 0000c000 08:01 28467
/usr/lib/libavahi-common.so.3.5.0
2aaaac15b000-2aaaac15c000 rw-p 0000b000 08:01 28467
/usr/lib/libavahi-common.so.3.5.0
2aaaac15c000-2aaaac16c000 r-xp 00000000 08:01 28471
/usr/lib/libavahi-client.so.3.2.4
2aaaac16c000-2aaaac36b000 ---p 00010000 08:01 28471
/usr/lib/libavahi-client.so.3.2.4
2aaaac36b000-2aaaac36c000 rw-p 0000f000 08:01 28471
/usr/lib/libavahi-client.so.3.2.4
2aaaac36c000-2aaaac37d000 r--s 00000000 08:01 43898
/usr/share/mime/mime.cache
2aaaac385000-2aaaac395000 r-xp 00000000 08:01 333924
/lib/libresolv-2.7.so
2aaaac395000-2aaaac595000 ---p 00010000 08:01 333924
/lib/libresolv-2.7.so
2aaaac595000-2aaaac597000 rw-p 00010000 08:01 333924
/lib/libresolv-2.7.so
2aaaac597000-2aaaac599000 rw-p 2aaaac597000 00:00 0
2aaaac599000-2aaaac603000 r-xp 00000000 08:01 31161
/usr/lib/libbonoboui-2.so.0.0.0
2aaaac603000-2aaaac802000 ---p 0006a000 08:01 31161
/usr/lib/libbonoboui-2.so.0.0.0
2aaaac802000-2aaaac807000 rw-p 00069000 08:01 31161
/usr/lib/libbonoboui-2.so.0.0.0
2a
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201&gt;
GRASS GIS <http://grass.osgeo.org>

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by martinl):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => martinl
* cc: grass-dev@lists.osgeo.org (added)

Comment:

It seems that it crashes because of !EnsureCaretVisible(), for now I have
commented out this function in write() method in GMStderr/GMStderr class;
devbr6/trunk r31931/r31932.

Can you confirm it?

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment (by martinl):

> function in write() method in GMStderr/GMStderr class; devbr6/trunk
r31931/r31932.

correction: devbr6/trunk r31931/r31933

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by msieczka):

  * status: assigned => closed
  * resolution: => fixed

Comment:

Replying to [comment:2 martinl]:
> > function in write() method in GMStderr/GMStderr class; devbr6/trunk
r31931/r31932.
>
> correction: devbr6/trunk r31931/r31933

I confirm no crash now. Thanks! Closing it.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: reopened
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by martinl):

  * status: closed => reopened
  * resolution: fixed =>

Comment:

Ticket reopened. I have commented-out EnsureCaretVisible() in goutput
module (r32357). This method is quite useful, need to be fixed or figured
out why it's sometimes crashing.

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: reopened
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:4 martinl]:
> Ticket reopened. I have commented-out EnsureCaretVisible() in goutput
module (r32357). This method is quite useful, need to be fixed or figured
out why it's sometimes crashing.

Please could you try to run v.in.geonames from trunk. I have rewritten
part of the code dedicated to the module message redirection. In the next
days I will backport it to devbr6, but before that it needs more testing.

Thanks, Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: reopened
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment (by msieczka):

In trunk it's OK too.

The only difference between 7 and 64 is that in 64 I get dirtier output at
building topology stage:

{{{
Building topology for vector map <tempor>...
Registering primitives:
    1000 2000 3000 4000 5000
    6000 7000 8000 9000 10000
   11000 12000 13000 14000
   15000 16000 17000 18000 19000
   20000 21000 22000 23000
   24000 25000 26000 27000 28000
   29000 30000 31000 32000
   33000 34000 35000 36000
   37000 38000 39000 40000
   41000 42000 43000 44000
   45000 46000 47000 48000
   49000
49314 vertices registered
}}}

whereas the same part in 7 is nice and tidy:

{{{
Building topology for vector map <geon7>...
Registering primitives: 49314 primitives registered
49314 vertices registered
}}}

Cool.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#201: v.in.geonames wxGUI window crashes or freezes when "Verbose module output"
is checked
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by martinl):

  * status: reopened => closed
  * resolution: => fixed

Comment:

Also backported to devbr6, ticket closed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/201#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>