Access violation reading location when creating user

0 votes

I am using the Marmalade SDK and App42 but when trying to create a user, I always get this crash:

24/02/14 20:39:32.298: [0xfa0] Body for CreateUser is {"app42":{"user":{"userName":"Player11069885","email":"11069885@CTF.com","password":"6238"}}}
24/02/14 20:39:32.299: [0xfa0] HTTP: (Cancel)
24/02/14 20:39:32.299: [0xfa0] HTTP: (Fetching https://api.shephertz.com/cloud/1.0/user?apiKey=c20780aeb34e3c95c9e02a9a3e0dba823c03389a47f53ce21dcebf469fef7fcb&timeStamp=2014-02-24T20:39:32.000Z&version=1.0&signature=18c7tcNGsNPmWCFvKJ2E8Ay4SLg%3D)
24/02/14 20:39:32.301: [0xfa0] FILE: s3eFileOpen('appdata.i3d', 'wb') succeeded, id=1017 p=0x0fee0858
24/02/14 20:39:32.302: [0xfa0] FILE: s3eFileClose h=0x0fee085


24/02/14 20:39:32.324: [0xfa0] SOCKET: s3eInetLookup: 'api.shephertz.com'
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\NapiNSP.dll'. Cannot find or open the PDB file.
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\pnrpnsp.dll'. Cannot find or open the PDB file.
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nlaapi.dll'. Cannot find or open the PDB file.
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mswsock.dll'. Cannot find or open the PDB file.
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dnsapi.dll'. Cannot find or open the PDB file.
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winrnr.dll'. Cannot find or open the PDB file.
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wshbth.dll'. Cannot find or open the PDB file.
's3e_simulator_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\FWPUCLNT.DLL'. Cannot find or open the PDB file.
The thread 0x27d4 has exited with code 0 (0x0).
24/02/14 20:39:32.355: [0xfa0] SOCKET: s3eInetLookup (asynschronous): done DNS: '54.244.235.87:0'
24/02/14 20:39:32.356: [0xfa0] HTTP: (DNS OK)
24/02/14 20:39:32.356: [0xfa0] IWCRT: open 100
24/02/14 20:39:32.358: [0xfa0] SOCKET: s3eSocketCreate -> p=0x0ff84174 id=3000
24/02/14 20:39:32.358: [0xfa0] SOCKET: s3eSocketConnect: 0x0ff84174 -> 54.244.235.87:443
ERROR: S3E_SOCKET_ERR_INPROGRESS in s3eSocketConnect
24/02/14 20:39:32.360: [0xfa0] SOCKET: TryConnect error: 10036
24/02/14 20:39:32.360: [0xfa0] SOCKET: Connect: FAILED (1001: S3E_SOCKET_ERR_INPROGRESS in s3eSocketConnect)
24/02/14 20:39:32.361: [0xfa0] HTTP: (Connecting...)
24/02/14 20:39:32.530: [0xfa0] SOCKET: TryConnect error: 10056
24/02/14 20:39:32.531: [0xfa0] SOCKET: NotifyConnect: 3000 0x0ff84174
24/02/14 20:39:32.532: [0xfa0] HTTP: (Connected)
24/02/14 20:39:32.532: [0xfa0] HTTP: ContinueSSLHandshake:0
24/02/14 20:39:32.533: [0xfa0] HTTP: ContinueSSLHandshake
24/02/14 20:39:32.534: [0xfa0] HTTP: Waiting until Readable
24/02/14 20:39:32.689: [0xfa0] HTTP: ContinueSSLHandshake:0
24/02/14 20:39:32.701: [0xfa0] HTTP: ContinueSSLHandshake
24/02/14 20:39:32.702: [0xfa0] HTTP: Waiting until Readable
24/02/14 20:39:33.051: [0xfa0] HTTP: ContinueSSLHandshake:0
24/02/14 20:39:33.052: [0xfa0] HTTP: Handshake Done
24/02/14 20:39:33.052: [0xfa0] HTTP: (SendRequest [0->439])
24/02/14 20:39:33.053: [0xfa0] HTTP: SSL_write returns 346
24/02/14 20:39:33.054: [0xfa0] HTTP: (SendRequest [346->439])
24/02/14 20:39:33.055: [0xfa0] HTTP: SSL_write returns 93
24/02/14 20:39:33.486: [0xfa0] HTTP: ChunkSize: cb
24/02/14 20:39:33.486: [0xfa0] HTTP: HTTP/1.1 200 OK
24/02/14 20:39:33.487: [0xfa0] HTTP: Got headers
24/02/14 20:39:33.488: [0xfa0] HTTP: ChunkSize: 0
24/02/14 20:39:33.488: [0xfa0] GotData::Status is 0
24/02/14 20:39:33.489: [0xfa0] GotData::ContentReceived is {"app42":{"response":{"success":true,"users":{"user":{"userName":"Player11069885","email":"11069885@CTF.com","createdOn":"2014-02-24T20:39:31.861Z","sessionId":"d058992d-adfc-4763-9bdf-56f77b3e81fc"}}}}}
24/02/14 20:39:33.489: [0xfa0] GotData::ContentReceived data len is 203
First-chance exception at 0x065EA7F3 (CTF.s86) in s3e_simulator_debug.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x065EA7F3 (CTF.s86) in s3e_simulator_debug.exe: 0xC0000005: Access violation reading location 0x00000000.
The program '[9160] s3e_simulator_debug.exe' has exited with code 0 (0x0).

And this is the code I am using:

 

UserService::Initialize(std::string("c20780aeb34e3c95c9e02a9a3e0dba823c03389a47f53ce21dcebf469fef7fcb"), std::string("895c92cb7b23c6947d94a95b65955b8f62fbdf6b6827ebe64b3e5f2a42a5b47a"));
    UserService* userService = UserService::getInstance();
    IApp42Callback* authUserCallback = NULL;

userService->CreateUser(std::string(gameData->userName), std::string(gameData->pass), std::string(gameData->email), authUserCallback);

Any help?

asked Feb 24, 2014 in App42 Cloud API-BaaS by scott.woolven (35 points)

2 Answers

0 votes

@Scott Can you tell us that which operating system or SDK version of marmalade you are working on.

answered Feb 26, 2014 by hs00105 (517 points)
I am running Windows 8.1 with Marmalade 7.1.2
+1 vote
You are passing NULL in callback, which might be causing access violation. Please check out the documentations and follow the tutorials.
answered Feb 27, 2014 by amit44033 (20 points)
In the App42 docs Marmalade sample of Create User (http://api.shephertz.com/app42-docs/user-management-service/) it has CApp42Callback* authUserCallback = NULL;  so that it why I was passing NULL..

Changing it to:
CApp42Callback* authUserCallback = new CApp42Callback();

seems to have worked
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...