How do you identify problem from a huge runtime error message?

Hello,
I run into another problem. I get a huge runtime error message I can not identify the problem.

I found out , it belongs to chart display. Everything works well for quite a while, then
suddenly the error message appears and the program stops. If the chart display is
disabled , there is no error message at all.

Of cause , I looked for an explanation of java.lang.ArrayIndexOutOfBoundsException,
but I have no idea where to look for length and size of this size in the code. Both values
are always different from error to error.

Can anybody help, please ?

You will need to show what it is you are doing with the chart component.

Do you really need to chart 8694 items?

No, I do not need them. I don't know the origin of these big values.

If the error happens, between 200 and 300 points are displayed in the chart.

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

.

Thank you for trying to help.

I attached a .aia file which is a subset of my project, but it behaves like I described earlier.
I removed all not necessary parts to make it as simple as possible.

The program receives a string from a server any 2 seconds. The string consists of 158 values
separated by a semicolon. The program picks certain values out of the stream and displays them
als value and chart. In the example just the values at 3 and 4 is used. I test the program
with my smart phone by scanning the QR-code.

During preparing the example, I found some strange behavior and I now have a guess.
The first value of the string is a time mark in seconds. Normally it must increment by 2
any message from server. However, it seems that after a while the value skips by 2 or 4.
Could it be that something prevents receiving the stream from server and the code swallows
and finally crashes? I know that the stream is correct, because I use an almost similar program
on my PC.

SP_new_F_MS_RTERR_x(1).aia (217.3 KB)

Read the last sentence from the tool tip:
image

You need to clear Chart_PV1 before you do that import from list.

Suggested fix, and something to show as proof the entries grew too large:
image

You are very right, thank you for your help!

First I checked .GetAllEntries without .chart.Clear . The size of the lists increased
dramatically. .chart.Clear does the job.

I also realized that the chart display I expected, can not be realized with AI2 and my
smartphone. I have to decrease the number of displayed points a lot.

Thank you again, I appreciate your help!

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