Android Question and further with the error "java.lang.NullPointerException:"

D

Deleted member 103

Guest
Hi,

the errors with "java.lang.NullPointerException:" do not stop.


Mein.java:


Starter.java:

Is only a guess, but it may be that the timer is overstretched in starter service and the callsubs are not executed correctly?
If so, should the timer be moved to the main activity?
 
D

Deleted member 103

Guest
Hi Erel,

I do not want to annoy you, but what about the error "at fg.speedpilot_lite.main._gpstimer_tick (main.java:1810)"?
We have not solved that and it happens very often.
And because I use this routine with other apps, I have the same mistakes.
Can it be that the error with this function "anywheresoftware.b4a.keywords.Common.DateTime.Time" is?

My problem is that I can not reproduce this error with my devices.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is important to start with fixing the issues that you know how to fix. They may be the cause to other issues.

I made some changes in v7.80 to help with several edge cases.

BTW, these are the statistics from B4A-Bridge app:



There are a few crash reports. Some with relevant information (mostly related to inaccessible sockets) as well as some without any useful information.
 
Upvote 0
D

Deleted member 103

Guest
I made some changes in v7.80 to help with several edge cases.
Unfortunately, it did not help, it goes on with the errors.
Here again the latest:







 
Upvote 0
D

Deleted member 103

Guest
How many such errors do you see in the console?
The version 39 is only since Friday the 05.01.2018 online.


You can send me the source code and I'll have a look.
I have sent my source code to you, thank you in advance.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't know whether it is related to these errors however the call to ExitApplication can be risky. The OS doesn't expect the processes to kill themselves.

It seems like IsPaused returns true while the activity is actually paused. Try to monitor the activity state yourself with a process global variable that you set in Activity_Pause and Activity_Resume. Use it instead of IsPaused.
 
Upvote 0
D

Deleted member 103

Guest
New status


It seems like IsPaused returns true while the activity is actually paused. Try to monitor the activity state yourself with a process global variable that you set in Activity_Pause and Activity_Resume. Use it instead of IsPaused.
I can understand that maybe with "Showgpsstatus", but not with "gpstimer_tick", because it does not have to do here with "IsPaused". Here only the time is updated in a label.
By the way, the timer is deactivated at "Activity_Pause" and reactivated at "Activity_Resume".
B4X:
Sub GpsTimer_Tick
    Dim time, DateTime1 As Long
    DateTime1 = DateTime.Now
    time      = DateTime1 - Starter.lngTimer
    lblClock.Text = DateTime.time(time)
...
End Sub

I really do not know how I can reproduce the mistakes with me.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There is no doubt that somehow the activity life cycle doesn't behave properly in your app. I also tried to reproduce such issues before v7.80 was released with all kinds of tests and wasn't able to reproduce this.

Add this this line to this sub as the first line
B4X:
If MainIsPaused Then Return 'MainIsPaused is the process global variable you added.

I cannot say whether it will help or not.
You can also try to catch these errors in Application_Error and ignore them.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm talking about the error where an activity code is called while the Activity is paused. All other errors are unrelated.
The mistake is in B4A framework code. Note that it was there since B4A v1.00.
Contact me by email and I'll send you a beta version.

This is more or less impossible to reproduce this edge case so I cannot be 100% sure.
 
Upvote 0
D

Deleted member 103

Guest
I'm talking about the error where an activity code is called while the Activity is paused.
That would help me a lot, the other mistakes come, more or less, from my bad programming.
 
Upvote 0
D

Deleted member 103

Guest
I highly recommend you to avoid using the Threading library. B4A code was never intended to be executed on background threads.
Can you improve the interoperability between B4a and the Threading Library?
Why should B4a only use a processor if today's smartphone has multiple processors?
For me that would be a very great advantage and help.

I'm just asking because of my problem here.
I've done a lot of testing, but with the Threading Library I get the best results, without deteriorating the update rate.
The ad is smoother and does not stutter.

I do not know how difficult it is for you,
but I think you have already mastered a lot of difficult task.
 
Upvote 0
D

Deleted member 103

Guest
Hi Erel,

First of all, I thank you for being able to test the new b4a version 7.81.

Now I want to give my feedback on B4a 7.81.
After this report comparison, it is now certain that the version 7.81 is really error-free.

In the report pictures you can see exactly that with B4a 7.81 significantly fewer crashes are caused.

From me, you can also release the update.

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…