techknight Well-Known Member Licensed User Longtime User Aug 20, 2015 #1 I keep getting this everytime the Asyncstreams_error sub is called: java.lang.RuntimeException: Object should first be initialized (Exception). My code is: Code: Sub AStreams_Error ToastMessageShow("Dropped connection to server. Reason: " & LastException.Message, True) Astreams.Close Socket1.Close Connected = False End Sub The error is occuring on the Toastmessage line. any ideas?
I keep getting this everytime the Asyncstreams_error sub is called: java.lang.RuntimeException: Object should first be initialized (Exception). My code is: Code: Sub AStreams_Error ToastMessageShow("Dropped connection to server. Reason: " & LastException.Message, True) Astreams.Close Socket1.Close Connected = False End Sub The error is occuring on the Toastmessage line. any ideas?
G-ShadoW Active Member Licensed User Longtime User Aug 20, 2015 #2 Code: Sub AStreams_Error Try ToastMessageShow("Dropped connection to server. Reason: " & LastException.Message, True) Astreams.Close Socket1.Close Connected = False Catch Log("Error: " & LastException.Message) End Try End Sub maybe from log you will see what error was it... Upvote 0
Code: Sub AStreams_Error Try ToastMessageShow("Dropped connection to server. Reason: " & LastException.Message, True) Astreams.Close Socket1.Close Connected = False Catch Log("Error: " & LastException.Message) End Try End Sub maybe from log you will see what error was it...
techknight Well-Known Member Licensed User Longtime User Aug 20, 2015 #3 Error: java.lang.Exception: java.lang.RuntimeException: Object should first be initialized (Exception). Upvote 0
Error: java.lang.Exception: java.lang.RuntimeException: Object should first be initialized (Exception).
G-ShadoW Active Member Licensed User Longtime User Aug 20, 2015 #4 Something is not initialized... Sub Astrems Error is made for that, when something is wrong with astrems related code, I dont think that you will get any other help from other members with just posted code above. Good luck Upvote 0
Something is not initialized... Sub Astrems Error is made for that, when something is wrong with astrems related code, I dont think that you will get any other help from other members with just posted code above. Good luck
techknight Well-Known Member Licensed User Longtime User Aug 20, 2015 #5 Well the code works. That much I do know. But I changed servers and having a weird problem with the server, So i need to find out why my Socket is getting booted. So I decided to add the LastException, Boom crash. I am thinking compiler problem. Upvote 0
Well the code works. That much I do know. But I changed servers and having a weird problem with the server, So i need to find out why my Socket is getting booted. So I decided to add the LastException, Boom crash. I am thinking compiler problem.
Erel B4X founder Staff member Licensed User Longtime User Aug 21, 2015 #6 LastException is not initialized. You can check it with: Code: If LastException.IsInitialized Then Log(LastException.Message) Upvote 0
LastException is not initialized. You can check it with: Code: If LastException.IsInitialized Then Log(LastException.Message)
techknight Well-Known Member Licensed User Longtime User Aug 21, 2015 #7 But that begs the question. Why isnt it initialized? BTW my Astreams is loaded/running in a service. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 23, 2015 #8 Hard to say without analyzing your code. Maybe you are calling this sub from your code? Upvote 0