cancel
Showing results for 
Search instead for 
Did you mean: 

Why simulator does not work when I call function in other class?

heyo
Senior

Hello, I want to ask why simulator turn off when I call function in other class like that:

0693W00000Y8vOCQAZ.png

9 REPLIES 9
Romain DIELEMAN
ST Employee

Hi,

What do you mean by the simulator turns off ? Do you mean it crashes ? It could be because your project is actually crashing at that line. If you can try to debug step by step your project.

/Romain

When I call a function in another class and set pointer to other screen it crashes:

0693W00000Y8zHFQAZ.pngBut if I not use one of them it working fine

heyo
Senior

up

Not easy to help with what you shared without the context of those functions/code. I mean if it works fine without calling them then it comes from the function themselves.

Share the log file as well because "simulator" crash is too vague once again, or better the project itself so that other users can replicate it.

Is it only the simulator that crashes as well or do you also hit hardfault on target ?

/Romain

Where I can find log file? It crashes also on target.

The log file is found in the %appdata%/roaming/TouchGFX-4.21.1/

If it crashes on target then it is not just the simulator but the function itself then. What do you see when you debug ?

/Romain

When I call a function in another class and there are also pointer which goes in to same screen as first one. I marked red where crashes

0693W00000Y9hU8QAJ.png

heyo
Senior

@Romain DIELEMAN​ After debugging I found out that my pointer is 0. What can cause this problem?

0693W00000Y9iUxQAJ.png