Bug#838915: saga: Segmentation fault in CSG_Projections::WKT_to_Proj4() with merge layers

2016-09-30 Thread Nelson A. de Oliveira
On Fri, Sep 30, 2016 at 11:48 AM, Nelson A. de Oliveira
 wrote:
> With 2.3.1+dfsg-2 I am still seeing a segmentation fault.

Right. sorry.
I saw what was wrong here.
I will open another bug report about this.



Bug#838915: saga: Segmentation fault in CSG_Projections::WKT_to_Proj4() with merge layers

2016-09-30 Thread Nelson A. de Oliveira
Hi!

With 2.3.1+dfsg-2 I am still seeing a segmentation fault.
For example, with these new examples attached (they are in a custom
UTM projection).

A new gdb output is also attached.

Best regards,
Nelson
Starting program: /usr/bin/saga_cmd shapes_tools "Merge Layers" -INPUT 
"1.shp;2.shp" -SRCINFO true -MATCH true -MERGED output.shp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x77477730 in CSG_Projections::WKT_to_Proj4(CSG_String&, CSG_String 
const&) const () from /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so

Thread 1 (Thread 0x77fa6a80 (LWP 21931)):
#0  0x77477730 in CSG_Projections::WKT_to_Proj4(CSG_String&, CSG_String 
const&) const () at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#1  0x77479e3b in CSG_Projection::Assign(CSG_String const&, 
ESG_Projection_Format) () at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#2  0x7747a36a in CSG_Projection::Load(CSG_String const&, 
ESG_Projection_Format) () at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#3  0x77484f78 in CSG_Shapes::_Load_ESRI(CSG_String const&) ()
at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#4  0x774842d3 in CSG_Shapes::Create(CSG_String const&) ()
at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#5  0x77484874 in CSG_Shapes::CSG_Shapes(CSG_String const&) ()
at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#6  0x773f4e40 in CSG_Data_Manager::Add(CSG_String const&, 
ESG_Data_Object_Type) () at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#7  0xd31f in CCMD_Module::_Load_Input(CSG_Parameter*) 
(this=this@entry=0x7fffdfc0, pParameter=pParameter@entry=0x55dd54a0)
at module_library.cpp:712
FileNames = 
{static npos = 18446744073709551615, m_impl = L"2.shp", 
m_convertedToChar = {m_str = 0x0, m_len = 140737488346000}}
FileName = 
{static npos = 18446744073709551615, m_impl = L"1.shp", 
m_convertedToChar = {m_str = 0x0, m_len = 93825005699376}}
#8  0xd97b in CCMD_Module::_Get_Input(CSG_Parameters*) 
(this=this@entry=0x7fffdfc0, pParameters=pParameters@entry=0x55dd2d48)
at module_library.cpp:613
i = 0
#9  0x555609db in CCMD_Module::_Get_Parameters(CSG_Parameters*, bool) 
(this=0x7fffdfc0, pParameters=0x55dd2d48, bInitialize=)
at module_library.cpp:408
#10 0x5556162b in CCMD_Module::Execute(int, char**) 
(this=0x7fffdfc0, argc=, argv=0x7fffe1a8) at 
module_library.cpp:199
i = 
bResult = 
#11 0x55563ae0 in Execute(int, char**) (argc=11, argv=0x7fffe198)
at saga_cmd.cpp:258
pLibrary = 0x55d23de0
pTool = 0x55dd2d40
CMD_Module = 
{_vptr.CCMD_Module = 0x557697e8 , 
m_pLibrary = 0x55d23de0, m_pModule = 0x55dd2d40, m_CMD = {m_data = 
0x56248a70}}
#12 0x55564785 in Run(int, char**) (argc=11, argv=0x7fffe198)
at saga_cmd.cpp:208
#13 0x8a27 in main(int, char**) (argc=11, argv=0x7fffe198)
at saga_cmd.cpp:132
bResult = 


newexamples.tar.gz
Description: GNU Zip compressed data


Bug#838915: saga: Segmentation fault in CSG_Projections::WKT_to_Proj4() with merge layers

2016-09-26 Thread Johan Van de Wauw
A somewhat dirty workaround, but since the projection on both files is
identical, you can actually skip using proj at all by removing/renaming the
*.prj files. Then merging should work.


Bug#838915: saga: Segmentation fault in CSG_Projections::WKT_to_Proj4() with merge layers

2016-09-26 Thread Johan Van de Wauw
Thanks for your report.

I can confirm this also happens on debian unstable. I'll investigate
further.


Bug#838915: saga: Segmentation fault in CSG_Projections::WKT_to_Proj4() with merge layers

2016-09-26 Thread Nelson A. de Oliveira
Package: saga
Version: 2.3.1+dfsg-1+b1
Severity: important

