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
Very rare crashes in SIApplication observerCallback #10
Comments
More info after a crash
This no longer appears to be Application-specific |
Crashed again today at/around the time that the system preferences window was closed. I've wrapped the entire Silica function in a try/catch block (with breakpoint) to see if just ignoring the error is a viable strategy. Will report back. |
Now getting a crash on
This suggests that something is going hopelessly wrong, sometimes, when getting that callback function from the bridge. Not sure how to troubleshoot further. Crash was preceded by a lot of windows swapping positions at random intervals based on click events, but on both monitors instead of just the one where the click happened. |
Crashed today. The callback itself seemed to be null.
Is |
Perhaps there is a race condition where the callback is not available immediately?
Given that SIAXNotificationHandler callback = (__bridge SIAXNotificationHandler)refcon; |
I was trying to find why Amethyst crashes sometime, stumbled upon this crash too. cc/ @ianyh |
Crashed while quitting Chrome (which caused the closing of a LOT of Chrome windows).
|
One thought I had with this was to use the entire observer object as the referenced object rather than the block itself. |
I don't know enough about ObjC to do the equivalent of |
I'm not sure if this can help reproduce the issue, but I got a crash just now that had to do with maximizing a chrome window by double-clicking the title bar (accidentally). There was a noticeable lag, and I had time to restore the window to proper size... I think it's something to do with trying to act on the maximized window after I've un-maximized, or a similar case. Is this an indication that some part of the window management changes when you switch between these 2 modes? |
I just accidentally trapped this in a debugger!
|
🎉 any idea why the callback is an integer with a low-but-not-zero value? |
may be |
I don't know exactly how the subscription model in Amethyst works, but this looks like a data race error to me. Anyway, I based my model off of observations from running Steam and interactions with its windows. Primarily the Store, Library and Community tabs, as when you hover them they create a new window which is destroyed when the mouse leaves the window. It was easy to reproduce crashes by rapidly moving the mouse in and out of these menus. By the looks of the trace above this matches the symtoms I described; might be worth investigating. I fixed this issue by passing in the address of a pointer on my window structure (which is allocated on the heap), that points to memory on the heap, storing the window id. I then invalidate this value when a UIElementDestroyed notification is received, and other unprocessed events check this value before trying to process the event. I have not had any crashes related to the accessibility API after this system was in place. I see that Amethyst passes a callback to handle the event, rather than information about the entity the event acts upon, so I'm not sure what a suitable fix would be here. |
I tried to fix this problem but I didn’t get it ... can you share the fix?
Sergey
26 апр. 2020 г., 14:39 +0300, Åsmund Vikane <notifications@github.com>, писал:
… I don't know exactly how the subscription model in Amethyst works, but this looks like a data race error to me. Anyway, I based my model off of observations from running Steam and interactions with its windows. Primarily the Store, Library and Community tabs, as when you hover them they create a new window which is destroyed when the mouse leaves the window. It was easy to reproduce crashes by rapidly moving the mouse in and out of these menus.
By the looks of the trace above this matches the symtoms I described; might be worth investigating.
I fixed this issue by passing in the address of a pointer on my window structure (which is allocated on the heap), that points to memory on the heap, storing the window id. I then invalidate this value when a UIElementDestroyed notification is received, and other unprocessed events check this value before trying to process the event.
I see that Amethyst passes a callback to handle the event, rather than information about the entity the event acts upon, so I'm not sure what a suitable fix would be here.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
(__bridge SIAXNotificationHandler)refcon
fails withThread 1: EXC_BAD_ACCESS (code=1, address=0x60000b000000)
I've noticed this only very rarely, and it might be due to the "what's new" dialog in MS Outlook.
The text was updated successfully, but these errors were encountered: