Android Question [ClLOSED] Log is doubling(?)

Discussion in 'Android Questions' started by Cableguy, Jan 20, 2015.

  1. Cableguy

    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:

    Code:
    ** 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 :

    Code:
    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]
     

    Attached Files:

    Last edited: Jan 20, 2015
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Logs just once for me.
     
  3. Cableguy

    Cableguy Expert Licensed User

    Getting stranger...

    my LogTest Logs like this:

    Code:
    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 **
     
  4. NJDude

    NJDude Expert Licensed User

    Cableguy likes this.
  5. Mahares

    Mahares Well Known Member Licensed User

    I got the same result as TDS. Try: Clean files folder and clean project.
     
  6. Cableguy

    Cableguy Expert Licensed User

    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.
     
  7. KMatle

    KMatle Expert Licensed User

    Maybe stupid: How are you connected (with WiFi AND cable?)
     
    Cableguy likes this.
  8. Cableguy

    Cableguy Expert Licensed User

    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?
     
  9. KMatle

    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 likes this.
  10. Cableguy

    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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice