-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
tiling->unsplit from the context menu crashes notion #334
Comments
I didn't catch the stacktrace but I confirm it crashed :( Btw: the menuitem is called Untile |
This is super reproducible and I've been looking into it for a few days (I'm pretty lazy). The "bug" is in ops.c
That for loop gets corrupted by this line:
Which frees the tiling->managed_list object from underneath it and thus corrupts the pointers. Here's a really reproducible version.
Somehow the reparenting has to be done without the rug pull here. It has been there since at least 2014. I didn't follow the full path down though. I could bisect it if we really care. ops.c may not be the fix point, it's just the first common parent between the defect and crash. Here's some more details:
Notice how you'll get something like this:
That's where your memory corruption occurs. I don't know enough about the mechanics here. Maybe a simple copy of the ptr list and then a freeing at the end of the loop would do it? |
Ouch, sorry about that. Before 8d3f262 that splittree_remove was already there, but perhaps triggered under different/fewer conditions. That
Thanks! |
it's calling Here's a really cheap solution
we can probably do better than that |
I'm also open to just using this and then opening up a more minor memory leak bug which I'm sure is sitting around somewhere in this hack and then just move on. |
A cheap fix to prevent the crash described in #334 from happening
I merged #357 - do you want to keep this issue open to keep looking for a clearer solution or rather close it? |
no ... let me handle that |
apparently only you have the privilege of closing. Feel free to do that now that we have documented and opened up the more major and now less visible issue. |
Edit: can anyone reproduce?
The text was updated successfully, but these errors were encountered: