Skip to main content
heyo
Associate III
Jan 23, 2023 1:47 PM UTC
Question

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

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

0693W00000Y8vOCQAZ.png

This topic has been closed for replies.

9 replies

Romain DIELEMAN
ST Employee
Jan 24, 2023 3:47 AM UTC

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

heyo
heyoAuthor
Associate III
Jan 24, 2023 5:37 AM UTC

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
heyoAuthor
Associate III
Feb 1, 2023 5:31 AM UTC

up

Romain DIELEMAN
ST Employee
Feb 1, 2023 5:42 AM UTC

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

heyo
heyoAuthor
Associate III
Feb 1, 2023 7:32 AM UTC

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

heyo
heyoAuthor
Associate III
Feb 1, 2023 11:53 AM UTC

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

heyo
heyoAuthor
Associate III
Feb 1, 2023 12:14 PM UTC

0693W00000Y9iUxQAJ.png