Ghost duplicate text lines in Terminal on Android

Hey there, not so fast. I thought that you were actually reading my posts rather that just assuming you know the right solution and I was just mistaken in my implementation. I used YOUR code as well. Just because it doesnā€™t show the problem on your CPU or your phone doesnā€™t mean it isnā€™t there. Resorting to the old saw of saying I donā€™t know what I am doing or that I have bad code is frankly absurd when the code that you sent fails as well.

I have run development organizations in all kinds of languages at all levels. Good developers want reproducible bugs so that they can find the issue and fix it. Bad developers scoff and chalk it up to operator errorā€¦and the bug remains and fails after release!

Which are you?

2 Likes

Neitherā€¦ I am a just another Blynk user who saw your issue, pointed out some facts based on my own past experience with this widget and years of using Blynk, and did my best to keep your topic flowing in case someone else who might be experiencing the same issue joined in, or the the actual Blynk developers took notice and recognised a real issue. FYI, here have been references to similar repetitions in the pastā€¦ but usually the same, limited case or hard to reproduce or prove issues, as I can recall.

But unlike your apparent terminal issue, I donā€™t wish to keep repeating myself :wink: And since I have tested what code you did provide, and am actively running various terminal stuff on multiple emulators, phones, tablets and projectsā€¦ all working fine BTWā€¦ I have nothing more to add, so I am going to sit back and watch. Thatā€™s all I ment, and I do hope it works out for you.

Thanksā€¦appreciate your help and efforts. I know these are hard to find and based on my searches this is not the first time it has happened. I am going to post my, much simpler, latest code that fails as a bug report and see what the developers have to say.

Sorry if I misjudged you.

1 Like

Put it up on Issuesā€¦no response, but magically it disappeared an hour later. On all apps.

Coincidenceā€¦? Either way, it all works now.

First offā€¦Environment
Adafruit ESP 8266
Samsung Note 8 (fails)
Apple iPhone 7+ (does not fail)
Android Version 8.0.0
Kernel Version: 4.4.78-14375742
Build Number:R16NW.N950USQS5CRJ3
Carrier: T-Mobile
Connection: Local WiFi Router
Blynk Server v0.5.4

This has been dogging me for a while. There are repeating lines in my terminal widget on my note 8. At first I thought that it wasnā€™t there, and then it was, and then it was gone. Searches indicate that others have complained about something like this back a couple of years. It fails reliably on the Note 8, but doesnā€™t appear at all on iOS.

Once I figured out how to find it, the behavior is totally reproducible and appears to have virtually nothing to do with the local code and everything to do with the widget itself on my Note 8.

The code really doesnā€™t matter so I built a bare bones sample using the terminal and a timer. Since this is currently running on an esp8266, it uses WiFi.

My test code:

//*************************************************************
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>
//Auth token
char auth[] = "xxxxxxxx";
BlynkTimer timer;
// Attach serial terminal to Virtual Pin V1
WidgetTerminal terminal(V1);

void sendUptime(){
  //millis to Serial monitor
  Serial.print("[");
  Serial.print(millis());
  Serial.println("]");

  //millis to Blynk terminal widget
  terminal.print("[");
  terminal.print(millis());
  terminal.println("]");
  terminal.flush();
}

void setup()
{
  // Debug console
  Serial.begin(9600);
  delay(5000);
  //reconnect to cached valid WiFi connection
  Blynk.begin(auth, "","");
  // Clear the terminal content
  terminal.clear();
  // Print Blynk Software version to the Terminal Widget when
  terminal.print("Blynk v" BLYNK_VERSION);
  terminal.print(": Device started\n");
  terminal.print("-------------\n");
  terminal.flush();
  timer.setInterval(4000, sendUptime);
}

void loop()
{
  Blynk.run();
  timer.run();
}

Serial Terminal printout is as one would imagine:
Connect indication and then time hacks in milliseconds every 4 seconds

[5040] Connected to WiFi
[5040] IP: 10.0.1.16
[5040]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.4 on ESP-12

[5135] Connecting to blynk-cloud.com:80
[5328] Ready (ping: 58ms).
[9529]
[13529]
[17529]
[21529]
[25529]
[29529]
[33529]

