-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
laWidget_Delete doesn't work & causes reset #3
Comments
This issue is still present |
It only works if I call laWidget_RemoveChild before laWidget_Delete |
Due to Harmony's non-blocking nature it is possible for the application to manipulate the graphics state while the graphics library is trying to perform work. It could be in the middle of event processing or painting a frame. The application would likely become unstable if a widget is in the middle of painting and it gets deleted by the application. The "laContext_IsDrawing" function is provided in order to query the engine state. Manipulation of the state should only occur when this function returns 'false'. If you're sure the engine isn't performing work and the crash still occurs then it could be a bug in the system. |
Found a tricky situation still regarding this case. laContext_IsDrawing is returning false before I proceed with the widget deletion. Found that if I coment line 507-508 of libraria_context.c this problem don't happen. It looks like harmony is trying to focusLost on a object that don't exist anymore. |
Solution Insert the following lines at _laWidget_Destructor at libaria_widget.c inside childrens for-loop to null focus function.
|
I've tried laWidget_Delete and laWidget_DeleteAllDescendants and it all causes system reset.
I've tried to debug and it seems libaria tries to paint the object again after released his memory. - Not sure
Call stack:
runtime exception @ pc address 0x9d02d968 function and line number unavailable
The text was updated successfully, but these errors were encountered: