Skip to main content
GAlia.1
Associate II
November 13, 2020
Question

touchgfx::Drawable::getCachedVisibleRect(void) trying to access a forbidden memory

  • November 13, 2020
  • 2 replies
  • 700 views

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

This topic has been closed for replies.

2 replies

Martin KJELDSEN
Principal III
November 18, 2020

Simulator? Target? Both?

Can you share the project?

GAlia.1
GAlia.1Author
Associate II
November 19, 2020

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.

0693W000005Bw6OQAS.png 

Step 2:

Now the screen below will be shown. Here you can select one of the elements from the list.

0693W000005Bw80QAC.png 

Step 3:

Now the screen below will be shown. The error occurs when you press the "back" button.

0693W000005Bw8oQAC.png 

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:

0693W000005BwBgQAK.png 

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.