Variables declared in Process_Globals is missing

edgar_ortiz

Active Member
Licensed User
Longtime User
Again, something I'm doing wrong.
Still do not understand what is

In this case can not access the variables:

B4X:
Dim GlbComillas      As String
Dim DBGPS         As SQL


HTML:
LogCat connected to: B4A-Bridge: samsung GT-S5830M-359971046757729
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
** Activity (main) Pause, UserClosed = false **
** Service (gps) Create **
2013-02-15 16:51:49 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:49', 'Service_Create')
** Service (gps) Start **
2013-02-15 16:51:50 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:50', 'Service_Start')
2013-02-15 16:51:50 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:50', 'Stop previos GPS')
2013-02-15 16:51:50 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:50', 'Next Schedule : 2013-02-15 16:54:50')
2013-02-15 16:51:50 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:50', 'GPS Start')
2013-02-15 16:51:50 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:50', 'Start without filters')
2013-02-15 16:51:57 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:57', 'Begin of LocationChanged')
2013-02-15 16:51:57 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:57', 'MORE than one minute')
2013-02-15 16:51:57 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:57', 'Lat: 16.929757434627653 Long: -89.89064199858869')
2013-02-15 16:51:58 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:58', 'Store in Data Base')
2013-02-15 16:51:58 Before of Store_In_Data_Base: INSERT INTO sg_t_gps (fecha_hora, latitud, longitud, direccion, velocidad, altitud, precision, estado_gps, fecha_hora_envio) values ('2013-02-15 16:51:58', '16.929757434627653', '-89.89064199858869', '0', '0', '181', '40', 'A', '2013-02-15 16:54:50')
2013-02-15 16:51:58 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:58', 'End of Store in Data Base')
2013-02-15 16:51:58 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:58', 'End of LocationChanged')
** Service (gps) Destroy **
2013-02-15 16:51:58 Before of write in the database: INSERT INTO sg_t_log (programa, fecha_hora, info) values ('Service.GPS','2013-02-15 16:51:58', 'Service Destroy')
** Service (gps) Create **
** Service (gps) Start **
2013-02-15 16:55:03 Before of Store_In_Data_Base: INSERT INTO sg_t_gps (fecha_hora, latitud, longitud, direccion, velocidad, altitud, precision, estado_gps, fecha_hora_envio) values (2013-02-15 16:55:03, 16.92938987616214, -89.89096156321627, 0, 0, 140, 20, A, 2013-02-15 16:54:50)
gps_store_in_data_base (java line: 321)
java.lang.RuntimeException: Object should first be initialized.
   at anywheresoftware.b4a.sql.SQL.checkNull(SQL.java:40)
   at anywheresoftware.b4a.sql.SQL.ExecNonQuery(SQL.java:58)
   at gps.test.gps._store_in_data_base(gps.java:321)
   at gps.test.gps._gps1_locationchanged(gps.java:126)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:507)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:165)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:149)
   at anywheresoftware.b4a.gps.GPS$1.onLocationChanged(GPS.java:61)
   at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:227)
   at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:160)
   at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:176)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:130)
   at android.app.ActivityThread.main(ActivityThread.java:3687)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:507)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
   at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized.
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:149)
   at anywheresoftware.b4a.gps.GPS$1.onLocationChanged(GPS.java:61)
   at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:227)
   at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:160)
   at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:176)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:130)
   at android.app.ActivityThread.main(ActivityThread.java:3687)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:507)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
   at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Object should first be initialized.
   at anywheresoftware.b4a.sql.SQL.checkNull(SQL.java:40)
   at anywheresoftware.b4a.sql.SQL.ExecNonQuery(SQL.java:58)
   at gps.test.gps._store_in_data_base(gps.java:321)
   at gps.test.gps._gps1_locationchanged(gps.java:126)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:507)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:165)
   ... 13 more
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Service (service1) Create **
** Service (service1) Start **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
Connected to B4A-Bridge (Bluetooth)

You can see at 2013-02-15 16:55:03 and Main.Glb_Comillas have no value and neither Main.DBGPS thats why: Object should first be initialized

Any help is welcome
 

Attachments

  • GPS_Test.zip
    69.7 KB · Views: 252
Top