On Sat, Jul 28, 2018 at 11:40 PM, Veronica Andreo <veroand...@gmail.com> wrote:
> Hi devs,
>
> I get "segmentation fault" when running temporal commands, i.e., t.list,
> t.info, t.create, t.register (haven't tested them all). However, the command
> works as expected. It's just that I get the message "Segmentation fault
> (core dumped)" whenever I run a temporal command. I use grass trunk r73007
> in Fedora 28.

I get the same segfault:

Using
https://grasswiki.osgeo.org/wiki/GRASS_Debugging#Python_debugging_with_pdb

I found this:

GRASS 7.4.1svn (nc_spm_08_grass7):~ > t.list raster
----------------------------------------------
Time stamped raster maps with absolute time available in mapset <user1>:
a_beam_rad_08.00@user1
a_beam_rad_09.00@user1
a_beam_rad_10.00@user1
a_beam_rad_11.00@user1
a_beam_rad_12.00@user1
a_beam_rad_13.00@user1
a_beam_rad_14.00@user1
a_beam_rad_15.00@user1
a_beam_rad_16.00@user1
a_beam_rad_17.00@user1
a_beam_rad_18.00@user1
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/scripts/t.list(182)main()
-> if outpath:
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/scripts/t.list(184)main()
-> dbif.close()
(Pdb) s
--Call--
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(921)close()
-> def close(self):
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(927)close()
-> for key in self.unique_connections.keys():
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(928)close()
-> self.unique_connections[key].close()
(Pdb) s
--Call--
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(1133)close()
-> def close(self):
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(1140)close()
-> self.connection.commit()
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(1141)close()
-> self.cursor.close()
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(1142)close()
-> self.connected = False
(Pdb) s
--Return--
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(1142)close()->None
-> self.connected = False
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(927)close()
-> for key in self.unique_connections.keys():
(Pdb) s
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(930)close()
-> self.connected = False
(Pdb) s
--Return--
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/core.py(930)close()->None
-> self.connected = False
(Pdb) s
--Return--
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/scripts/t.list(184)main()->None
-> dbif.close()
(Pdb) s
--Return--
> /home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/scripts/t.list(188)<module>()->None
-> main()
(Pdb) s
Exception AttributeError: "'NoneType' object has no attribute 'path'"
in <function _remove at 0x7f81b64a68c0> ignored
Segmentation fault (core dumped)


Interestingly, there is no "path" at all in scripts/t.list.

Filling up the script with print statements:

...
    print("bla1")
    dbif.close()
    print("bla2")

if __name__ == "__main__":
    options, flags = gscript.parser()
    main()
    print("bla3")

I get

t.list raster
...
bla1
bla2
bla3
Segmentation fault (core dumped)

So the segfault happens when t.list (or other t.* scripts) close.

?

Markus
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to