Null pointer issue with B4A-Bridge...

Gary Miyakawa

Active Member
Licensed User
Longtime User
Ok, just about got everything working BUT I'm seeing an issue, primarily when I'm running the B4A-Bridge against a Xoom tablet and running a Network communications tool (On Port 24)... If I run it from the emulator, I'm not seeing the issues..

After a period of time, running my program (which, every 30 seconds is sending a message (Keepalive) to port 24, expecting a response).. It works fine until, in the log, I see "Connected to B4A-Bridge" shows up... Shortly their after, I get a message on the Tablet "An error has occurred in sub:main_send_message (B4A Line: 62) AStreams.write(buffer). Java.lang.NullPointerException"... I've looked at Buffer and it has valid data in it.. This could be a thread issue I suppose but it's strange that the with the emulator, the problem doesn't seem to appear....

I'm a bit at a loss on what this might be and open to suggestions....

Thanks folks,

Gary M
 

Gary Miyakawa

Active Member
Licensed User
Longtime User
Erel,

Here is what I got on the log... I'm guessing it's a case that we are "temporarily" loosing connectivity to the wifi. but that is just a guess.

I ran on the emulator (and PC) and also on the Xoom tablet for 8 hours with no problems... So that leads me to think it is involved with the Bridge..

Thanks for your time (and GREAT product!)

Gary Miyakawa

AS New Data: notification:callstatus:incoming:41:GaryM:10.1.2.90:disconnected:512:0:videocall1305211729844:KA_T
Send Msg: GSM_Keepalive
1305211729853:pR: GS
AS New Data: GS
1305211729854:pR: M_Keep
AS New Data: M_Keep
1305211729857:pR: aliveerror: command not found
AS New Data: aliveerror: command not found
1305211759850:KA_T
Send Msg: GSM_Keepalive
1305211759862:pR: GSM_KeepaliveAS New Data: GSM_Keepalive1305211759953:pR: error: command not found
AS New Data: error: command not found
level:91 scale:100 status:4 health:2 present:true voltage: 8178 temperature: 352 technology: Li-ion AC powered:false USB powered:false icon:17302683 invalid

charger:0
ACTION_BATTERY_CHANGED pluggedType: 0
1305211789853:KA_T
Send Msg: GSM_Keepalive
1305211789863:pR: GSM_KeepaliveAS New Data: GSM_Keepalive1305211789866:pR: error: command not found
AS New Data: error: command not found
Connected to B4A-Bridge
1305211849858:KA_T
Send Msg: GSM_Keepalive
main_send_message (B4A line: 62)
AStreams.Write(buffer)
java.lang.NullPointerException
at anywheresoftware.b4a.randomaccessfile.AsyncStreams.Write2(AsyncStreams.java:90)
at anywheresoftware.b4a.randomaccessfile.AsyncStreams.Write(AsyncStreams.java:82)
at com.garymiyakawa.MIP.main._send_message(main.java:709)
at com.garymiyakawa.MIP.main._keepalive_timer_tick(main.java:561)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:104)
at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:101)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:126)
at android.app.ActivityThread.main(ActivityThread.java:3997)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
 
Upvote 0
Top