Android Question [ClLOSED] Log is doubling(?)

Cableguy

Expert
Licensed User
Hi guys,

Before posting this in the bug section, I am firstly asking if I'm doing something wrong...

First, here is my new app Log window result:

B4X:
** Activity (main) Create, isFirst = true **
** Activity (main) Create, isFirst = true **
Log entry number 0; target as (TextView): Left=64, Top=0, Width=259, Height=81:16
Log entry number 0; target as (TextView): Left=64, Top=0, Width=259, Height=81:16
Log entry number 1; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 1; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 2; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 2; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 3; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 3; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 4; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 4; target as (RadioButton): Left=0, Top=64, Width=592, Height=81:16
Log entry number 5; target as (TextView): Left=21, Top=829, Width=296, Height=81:16
Log entry number 5; target as (TextView): Left=21, Top=829, Width=296, Height=81:16
Log entry number 6; target as (TextView): Left=317, Top=829, Width=296, Height=81:16
Log entry number 6; target as (TextView): Left=317, Top=829, Width=296, Height=81:16
Log entry number 7; target as (TextView): Left=21, Top=910, Width=296, Height=81:16
Log entry number 7; target as (TextView): Left=21, Top=910, Width=296, Height=81:16
Log entry number 8; target as (TextView): Left=317, Top=910, Width=296, Height=81:16
Log entry number 8; target as (TextView): Left=317, Top=910, Width=296, Height=81:16
Log entry number 9; target as (TextView): Left=21, Top=829, Width=296, Height=81:16
Log entry number 9; target as (TextView): Left=21, Top=829, Width=296, Height=81:16
Log entry number 10; target as (TextView): Left=317, Top=829, Width=296, Height=81:16
Log entry number 10; target as (TextView): Left=317, Top=829, Width=296, Height=81:16
Log entry number 11; target as (TextView): Left=21, Top=910, Width=296, Height=81:16
Log entry number 11; target as (TextView): Left=21, Top=910, Width=296, Height=81:16
Log entry number 12; target as (TextView): Left=317, Top=910, Width=296, Height=81:16
Log entry number 12; target as (TextView): Left=317, Top=910, Width=296, Height=81:16
Log entry number 13; target as (TextView): Left=21, Top=910, Width=296, Height=81:16
Log entry number 13; target as (TextView): Left=21, Top=910, Width=296, Height=81:16
Log entry number 14; target as (TextView): Left=317, Top=910, Width=296, Height=81:16
Log entry number 14; target as (TextView): Left=317, Top=910, Width=296, Height=81:16
** Activity (main) Resume **
** Activity (main) Resume **
And here is the code that created the Logs :

B4X:
Log("Log entry number " & n & "; target as " & target & ":" & F)
This line is part of a sub that gets called to resize textsize prop for the target views.
I am creating my interface by code, using relative positioning, thou I firstly created it in the designer to have a placement idea. At first I thought it was due to the .bal file presence, but now that I have coded all views into place and no longer need the .bal file and deleted it, I just can't figure out why my resize sub is being called twice...
In fact, all my subs are being called twice... except for Activity Pause, wich IS NOT being called at all!!
Is this my fault, or a BUG?

[Attached is a very, very, very small project that, in my computer and device, reproduces the behaviour]
 

Attachments

Last edited:

Cableguy

Expert
Licensed User
Getting stranger...

my LogTest Logs like this:

B4X:
Installing file.
PackageAdded: package:b4a.example
Copying updated assets files (1)
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
** Activity (main) Create, isFirst = true **
Log entry number 0; target as (TextView): Left=318, Top=318, Width=318, Height=127, Tag=:26
Log entry number 0; target as (TextView): Left=318, Top=318, Width=318, Height=127, Tag=:26
** Activity (main) Resume **
** Activity (main) Resume **
 

Cableguy

Expert
Licensed User
Read THIS and THIS thread.
Many thanks NJ.

I just tested in one of my lower end devices, and get only one line per log, as expected.
The device showing double log is a ROOTED S5.
All I want to be sure is that my events and subs are not in fact being called more than necessary.
Release mode shows only one entry per log.
 

Cableguy

Expert
Licensed User
Maybe stupid: How are you connected (with WiFi AND cable?)
Actually not that stupid.
Indeed I usually connect using both WiFi and USB cable, but since my S5 is not seen by b4a ide, it shouldn't get the logs either, right?
 

KMatle

Expert
Licensed User
My thought was: When both (Wifi & cable) is connected then maybe the log entries are sent to both connections in the same log = x2

I used a cable only one time. As I can remember there is no need to "connect". Will try that at home later.
 

Cableguy

Expert
Licensed User
I had the cable only to provide charger power... the avd doesn't see my S5... so why does it double? Anyway... as long as it's only the logs that get doubled
 
Top