Hi!

I am seeing a segmentation fault while merging two shapefiles with:

saga_cmd shapes_tools "Merge Layers" -INPUT "1.shp;2.shp" -SRCINFO true -MATCH 
true -MERGED merged.shp

gdb "thread apply all bt full" output is attached, together with the
shapefiles.

Thank you!

Best regards,
Nelson

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (200, 'unstable'), 
(100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages saga depends on:
ii  libc6   2.23-5
ii  libdxflib3  3.12.2-1
ii  libfftw3-double33.3.4-2+b2
ii  libgcc1 1:6.1.1-11
ii  libgdal20 [gdal-abi-2-1-1]  2.1.1+dfsg-4+b1
ii  libgomp16.1.1-11
ii  libhpdf-2.2.1   2.2.1-1.1+b1
ii  libodbc12.3.1-4.1
ii  libpq5  9.6~rc1-1
ii  libproj12   4.9.3-1
ii  libqhull7   2015.2-1
ii  libsaga-api-2.3.1   2.3.1+dfsg-1+b1
ii  libsaga-gdi-2.3.1   2.3.1+dfsg-1+b1
ii  libstdc++6  6.1.1-11
ii  libsvm3 3.21+ds-1.1
ii  libvigraimpex6  1.10.0+git20160211.167be93+dfsg-2+b1
ii  libwxbase3.0-0v53.0.2+dfsg-2
ii  libwxgtk3.0-0v5 3.0.2+dfsg-2
ii  saga-common 2.3.1+dfsg-1

saga recommends no packages.

saga suggests no packages.

-- no debconf information
Starting program: /usr/bin/saga_cmd shapes_tools "Merge Layers" -INPUT "1.shp;2.shp" -SRCINFO true -MATCH true -MERGED merged.shp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x77478121 in CSG_Projections::WKT_to_Proj4(CSG_String&, CSG_String const&) const ()
   from /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so

Thread 1 (Thread 0x77fa6a80 (LWP 2364)):
#0  0x77478121 in CSG_Projections::WKT_to_Proj4(CSG_String&, CSG_String const&) const ()
at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#1  0x77479e3b in CSG_Projection::Assign(CSG_String const&, ESG_Projection_Format) ()
at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#2  0x7747a36a in CSG_Projection::Load(CSG_String const&, ESG_Projection_Format) ()
at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#3  0x77484f78 in CSG_Shapes::_Load_ESRI(CSG_String const&) () at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#4  0x774842d3 in CSG_Shapes::Create(CSG_String const&) () at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#5  0x77484874 in CSG_Shapes::CSG_Shapes(CSG_String const&) () at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#6  0x773f4e40 in CSG_Data_Manager::Add(CSG_String const&, ESG_Data_Object_Type) ()
at /usr/lib/x86_64-linux-gnu/libsaga_api-2.3.1.so
#7  0xd32f in CCMD_Module::_Load_Input(CSG_Parameter*) (this=this@entry=0x7fffdfc0, pParameter=pParameter@entry=0x55dd54a0) at module_library.cpp:712
FileNames = 
{static npos = 18446744073709551615, m_impl = L"2.shp", m_convertedToChar = {m_str = 0x0, m_len = 140737488346000}}
FileName = 
{static npos = 18446744073709551615, m_impl = L"1.shp", m_convertedToChar = {m_str = 0x0, m_len = 93825005898880}}
#8  0xd98b in CCMD_Module::_Get_Input(CSG_Parameters*) (this=this@entry=0x7fffdfc0, pParameters=pParameters@entry=0x55dd2d48) at module_library.cpp:613
i = 0
#9  0x555609eb in CCMD_Module::_Get_Parameters(CSG_Parameters*, bool) (this=0x7fffdfc0, pParameters=0x55dd2d48, bInitialize=) at module_library.cpp:408
#10 0x5556163b in CCMD_Module::Execute(int, char**) (this=0x7fffdfc0, argc=, argv=0x7fffe1a8)
at module_library.cpp:199
i = 
bResult = 
#11 0x55563af0 in Execute(int, char**) (argc=11, argv=0x7fffe198) at saga_cmd.cpp:258
pLibrary = 0x55d23de0
pTool = 0x55dd2d40
CMD_Module = 
{_vptr.CCMD_Module = 0x557697e8 , m_pLibrary = 0x55d23de0, m_pModule = 0x55dd2d40, m_CMD = {m_data = 0x562560b0}}
#12 0x55564795 in Run(int, char**) (argc=11, argv=0x7fffe198) at saga_cmd.cpp:208
#13 0x8a37 in main(int, char**) (argc=11, argv=0x7fffe198) at saga_cmd.cpp:132
bResult = 


shapes.tar.gz
Description: application/gzip