2020-11-13 10:24 AM
Hi all,
I am developing a GUI interface and for a certain screen I get an error at the following function:
touchgfx::Drawable::getCachedVisibleRect(void)
It tries to read from a memory region that dows not exist and the application freezes there.
Thank you for the support.
Bests,
Gazi
2020-11-18 12:42 AM
Simulator? Target? Both?
Can you share the project?
2020-11-19 02:34 AM
Hi Martin,
I have not tried it in the target. So the problem happens in the Simulator for sure. It might also happen on target, but I do not know for now.
You will find the project attached. Let me also give you some instructions on how to reproduce the error:
Step 1:
When you open the app, it will send you to the main screen, as you see below.
Press the add button.
Step 2:
Now the screen below will be shown. Here you can select one of the elements from the list.
Step 3:
Now the screen below will be shown. The error occurs when you press the "back" button.
I have already found a work around, however I do not have a clue why it works. Let me explain you the work around:
Go to devicesScreen2 and add there the custom container I created which is called "deviceBrandItem", as shown in the figure below:
You can have this "deviceBrandItem" container as visible or invisible. Once you add this component, the error does not happen.
Can you please give me some explanation of what is going on? If I do something wrong, please let me know,
I am looking forward to your answer.
Thank you.
Bests,
Gazi
P.s. There is also another place in the code where something similar happens. In case we solve the issue above, I hope it also solves the other one.