• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Game crashes sending http_reqest on Android for large messages.

I am using http_request to post a message to a server.

It will always work on Windows regardless of the the size but if the message gets too large the game immediately crashes on Android.

The code I am using is below and the crash log is under the code,

GML:
SendToCustomer = function(fileName, EmailTo, EmailFrom, SendMsg){
    var file_to_send = fileName;
    var _url = hostURL;

    // Open file for binary read
    var binary_file = file_bin_open(file_to_send, 0);
    // Get file size
    var file_size=file_bin_size(binary_file);
    // Create buffer to fill
    var my_buffer=buffer_create(file_size,buffer_fast,1);
    for (var i=0; i<file_size; i+=1)
    {
        buffer_write(my_buffer,buffer_u8,file_bin_read_byte(binary_file));
    }
    // Rewind buffer
    buffer_seek(my_buffer, buffer_seek_start, 0);

    //var data=my_buffer;
    var data = "EmailTo="+EmailTo;
    data += "&EmailFrom="+EmailFrom;
    data += "&SendMsg="+SendMsg;
    data += "&FileData="+buffer_base64_encode(my_buffer, 0, buffer_get_size(my_buffer));

    // Create Header
    var map = ds_map_create();
    ds_map_add(map, "Content-Length", string_length(data));
    ds_map_add(map, "User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36");
    ds_map_add(map, "Content-Type", "application/x-www-form-urlencoded");

    // Send
    mypost = http_request(_url, "POST", map, data);
    //upload_handler_script = argument1;

    // Clean
    buffer_delete(my_buffer);
    ds_map_destroy(map);
}

08-10 12:35:38.836 32566 32566 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-10 12:35:38.836 32566 32566 F DEBUG : Build fingerprint: 'samsung/gts6lwifixx/gts6lwifi:11/RP1A.200720.012/T860XXU3CUE2:user/release-keys'
08-10 12:35:38.836 32566 32566 F DEBUG : Revision: '8'
08-10 12:35:38.836 32566 32566 F DEBUG : ABI: 'arm64'
08-10 12:35:38.837 32566 32566 F DEBUG : Timestamp: 2021-08-10 12:35:38-0400
08-10 12:35:38.837 32566 32566 F DEBUG : pid: 31511, tid: 32445, name: GLThread 9231 >>> com.geospacelabs.landscape <<<
08-10 12:35:38.837 32566 32566 F DEBUG : uid: 10947
08-10 12:35:38.837 32566 32566 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7ef5e071c0
08-10 12:35:38.837 32566 32566 F DEBUG : Cause: stack pointer is not in a rw map; likely due to stack overflow.
08-10 12:35:38.837 32566 32566 F DEBUG : x0 0000007ef5e071c0 x1 b400007e8848a620 x2 00000000006fdd21 x3 0000007ef5e071c0
08-10 12:35:38.837 32566 32566 F DEBUG : x4 b400007e88b88341 x5 0000007ef6504ee1 x6 267a69622e7a6977 x7 6f72466c69616d45
08-10 12:35:38.837 32566 32566 F DEBUG : x8 0000007ef6504ef0 x9 0000000000000000 x10 0000000000430000 x11 0a0d6465646f636e
08-10 12:35:38.837 32566 32566 F DEBUG : x12 3d6f546c69616d45 x13 6f6567406b72614d x14 0000000000000068 x15 0000000000000001
08-10 12:35:38.837 32566 32566 F DEBUG : x16 0000007ea6a920e8 x17 0000007f98a61c00 x18 0000007ea6639e10 x19 0000000000000019
08-10 12:35:38.837 32566 32566 F DEBUG : x20 0000000000000029 x21 0000000000000039 x22 b400007e9be0be00 x23 00000000006fdd21
08-10 12:35:38.837 32566 32566 F DEBUG : x24 b400007e8848a620 x25 0000007ef5e071c0 x26 0000007ef6504ef0 x27 0000007ea669fcb0
08-10 12:35:38.837 32566 32566 F DEBUG : x28 0000007ef6506000 x29 0000007ef6504f50
08-10 12:35:38.837 32566 32566 F DEBUG : lr 0000007ea66f3d90 sp 0000007ef5e071c0 pc 0000007f98a61b88 pst 0000000020000000
08-10 12:35:38.845 32566 32566 F DEBUG : backtrace:
08-10 12:35:38.845 32566 32566 F DEBUG : NOTE: Function names and BuildId information is missing for some frames due
08-10 12:35:38.845 32566 32566 F DEBUG : NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
08-10 12:35:38.845 32566 32566 F DEBUG : NOTE: found under the lib/ directory are readable.
08-10 12:35:38.845 32566 32566 F DEBUG : #00 pc 0000000000088b88 /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy+248) (BuildId: 208420355a489a8e9dbb64be7cd0d9bd)
08-10 12:35:38.846 32566 32566 F DEBUG : #01 pc 0000000000232d8c /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (LoadSave::HTTP_Request(char const*, char const*, char const*, char const*, int (*)(HTTP_REQ_CONTEXT*, void*, int*), void (*)(HTTP_REQ_CONTEXT*), void*, int)+256) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #02 pc 00000000001df738 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (F_HttpRequest(RValue&, CInstance*, CInstance*, int, RValue*)+1092) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #03 pc 0000000000179228 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (DoCall(unsigned int, unsigned char*, unsigned char const*, VMExec*)+408) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #04 pc 000000000017c558 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (VM::ExecDebug(VMExec&, RValue*, bool)+516) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #05 pc 000000000017bdf4 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (VM::Exec(CCode*, YYObjectBase*, YYObjectBase*, RValue*, YYObjectBase*, int, RValue*, int, YYObjectBase*)+1324) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #06 pc 0000000000166674 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (ExecuteIt(CInstance*, CInstance*, CCode*, RValue*, int)+312) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #07 pc 00000000001666bc /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (Code_Execute(CInstance*, CInstance*, CCode*, RValue*, int)+8) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #08 pc 000000000018a6f8 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (CEvent::Execute(CInstance*, CInstance*)+72) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #09 pc 000000000018a9c4 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (Perform_Event_Object_ASync(CInstance*, CInstance*, int, int, int)+228) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #10 pc 000000000018ab18 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (Perform_Event(CInstance*, CInstance*, int, int)+152) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #11 pc 000000000028d878 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (HandleButton(int)+288) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #12 pc 000000000028ddac /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (HandleMouse()+300) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #13 pc 000000000028c200 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (DoAStep()+472) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.846 32566 32566 F DEBUG : #14 pc 000000000028ca34 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (MainLoop_Process()+1024) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.847 32566 32566 F DEBUG : #15 pc 000000000038b14c /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/lib/arm64/libyoyo.so (Java_com_yoyogames_runner_RunnerJNILib_Process+868) (BuildId: 9f0e49aa55b75893c8b66cd6970788d51a42c117)
08-10 12:35:38.847 32566 32566 F DEBUG : #16 pc 000000000000b4c0 /data/app/~~ge6VXPRZaSAvpFJTPK0Peg==/com.geospacelabs.landscape-cU62pHYP-Fv-GQhgK0cCUg==/oat/arm64/base.odex (deleted)
 
Top