{"action":"opened","issue":{"url":"https://api.github.com/repos/corporateshark/WalCommander/issues/378","labels_url":"https://api.github.com/repos/corporateshark/WalCommander/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/corporateshark/WalCommander/issues/378/comments","events_url":"https://api.github.com/repos/corporateshark/WalCommander/issues/378/events","html_url":"https://github.com/corporateshark/WalCommander/issues/378","id":57548798,"number":378,"title":"Detect crash of previous wcm session","user":{"login":"helgp","id":8525021,"avatar_url":"https://avatars.githubusercontent.com/u/8525021?v=3","gravatar_id":"","url":"https://api.github.com/users/helgp","html_url":"https://github.com/helgp","followers_url":"https://api.github.com/users/helgp/followers","following_url":"https://api.github.com/users/helgp/following{/other_user}","gists_url":"https://api.github.com/users/helgp/gists{/gist_id}","starred_url":"https://api.github.com/users/helgp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helgp/subscriptions","organizations_url":"https://api.github.com/users/helgp/orgs","repos_url":"https://api.github.com/users/helgp/repos","events_url":"https://api.github.com/users/helgp/events{/privacy}","received_events_url":"https://api.github.com/users/helgp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/corporateshark/WalCommander/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-13T01:56:52Z","updated_at":"2015-02-13T01:56:52Z","closed_at":null,"body":"I have seen wcm crashes on startup many times during development. All had similar patterns:\r\n- On exit wcm writes junk to persistent storage\r\n- On startup the junk is not properly parsed\r\nThese are blocker-level bugs. As developers, we know how to resolve these. Regular user will just stop using wcm after that. \r\n\r\nAmount of objects to persist grows steadily, as well as a chance for the blocker-level bug to appear in the release.\r\n\r\nWcm could detect crash on previous startup, report it to the user, and offer options to clean its persistent storage, or help us to resolve the issue. \r\n\r\nThe design might be:\r\n- Have a persisted value ConfigStatus with the values like: \r\nSTATUS_CONFIG_LOADING \r\nSTATUS_STARTED (i.e. menus, panels are displayed)\r\nSTATUS_CONFIG_SAVING\r\nSTATUS_SUCCESSFUL_EXIT \r\nwhich is set on appropriate phases of wcm lifecycle.\r\n- Before STATUS_LOADING is set, ensure that the status is either STATUS_SUCCESSFUL_EXIT or STATUS_WCM_STARTED. If it is not, show a warning dialog explaining the problem, with options \"Continue\", \"Ignore Config\", \"Erase Config\"(?), and may be an option(?) to dump config to a file, so we can get something from the user without asking him to go to weird registry|folder location.\r\n- Ensure that the above does not break an operation mode when status is not automatically saved on exit: \"Options-System settings-Auto save setup\" is off), and with 2+ wcm instances running in parallel."}}