-
Bug
-
Resolution: Fixed
-
Minor
-
None
When running agl-compositor without setting XDG_RUNTIME_DIR an error arises and the application tries to exit cleanly. However, in this process a segfault is risen and the tty is left in a state that agl-compositor is not able to use it due to
/dev/tty is already in graphics mode, is another display server running?
After debugging this issue I now understand a few things
- The segfault is triggered after destroy_black_view
- This notification is configured in ivi_shell_init_black_fs
- If I move ivi_shell_init_black_fs just before wl_display_run the segfault is not triggered, which is logical as the problem is caught prior to this point
After a bit more of debugging and comparing with a clean exit there are a few interesting things to mention
- It looks like the problem is caused by the fact that the view created in create_black_surface_view is never added to compositor->view_list
- when view_list_add is called and the view is added there is no segfault
- if I export the function weston_compositor_build_view_list and call it after ivi_shell_init_black_fs there is no segfault
- seems to be related to the fact that in weston_compositor_remove_output there is an iteration over compositor->view_list which triggers weston_view_assign_output
I'm willing to fix this issue but I'm not sure how the best approach would be so any comments will be appreciated.