Ticket Change Details
Not logged in
Overview

Artifact ID: fcc9af040f70571f2806f585794dc5e385091f76
Ticket: bbab46cf4dedd9703960a75429a171753a4339c5
Strange Interaction Between Spatialite and Shapely
User & Date: anonymous 2020-05-04 23:55:47
Changes

  1. foundin changed to: "4.3.0a-12.fc31"
  2. icomment:
    ## Expected behavior and actual behavior.
    
    There is a strange interaction between loading spatialite 4.3.0 and shapely 1.7.0. I am not sure where exactly the error is happening so I am reporting the issue in both repositories.
    
    The expected behavior is that one should be able to import shapely after loading spatialite without a segmentation faulth.
    
    The actual behavior is that laoding shapely after loading spatialite produces a segmentation fault.
    
    ## Steps to reproduce the problem.
    
    
    
    ```
    from sqlalchemy import create_engine
    from sqlalchemy.event import listen
    
    
    def load_spatialite(api_connection, connection_record):
        api_connection.enable_load_extension(True)
        api_connection.load_extension('mod_spatialite.so')
    
    
    engine = create_engine('sqlite://')
    listen(engine, 'connect', load_spatialite)
    
    
    # from shapely import speedups  # Remove comment to avoid segmentation fault
    engine_connection = engine.connect()
    from shapely import speedups
    ```
    
    
    
    Running the above code produces the following segmentation fault:
    ```
    python: ByteOrderValues.cpp:46: static int geos::io::ByteOrderValues::getInt(const unsigned char*, int): Assertion `byteOrder == ENDIAN_LITTLE' failed.
    Aborted (core dumped)
    ```
    
    
    
    Removing the comment prevents the segmentation fault.
    
    ## Operating system
    
    Fedora 31
    
  3. login: "anonymous"
  4. mimetype: "text/x-fossil-plain"
  5. private_contact changed to: "12dae233085a18a77372b195da3818d67720e4b4"
  6. severity changed to: "Critical"
  7. status changed to: "Open"
  8. title changed to: "Strange Interaction Between Spatialite and Shapely"
  9. type changed to: "Incident"