SigSegv code 2 when making a request (Android)

Aug 19, 2015 at 4:12 AM
Edited Aug 20, 2015 at 3:18 AM
I get a sigsegv code 2 segfault when i try using casablanca in a library module:

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb9c031c0
Stack frame I/DEBUG ( 127): #00 pc 00b381c0 [heap]
Stack frame I/DEBUG ( 127): #01 pc 004c5e8f /data/....../arm/libnetwork.so (web::http::http_pipeline::propagate(web::http::http_request)+194): Routine web::http::http_pipeline::propagate(web::http::http_request) at ??:?
Stack frame I/DEBUG ( 127): #02 pc 004c59ad /data/....../arm/libnetwork.so (web::http::client::http_client::request(web::http::http_request, pplx::cancellation_token const&)+396): Routine web::http::client::http_client::request(web::http::http_request, pplx::cancellation_token const&) at ??:?

This is the offending piece of code:
    web::http::client::http_client_config theHttpConfig;
    web::http::oauth1::experimental::oauth1_config theOAuth1Config( SomeConsumerKey(),
                                                                    SomeConsumerSecret(),
                                                                    U( "" ), //temp endpoint
                                                                    U( "" ), //auth endpoint
                                                                    U( "" ), //token endpoint
                                                                    U( "" ), //callback uri
                                                                    web::http::oauth1::experimental::oauth1_methods::hmac_sha1 );
    theHttpConfig.set_oauth1( theOAuth1Config );

    web::http::client::http_client theClient( SomeUrl(), theHttpConfig );
    web::http::http_request theHttpRequest( web::http::methods::GET );
    theHttpRequest.set_request_uri( theUriBuilder.to_uri() );       

    auto theTask = theClient.request( theHttpRequest );
The failure happens on that last line when creating the request task.
Are there any permissions I might be missing? Some piece of setup code I might've missed? (I did the cpprest_init call )Anything else I might check? Thanks for any help

EDIT: I should add that I am able to create pplx tasks with no problems. Could this be a problem with the version of the stl i'm using? My app is using gnustl_shared. Has anyone gotten casablanca to build using gnustl_shared?
Aug 25, 2015 at 11:11 PM
This could be caused by an STL mismatch. What version of the NDK and clang are you using? Did you build from source or are you using the binaries from the NuGet package?
Sep 8, 2015 at 6:59 PM
Edited Sep 8, 2015 at 7:11 PM
I believe this was a stl mismatch issue. The app was linking in the gnu stl_shared stl (due to other library dependencies). So we had to modify the casablanca build system to build boost as a shared library as well as use the shared stl (which I must say was a real pain). It's running fine now.