cancel
Showing results for 
Search instead for 
Did you mean: 

Why simulator crashes when I call function in another class?

heyo
Senior

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

7 REPLIES 7
t.decker
Senior II

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.

Do you mean about this?
_legacyfs_online_stmicro_images_0693W00000biEFLQA2.png

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.

When I debug it crashes at this point but when I do not call another object it works fine.


_legacyfs_online_stmicro_images_0693W00000biEQOQA2.pngi've tried to comment this function and still crashes:


_legacyfs_online_stmicro_images_0693W00000biERgQAM.png

Osman SOYKURT
ST Employee

Hello heyo,

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

Also, what is your Drop object?

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

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

Hello,

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

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX