How do I hide an error pop-up window?

okay I understand

Thank you @Mok_Ryun

Really, hmm you look like old programmer :face_with_monocle:

You don't need to apologize to me,:sweat_smile:
actually I have to apologize for giving answers that do not fit what you expect

1 Like

Hi Mok,
maybe you have already tried what i'm saying, but just two hints:

  1. to hide completely any Error popup, you have to apply, as Salman said, the Screen Error pupup empty, without any message. In this case the popup does not appear at all.
  2. Since it seems that the buffer that you receive is corrupted in the middle, are you setting correctly the end of (BT) buffer character ? Have you set the \n character as buffer termination in your BT receiving routine in your app ?
    Something like:
    image
    When you want that your app wait for the complete buffer, normally you set -1 as number of bytes, then you set a \n as terminator in the Designer as below:
    image

Maybe it helps.
Cheers.

1 Like

Hi uskiara!
i tried right ago with several form(?) of "Screen.ErrorOccured". ofc

too.

but not worked. i guess this block is for high level errors, not low-level. bcz my error is operating not accepted arguments of [ai2]... im sorry..

Surely i set. but this error is pop up when sender sending corrupted.
and as i said

i can make "do not process if ender words are over 2", but there are cases of using two or over... then it will be make works that redesigning whole project. so worthless massive work if i can make it dissappear :sweat_smile:

my BT algorithm :

if (\n in buffer)
{ 
    split buffer at [\n]
    int Number = number of [\n] in buffer
    for (int n=0;n<number;n++)
         {
            string dummy = nth string
            if ( [,] exist)
               { 
               parsing and make list
               command = 1st of list
               data1~ = 2nd of list~
               ... 
               }
            else 
              command = nth string;
           }
}

about this. idk its correct :joy:
whatever there is function for make parsing ender word already.
but in this case,

it makes error like as "string in integer" or just corrupted data.

thank you :slight_smile:

Hi Mok,
Ok, but the correct buffer should be as below:

