Skip to main content
heyo
Associate III
January 23, 2023
Question

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

  • January 23, 2023
  • 3 replies
  • 2306 views

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.

3 replies

Romain DIELEMAN
ST Employee
January 24, 2023

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
January 24, 2023

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
February 1, 2023

up

Romain DIELEMAN
ST Employee
February 1, 2023

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
February 1, 2023

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

heyo
heyoAuthor
Associate III
February 1, 2023

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

heyo
heyoAuthor
Associate III
February 1, 2023

0693W00000Y9iUxQAJ.png