Using AppWarp with Marmalade and it is breaking on client->terminate()

0 votes

I am using AppWarp for marmalade and for some reason it is breaking on client->terminate() when I close the application.  It is trying to delete a pointer that it 0x0000000C.  All I am doing it connecting the client, then joining and subscribing to the lobby.  From there I just try to disconnect and terminate the client and it breaks.

 
The message is
Unhandled exception at 0x528A34FB (s3e_simulator_debug.dll) in s3e_simulator_debug.exe: 0xC0000005: Access violation writing location 0x0000000C.
 
The only thing that I can see from the output window is 
ERROR: S3E_SOCKET_ERR_INPROGRESS in s3eSocketConnect
 
I am not sure why that happens either.
 
Any help would be greatly appreciated.
asked Jun 24, 2014 in AppWarp by sawaydastudios (16 points)
Does this also happen when you use the monster move sample? Does it happen on the simulator or device or both?
It does not happen when I run monster move.  That's what makes it even more weird.   Is there some reason that when the appwarp  sdk  is cleaning up the client memory with terminate that it would try to delete null memory?
Can you try waiting for onDisconnectDone and then call terminate? See if this resolves the issue. It will help us narrow down the problem scenario.
I tried this just now.  I basically set up a while loop to wait until the onDisconnectDone hit, then I terminated the client.  It still is breaking on terminate though.  Thanks for this tip though.  It makes a lot of sense to have this wait for disconnect.
Where are you calling terminate()? Is it after the while(!s3eDeviceCheckQuitRequest()) loop?

The problem could be that you are calling terminate while the main game loop is running and in the loop you call update() on the reference.
I am calling terminate outside of the game loop.   It is in a shutdown function for that happens outside the game loop.   I am not calling update with a terminated client.  It is breaking in the terminate.
We are unable to reproduce the issue on our end. Can you share source code of a minimum application in which this issue reproduces?
Sorry I took so long to respond.  I had to move apartments this weekend.  I created a small app that just utilized the AppWarp api to see if it would work.  It did which left me pretty puzzled.  I then looked at both projects to see any differences.  I think I figured out what is wrong.  I am using both AppWarp and App42.  To use App42 I had to add "define IW_HTTP_SSL" in my .mkb.  If this is included it crashes when trying to terminate the client.  If it is not added to my .mkb it does not crash.  I do not know why this would happen.  Any information would be greatly appreciated.

1 Answer

+1 vote
 
Best answer
Hey,

Both App42 and AppWarp uses CIwHTTP internally. Since App42 works on HTTPS, the App42 lib is build using IW_HTTP_SSL parameter and hence you too have to specify it in your mkb. This causes issue with AppWarp as it's lib wasn't build with IW_HTT_SSL parameter. I am sending you a new build that has been built using IW_HTTP_SSL. I hope this will solve your problem. Please test it and let us know if this lib works for you or not.

https://www.dropbox.com/s/d6z5iit8gjrvbm6/appwarp.zip
answered Jul 2, 2014 by Suyash Mohan (900 points)
selected Jul 3, 2014 by sawaydastudios
The new build worked perfectly.  Thank you very much.
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
...