this means that every message should end with a \n, and the \n is set as the ending character (isn't it ?)
So why in you BT algorithm are you splitting the received buffer at \n ?
If this is true, a correctly received buffer should contain only 1 \n so you can discard a buffer with more than 1 \n. without writing so much code.
Otherwise if your buffer is collecting more messages each one ended by a \n (but in this case the \n cannot be the receiving termination character), you can use the "start at" block

to verify whether the position of the first \n is too little and discard that buffer, before parsing the list, so avoiding to assign a string to an integer (or visa versa).
Keep in touch. :smirk:

PS... and what about the
image
block, again before parsing each element ? If is not a number you skip that buffer...

It is not a massive work to verify incoming data. Can you give a verbatim example of data received ('good' data)?

Hey Uskiara, the delimiter byte is more commonly 10 rather than 13. Since Mok has no control over what the sending device, trial and error is necessary to discover the delimiter, if indeed there is one.

However the issue is not likely to be with the device as Mok has assumed. It is highly likely that the App is not processing the data fast enough, causing an 'overlap' of data in the buffer.

Hi Chris,

Yep !!!
But, according to what he has written, any message should be ended by a \n, so by setting a \n as the stop receiving character should exit the receiving function.

  • DATA1,intdata1,intdata2\n
  • DATA2,intdata1,intdata2\n
    But it seems that is not the case.

Perhaps he could modify the receiver: instead of waiting for a terminator character, he could wait until the buffer is completely emptied...

Anyway, I'm with you, by solving the problem why the data are corrupted would be the best solution, but since he asks for a "quick and dirt" solution... :slight_smile: :slight_smile::slight_smile:
Ciao, ugo.

1 Like

Beware of CR (13). That is used mostly in Windows and devices that expect to talk to Windows.

Hi,
yes I agree with both of you but, as Chris said, if the device is sending just the CR as message terminator, Mok has no chances. So my suggestion is to wait until the transmission ends for a while and gives a breath to the app...
(probably... :grin:)
Tschuess

The device sends data very well. The problem is that you receive this data badly and process it badly, and this is where the problem arises.

So Mok

Do you want to be helped or not? If the answer is yes, upload your Project File and I will take a look at it for you. Also need to see verbatim examples of the good data the device sends.

:joy: :joy: :joy: You are right
the corrupted data(ata2\nData2 or Data1,intdata1,intd) do nothing in app even not corrupting anything, bcz runtime error proccssing not to corrupt app. it just showing "hey this app is dumb, would you turn off? (whisper or not.. :shushing_face:)" pop-up. and users click it even tho ignore the error by clicking other space.
I guess best way to solving problem is not always honest as programmer :joy:

i guess device developer is not lying. as Chris said, app is receiving splitted at wrong length. so thought "merge 2~3 buffer at once(like CCTV saving videos) and process delayed data", but it will be make another problems. for example, my app sending 2~3 command at first open, and processing each command for sending next like TCP connection. (e.g- send me your number - here, 9999 - oh, you are 9th device.. then make you 'A' mode - ok, then i will send you A's data - thank you :))
so as i said, it will be make a lot of works. i would change whole of project pipeline

my client allowed me to showing part of blocks but guess it will be not helpful to help(?) bcz as you and Uskiara said, did all of works to waste corrupted data correctly, and if i build more to more high level filter, i will be make ton of works.
maybe i got hints from Uskiara's idea. (as honest way lol)

if there is way to hide error pop-up, it will be totally helpful :smirk:

thank you always! already so helpful.

From my experience, I know that these errors that call to close the application cannot be hidden. I could only hide the errors with the numbers. If something caused similar errors, I tried to prevent them by improving the application or introducing additional filters to prevent errors from occurring.

Hi Patryk
Right, thats most correct and right way.
but i dont have much time to change whole pipeline and than the problem doing.

so if 'hide' was, it would be best way to solve.
whatever, as you are saying, seems need to improve and make additional filters is only way to solve... :pensive:
thank you :wink:

I think you should find out how the end of the data is actually marked. Then in the BT settings you enter the appropriate end-of-data character and add -1 to the data download block. Then you only receive one line of data and there is no problem with split received data and with garbage. Here, even filters would not be needed and repairing it would be quick.

Horse-to-water Mok. If you don't do it right, when the App fails - who will be blamed?

1 Like

Read all I have said. This is not rocket science Mok. A whole App can be defined in a day. Why would your client "allow you to show part of the blocks". That implies that the client knows how to code the App - so do you really have a client on your back or is it that you feel you might be embarrassed if we see your code? Do not worry if you have made mistakes, we all do - I am the champion mistake maker I can assure you.

1 Like

I saw a similar message fragmentation error in a BlueTooth BLE app, where the programmer took the different approach of using a global variable as an input buffer, and just adding incoming text to it as it arrived, regardless of delimiters. After each text fragment arrived, it would check if the hoped for delimiter was in the global buffer variable. If found, it would clip off the front of the buffer and try to use it, leaving the remainder of the buffer (after delimiter) there for the next cycle.

That's just a handful of code.

Definitely right. So im making another filter. ofc it will be make another bug, but i know nothing to way correct except this way. (and also i must fix it someday)

And also i thought "my client blabla i cant show bla" is so rude for you bcz this ai2 is not for totally private coding system. and even i asking to solve!
But there is new technology of client(new algorithm? core function?) in here and must be secret. and if i would to capture "where the problem coming from exactly", i have to show these that he warned not to open public several times :unamused:
This is why I chose the ditry way. i couldn't ask right way...
(tbh, want to show off what i made :smirk:)

so, im trying to fix it but gonna be long time. like as "A+B=true" is easy but "A+B+C=true" is not easier than think ('hey, just insert C more!' ...its not, you know).

im trying similar this way. ofc not be a handful bcz of ton of disorderly function conditions tho :joy:

thank you for good scolding, Chris! Really appreciate.

ps/ this app is for 'part of literally rocket' tho. :rofl:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.