<div dir="ltr"><div><div><div><br><br>On Fri, Nov 18, 2016 at 4:48 PM, Eduardo Corbelle Rico <<a href="mailto:eduardo.corbelle@gmx.net">eduardo.corbelle@gmx.net</a>> wrote:<br>><br>><br>> O Xov, 17-11-2016 ás 08:52 +0100, Markus Metz escribiu:<br>> ><br>> > On Wed, Nov 16, 2016 at 7:14 PM, Eduardo Corbelle Rico <eduardo.corbe<br>> > <a href="mailto:lle@gmx.net">lle@gmx.net</a>> wrote:<br>> > ><br>> > > O Mér, 16-11-2016 ás 15:22 +0100, Markus Metz escribiu:<br>> > > ><br>> > > > On Wed, Nov 16, 2016 at 11:44 AM, Eduardo Corbelle Rico<br>> > <eduardo.corb<br>> > > > <a href="mailto:elle@gmx.net">elle@gmx.net</a>> wrote:<br>> > > > ><br>> > > > > O Xov, 27-10-2016 ás 14:56 +0200, Markus Metz escribiu:<br>> > > > > > On Thu, Oct 27, 2016 at 11:16 AM, Eduardo Corbelle Rico<br>> > > > > > <<a href="mailto:eduardo.corbelle@gmx.net">eduardo.corbelle@gmx.net</a>> wrote:<br>> > > > > > ><br>> > > > > > > O Mér, 26-10-2016 ás 23:18 +0200, Markus Metz escribiu:<br>> > > > > > > > On Thu, Oct 13, 2016 at 9:55 AM, Eduardo Corbelle Rico<br>> > > > > > > > <<a href="mailto:eduardo.corbelle@gmx.net">eduardo.corbelle@gmx.net</a>> wrote:<br>> > > > > > > > ><br>> > > > > > > > > Dear all,<br>> > > > > > > > ><br>> > > > > > > > > I am unable to use v.net.iso because of a "segmentation<br>> > > > fault"<br>> > > > > > > > > error. I<br>> > > > > > > > >  have a script that used to work correctly in GRASS 6.4<br>> > (32<br>> > > > > > > > > bit)<br>> > > > > > > > > but<br>> > > > > > > > > produces this error after I switched to GRASS 7.0.4 (64<br>> > > > bit).<br>> > > > > > > > ><br>> > > > > > > > > If I try to follow both examples shown in <a href="https://grass">https://grass</a><br>> > .osg<br>> > > > eo.o<br>> > > > > > > > > rg/g<br>> > > > > > > > > rass<br>> > > > > > > > > 70/manuals/v.net.iso.html (using the Spearfish dataset<br>> > for<br>> > > > > > > > > GRASS 7)<br>> > > > > > > > > the<br>> > > > > > > > > same error appears:<br>> > > > > > > > ><br>> > > > > > > > > > Building graph...<br>> > > > > > > > > > Registering arcs...<br>> > > > > > > > > > Segmentation fault<br>> > > > > > > ><br>> > > > > > > > The segmentation fault must happen in the vector<br>> > libraries. I<br>> > > > > > > > tested<br>> > > > > > > > on Linux and can not reproduce the segmentation fault.<br>> > > > Valgrind<br>> > > > > > > > also<br>> > > > > > > > does not show anything that could cause a segmentation<br>> > fault.<br>> > > > Can<br>> > > > > > > > you<br>> > > > > > > > provide a gdb backtrace?<br>> > > > > > > ><br>> > > > > > > > Markus M<br>> > > > > > ><br>> > > > > > > Thank you Markus,<br>> > > > > > ><br>> > > > > > > My system is debian Stretch, and the following lines<br>> > describe<br>> > > > my<br>> > > > > > > attempt at generating a gdb backtrace. Please let me know<br>> > if I<br>> > > > > > > should<br>> > > > > > > do otherwise.<br>> > > > > ><br>> > > > > > So far so good. The module crashes in a library function that<br>> > > > comes<br>> > > > > > from libavl without modifications, but I can still not see<br>> > why it<br>> > > > > > could cause a segmentation fault. Can you recompile with the<br>> > > > compiler<br>> > > > > > debugging option -g? gdb will then be able to provide more<br>> > > > > > information:<br>> > > > > ><br>> > > > > > make distclean<br>> > > > > > CFLAGS="-g" ./configure <configure options><br>> > > > > > make<br>> > > > > ><br>> > > > > > optionally make install<br>> > > > > ><br>> > > > > > Then start GRASS and use gdb for v.net.iso as before.<br>> > > > > ><br>> > > > > > Markus M<br>> > > > > ><br>> > > > ><br>> > > > > Dear Markus,<br>> > > > ><br>> > > > > Following those instructions does not seem to have changed the<br>> > > > > resulting backtrace info (copied below). Maybe I missed<br>> > something<br>> > > > along<br>> > > > > the way?<br>> > > > ><br>> > > > > ---------------------<br>> > > ><br>> > > ><br>> > > > Is this something Debian specific that debugging symbols must be<br>> > > > explicitly activated? Are you using GCC or another compiler?<br>> > > ><br>> > > > Alternatively, you can also try valgrind:<br>> > > ><br>> > > > CMD="v.net.iso input=myroads_net output=myroads_net_iso<br>> > > > center_cats=1-100000 costs=1000,2000,5000 --o"<br>> > > > valgrind --tool=memcheck --log-file=v.net.iso.vg.log $CMD<br>> > > ><br>> > > > Markus M<br>> > > ><br>> > ><br>> > > You were right: it was my fault not having grass-core-dbgsym and<br>> > grass-<br>> > > dev-dbgsym packages installed.<br>> ><br>> > You do not need these packages when you compile from source.<br>> ><br>> > > I copied below the results of the<br>> > > debugging commands:<br>> > ><br>> > > ================<br>> > > GRASS 7.0.5 (spearfish60_grass7):~ > gdb `which v.net.iso`<br>> > > GNU gdb (Debian 7.11.1-2+b1) 7.11.1<br>> > > Copyright (C) 2016 Free Software Foundation, Inc.<br>> > > License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses">http://gnu.org/licenses</a><br>> > /gpl<br>> > > .html><br>> > > This is free software: you are free to change and redistribute it.<br>> > > There is NO WARRANTY, to the extent permitted by law.  Type "show<br>> > > copying"<br>> > > and "show warranty" for details.<br>> > > This GDB was configured as "x86_64-linux-gnu".<br>> > > Type "show configuration" for configuration details.<br>> > > For bug reporting instructions, please see:<br>> > > <<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>.<br>> > > Find the GDB manual and other documentation resources online at:<br>> > > <<a href="http://www.gnu.org/software/gdb/documentation/">http://www.gnu.org/software/gdb/documentation/</a>>.<br>> > > For help, type "help".<br>> > > Type "apropos word" to search for commands related to "word"...<br>> > > Reading symbols from /usr/lib/grass70/bin/v.net.iso...Reading<br>> > symbols<br>> > > from /usr/lib/debug/.build-<br>> > > id/5a/060fc6c3da41153d82601e3fa37ba6d88e9c6c.debug...done.<br>> > > done.<br>> > ><br>> > ><br>> > > (gdb) run input=myroads_net output=myroads_net_iso center_cats=1-<br>> > 100000<br>> > > costs=1000,2000,5000<br>> ><br>> > This seems to be the GRASS version installed with your package<br>> > manager because make install installs by default to /usr/local/:<br>> > > Starting program: /usr/lib/grass70/bin/v.net.iso input=myroads_net<br>> > > output=myroads_net_iso center_cats=1-100000 costs=1000,2000,5000<br>> > > [Thread debugging using libthread_db enabled]<br>> > > Using host libthread_db library "/lib/x86_64-linux-<br>> > > gnu/libthread_db.so.1".<br>> > > Building graph...<br>> > > Registering arcs...<br>> > ><br>> > > Program received signal SIGSEGV, Segmentation fault.<br>> > > tavl_probe (tree=tree@entry=0x55555599b6c0, item=item@entry=0x55555<br>> > 599f<br>> > > 7b0)<br>> > >     at tavl.c:146<br>> > > 146     tavl.c: Non hai tal ficheiro ou directorio.<br>> > > (gdb) bt full<br>> > > #0  tavl_probe (tree=tree@entry=0x55555599b6c0, item=item@entry=0x5<br>> > 5555<br>> > > 599f7b0)<br>> > >     at tavl.c:146<br>> > >         y = 0x0<br>> > >         z = 0x55555599b6c0<br>> > >         p = 0x0<br>> ><br>> > At this stage (tavl.c:146), p should be equal to z, and p has been<br>> > accessed previously, i.e. the segmentation fault should occur<br>> > earlier. Therefore I suspect changes in tavl.c introduced when<br>> > creating the package. You would need to remove all GRASS 7 packages<br>> > from your system, then compile from source again.<br>> ><br>> > Markus M<br>><br>><br>> Ok. It seems that I was still running the version installed with the<br>> package manager. When using the version compiled from source, the<br>> segmentation error does not appear at all.<br>><br>> Thank you very much.<br><br></div>Can you please report to the responsible Debian package manager that the GRASS 7.0.5 package produces a segmentation fault while the original source code works fine? You would do a big favour to other GRASS users on Debian.<br><br></div>Thanks,<br><br></div>Markus M<br><div><div><div><br></div></div></div></div>