Hello

When I run this host app on my RPi2 and connect with the Android app and force close it on Android, RPi2 host app closes without any error message. Can someone confirm this? Remember to force close the Android app, you might have to try a few times. I connect through a WAN ip that is directed to the RPi2
EDIT: I think that it happens when sending data to all clients (EDIT2: where one of these clients have been force closed), or to a single, but force closed client.
Host app for RPi2:
// Project: RPi test
// Created: 2017-04-26
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "RPi test" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
network_id_helper_app = HostNetwork("Battle Server 1","Host",5002)
SetNetworkLatency(network_id_helper_app,5)
do
timer_stored = GetMilliseconds()
if helper_app_alive_packet_timer < timer_stored
helper_app_alive_packet_timer = timer_stored + 1500
net_message_created_id = CreateNetworkMessage()
AddNetworkMessageInteger(net_message_created_id,0)
SendNetworkMessage(network_id_helper_app,0,net_message_created_id)
client_to_check = GetNetworkFirstClient(network_id_helper_app)
while client_to_check > 0
If GetNetworkClientDisconnected(network_id_helper_app,client_to_check)
DeleteNetworkClient(network_id_helper_app,client_to_check)
EndIf
client_to_check = GetNetworkNextClient(network_id_helper_app)
endwhile
endif
Print( ScreenFPS() )
Sync()
loop
And here is the Android code:
// Project: Battle helper app
// Created: 2017-04-13
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Battle helper app" )
SetWindowSize( 640, 480, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 10, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
network_id = JoinNetwork("INSERT IP FOR HOST HERE",5002,"Helper app")
do
print(ScreenFPS())
Sync()
loop
13/0