[PROJ] PROJ 6.1.0RC2: it's a bug ?

a.furieri at lqt.it a.furieri at lqt.it
Wed May 8 07:36:02 PDT 2019


On Wed, 8 May 2019 14:03:11 +0000, Kristian Evers wrote:
>> On 8 May 2019, at 15:58, Even Rouault <even.rouault at spatialys.com> 
>> wrote:
>>
>> On mercredi 8 mai 2019 12:01:48 CEST Even Rouault wrote:
>>> On mercredi 8 mai 2019 11:14:19 CEST a.furieri at lqt.it wrote:
>>>> the following C code snippet raises an unexpected exception:
>>>>
>>>> PJ *p1;
>>>> PJ *p2;
>>>> PJ_CONTEXT *ctx = proj_create_context();
>>>> p1 = proj_create_crs_to_crs(ctx, "EPSG:4326", "EPSG:3003", NULL);
>>>> p2 = proj_normalize_for_visualization(ctx, p1);
>>>>
>>>> proj_normalize_for_visualization:
>>>> Object is not a CoordinateOperation created with 
>>>> proj_create_crs_to_crs
>>>
>>> Yes, this is a bug.
>>> I've prepared a fix for it in
>>> https://github.com/OSGeo/proj.4/pull/1459
>>
>> merged in master and backported to 6.1
>>
>
> All
>
> That also means we will have an RC3. I’ll try to find the time to put
> it up tomorrow,
> otherwise early on Friday. I would really like that one to be the
> last RC, so if you
> haven’t tested RC2 yet please do so and report any issues you find.
>

I'm really sorry, but I've found a further issue.
proj_normalize_for_visualization crashes on default context:

PJ *p1;
PJ *p2;
p1 = proj_create_crs_to_crs(NULL, "EPSG:4326", "EPSG:3003", NULL);
p2 = proj_normalize_for_visualization(NULL, p1);

and this is what Valgrind reports:

==10039== Invalid read of size 8
==10039==    at 0x4F953CA: getDBcontext(projCtx_t*) (c_api.cpp:116)
==10039==    by 0x4F954E4: getDBcontextNoException(projCtx_t*, char 
const*) (c_api.cpp:127)
==10039==    by 0x4F95582: pj_obj_create(projCtx_t*, 
dropbox::oxygen::nn<std::shared_ptr<osgeo::proj::common::IdentifiedObject> 
 > const&) (c_api.cpp:138)
==10039==    by 0x4F9EC37: proj_normalize_for_visualization 
(c_api.cpp:6836)
==10039==    by 0x400762: main (in /home/sandro/Scaricati/test_proj)
==10039==  Address 0x20 is not stack'd, malloc'd or (recently) free'd
==10039==
==10039==
==10039== Process terminating with default action of signal 11 
(SIGSEGV): dumping core

bye Sandro



More information about the PROJ mailing list