cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX canvasBuffer

feelingoflight
Associate III

Don't you think it's wrong to make canvasBuffer as member of StartupScreenViewBase class?

As far as I understand every screen can write to canvasBuffer because CanvasWidgetRenderer is the full static class.

StartupScreenViewBase is generated by designed.

I've spent quite a lot of time to find out the reason why data of my other Screen (not StartupScreenBiewBase) are corrupted.

Hope I'm right and the reason is the next:

SomeSecondView has a size larger than StartupScreenViewBase (StartupScreenViewBase contains canvasBuffer). And when screens are swapped, SomeSecondView is located in same memory as StartupScreenViewBase .

After some actions on SomeSecondView occurs writing to the canvasBuffer. canvasBuffer is the member of StartupScreenViewBase, but now, when current view is SomeSecondView and SomeSecondView has larger size than StartupScreenViewBase, AND canvasBuffer NOW IS PLACE WHERE SomeSecondView ARE LOCATED.

That's how i think SomeSecondView data are corrupting.

When i disable canvasBuffer everything works well.

Also i checked memory in IAR debugger, the memory exactly where the canvasBuffer starts is rewrites and corrupts.

Am I correct in my conclusions?

Thank you

0 REPLIES 0