Skip to main content
heyo
Associate III
Apr 17, 2023 6:37 AM UTC
Question

Why simulator crashes when I call function in another class?

I've created a list and need to get value from model.hpp and using

WeeklyScheduleView objs;

drops = objs.getDropDownClicks();

to get value. But when it calls it crashes.


_legacyfs_online_stmicro_images_0693W00000biCtxQAE.png
_legacyfs_online_stmicro_images_0693W00000biCtnQAE.png

This topic has been closed for replies.

7 replies

Senior II
Apr 17, 2023 10:31 AM UTC

Check if presenter is a valid pointer, maybe it is uninitialized.

When this account seems to be inactive, try @tdecker2 - ST can't change mail addresses, so I had to create a new account.
heyo
heyoAuthor
Associate III
Apr 17, 2023 11:14 AM UTC

Do you mean about this?
_legacyfs_online_stmicro_images_0693W00000biEFLQA2.png

Senior II
Apr 17, 2023 11:18 AM UTC

Set a breakpoint to the line return presenter->getScheduleDropDown() and see if presenter has a valid address or check at runtime with if (presenter != nullptr) { the line before

When this account seems to be inactive, try @tdecker2 - ST can't change mail addresses, so I had to create a new account.
Osman SOYKURT
ST Technical Moderator
Apr 20, 2023 9:13 AM UTC

Hello heyo,

It crashes at Drop.remove(ProfileDrop[i]) or drops = objs.getDropDownClicks() ?

Also, what is your Drop object?

/Osman

ST Software Developer | TouchGFX
heyo
heyoAuthor
Associate III
Apr 20, 2023 9:22 AM UTC

At drops = objs.getDropDownClicks(). It always crashes when I try to call function in other class.

Do you mean Drop? Drop is a list. The only way calls other function in other class works when container is included in view window

Osman SOYKURT
ST Technical Moderator
May 8, 2023 11:11 AM UTC

Hello,

Did you resolve your issue? If not, can you share your project?

/Osman

ST Software Developer | TouchGFX