Process *.GPS has stopped unexpectedly. Please try again

UgP

Member
Licensed User
Longtime User
Hi, I'm stuck with a bit of a problem

I'm currently writing an android program that takes a bunch of data ( a few string and one integer) along with 4 images (blobs) and saving it in a database with the SQL lite.

I am able to write multiple rows of this data, but the moment i try to query the database multiple times i get the following error:

The application Sampler (process Sampler.GPS) has stopped unexpectedly. Please try again.

With my programs name Sampler.

I have noticed that I can query the data, excluding the blobs, multiple times without any trouble. I can query the database once, and am able to view that one times 4 blobs, but when i query another row i get the error.

I am at a loss with what might be the problem. Can it be a bug?
 

UgP

Member
Licensed User
Longtime User
Ok lol i compiled a .jpg of the log but its 1.9Mb, so i can't upload it

Looking for an image repository to upload to
 

UgP

Member
Licensed User
Longtime User
Do you have an email address i can send it to?

The image quality gets reduced a lot with upload
 
Last edited:

UgP

Member
Licensed User
Longtime User
This is always the first to appear

>>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
CheckJNI is OFF
--- registering native functions ---
Scanning package: /data/app/vmdl72970.tmp
Removing non-system package:Sample.GPS
Removing package Sample.GPS
Activities: Sample.GPS.main
Scanning package Sample.GPS
/data/app/vmdl72970.tmp changed; unpacking
DexInv: --- BEGIN '/data/app/vmdl72970.tmp' ---
DexOpt: load 151ms, verify 463ms, opt 14ms
DexInv: --- END '/data/app/vmdl72970.tmp' (success) ---
Activities: Sample.GPS.main
Uninstalling process Sample.GPS
move /data/dalvik-cache/data@app@vmdl72970.tmp@classes.dex -> /data/dalvik-cache/data@app@Sample.GPS.apk@classes.dex
New package installed in /data/app/Sample.GPS.apk
Shutting down VM
DestroyJavaVM waiting for non-daemon threads to exit
DestroyJavaVM shutting VM down
HeapWorker thread shutting down
HeapWorker thread has shut down
JDWP shutting down net...
adbd disconnected
VM cleaning up
ERROR: thread attach failed
LinearAlloc 0x0 used 661476 of 5242880 (12%)
Uninstalling process Sample.GPS


The further down this pops up

Removing.../data/local/tmp/Sample.GPS.apk
insert plugin size 3
Remove /data/local/tmp/Sample.GPS.apk Fail!
java.io.IOException: Error running exec(). Commands: [/system/xbin/su, 0, /system/bin/rm, /data/local/tmp/Sample.GPS.apk] Working Directory: null Environment: null


Then after I tell the program to force shut down

1572864-byte external allocation too large for this process.
Out of memory: Heap Size=5575KB, Allocated=3302KB, Bitmap Size=9728KB
VM won't let us allocate 1572864 bytes
--- decoder->decode returned false
Shutting down VM
threadid=3: thread exiting with uncaught exception (group=0x4001e390)
Uncaught handler: thread main exiting due to uncaught exception
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
...
...
...
WIN DEATH: Window{44a348f0 Sample.GPS/Sample.GPS.main paused=false}
 

UgP

Member
Licensed User
Longtime User
Thanks that part is working now

I have gotten another error with the GPS.

I have found that if I run the program from the phone that i can run it once without issue, but the second time it gives me an error:

An error has occurred in sub: main_activity_resume (B4A line:416)
If GPS1.GPSEnabled=False
Then

java.lang.NullPointerException
Continue?

When i close the program and run it again it works. and then the next time the error again

I would assume that the problem lies with the GPS not being released in the previous program, but i have checked and I have GPS1.Stop in the activity_pause section.

What is causing the error?
 
Last edited:

UgP

Member
Licensed User
Longtime User
Here is the log of the error

** Activity (main) Create, isFirst = false **
release camera
DebugMonitor class=com.htc.launcher.Launcher focus=false
** Activity (main) Resume **
open main camera
no file - can't switch camera
CameraService::connect E (pid 3540, client 0x71320)
Client::Client E (pid 3540)
createInstance: E
...
...
...
Set main cam and main cam only
set sensor selection :0
main_activity_resume (B4A line: 416)
If GPS1.GPSEnabled = False Then
java.lang.NullPointerException
at anywheresoftware.b4a.gps.GPS.getGPSEnabled(GPS.java:128)
at Sample.GPS.main._activity_resume(main.java:285)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:99)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:85)
at Sample.GPS.main.afterFirstLayout(main.java:89)
at Sample.GPS.main$WaitForLayout.run(main.java:71)
at android.os.Handler.handleCallback(Handler.java:609)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4603)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
DebugMonitor class=Sample.GPS.main focus=true
Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@44a5c188 (uid=10061 pid=3540)
 

UgP

Member
Licensed User
Longtime User
A I found it

I used the code

If FirstTime Then
GPS1.Initialize("GPS")
End If

and if its not the first time running the program it does not initialize the object

Thanx once again :D
 
Top