Blynk on the Note 8 is a little different

Startup message is duplicated, as are the time hack lines.

What makes this hard to find is that if you then minimize the Blynk app on the phone and then re-maximize, the duplicatesā€¦simply disappear when the app is re-painted to the screen.

However, if you stop the app in the Blynk UI, the duplicates re-appear, but this time reordered as two complete sets of data:

If you again start the app in the UI, generally the duplicates will disappear again, although cycling back and forth between stop and start often looks good in the run mode, but sometime the two sets of duplicates re-appear even in the run mode.

Once the duplicates are eliminated and the run continues, subsequent data will again be duplicated and minimizing and maximizing the UI will eliminate them each time.

This seems to have something to do with the Terminal data buffer on the phone app, but without knowing the architecture I really cannot comment further. It is, however, totally reproducible on the Note 8, but again, never on iOS, at least on the iPhone 7+.

Thanks guysā€¦itā€™s gone now.

First, all you did is create a duplicate topic for same exact issue, which we donā€™t like here, so I merged it back in with this one. It is all the same forum you know :stuck_out_tongue: and our discussion had been keeping it at the top anyhow :wink:

As for your ā€œsolutionā€ā€¦ unless the developers fixed something, then ran to your home and installed the App secretly on your phoneā€¦ yes, coincidence or something else done at your endā€¦ restarting/installing App? some other phone setting? solar flares? Much like other past reported terminal duplication issues, we may never know :thinking: another one for the x-files.

Irrespective of your sarcasm. I am not an idiot and I know how to develop and deploy code. You have no idea what is really behind these widgets.

I changed nothing. Not on the phone or on the platform. It failed consistently for days. All of a sudden it works reliably. I donā€™t believe in code fairies.

Enough already.

Good to knowā€¦ Why, did someone call you such?

We do get that a lot hereā€¦ No explanation, but suddenly something that was broken for one person just worksā€¦ it has happened to me as well.

OK :wink:

TLDR/

blynk terminal has issues.

often sends duplicate or triplicate of terminal.prints

doubt it will ever be fixed.

1 Like

itā€™ll be back mateā€¦ donā€™t you worry about that!

Like a spicy burritoā€¦ hits some worse than others :rofl:

brilliant simile for the circumstances :wink:

Well, it appears to have been a problem in the past, was a problem for me and then after writing sample code to reliably reproduce it, yesterday morningā€¦it simply went away. I changed nothingā€¦in fact one system that was connecting and repeating for me is 1300 miles away. I know I changed nothing there. Clearly there is a recurring problem and whatever fixed it was a byproduct of something on the server side. If they ā€œfixed itā€ accidentally, I agree, they will break it accidentally againā€¦

@Dmitriy This discussion, and reportedly randomly recurring issue, seems to linger on like that aforementioned burritos results :burrito:ā€¦ is there or is there not a still known ā€œterminal duplicating stringsā€ issue?

@Gunner I had the problem a few days ago with latest version of everything. Fix for me was killing the app and starting it back up.

1 Like

That might explain why I donā€™t seem to run into this issueā€¦ most any project I use with the terminal widget is ran on an as needed basis with phone/tablet shutdown in betweenā€¦ well that and I never use the terminal.print() terminal.flush() methodā€¦which I still suspect may exacerbate the issue.

No developers seem concerned either?

I donā€™t use terminal commands, only Blynk.virtualWrite(). Itā€™s quite gruesome when it pops up seeing everything in duplicate.

1 Like

In my experience, visual issues that get ā€˜correctedā€™ when the screen is refreshed or resized (forcing a refresh) are always to do with the display code (GDI stuff). This bug could be in the depths of Android or in the implementation of the widget. It is extremely unlikely to be the code that put the (irrelevant) text in the widget.

1 Like

Depends on HOW the code puts that text into the widget, No, not necessarily is it the cause, but yes it does seem to matter. Besides I believe the terminal commands were early stage development and may contain something that allows this ā€œbufferedā€ duplication at random times. But until (if) a developer says different, then this is all experiential observations from a few long term Blynk usersā€¦ but what do we know :stuck_out_tongue: