Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault crashes #225

Merged
merged 11 commits into from Dec 27, 2019
Merged

Fix segfault crashes #225

merged 11 commits into from Dec 27, 2019

Conversation

@Alecaddd
Copy link
Member

Alecaddd commented Dec 26, 2019

I started working on some needed improvements to fix those random segfault.
I found out that some methods were getting called 2 or 3 times per click from multiple sources, and some areas were duplicated, probably due to some leftover code.

I improved the code a bit, being sure methods are called only once, preventing most of those infinite loops causing a segfault.

Still, some crashes are occurring, but they're not always related to the Fill Model, as I've experienced crashes also when commenting that entire area, by simply quickly selecting the same shape, or quickly clicking between multiple shapes.

I will still work on this, but if you guys can load this PR and see if you can figure why the last segfault are happening, it'd be great.

Akira can't crash 馃槃

@Alecaddd Alecaddd requested review from albfan and bilelmoussaoui Dec 26, 2019
@albfan albfan force-pushed the fix-fill-segfault branch from 5efdcb0 to 206da52 Dec 26, 2019
@Alecaddd

This comment has been minimized.

Copy link
Member Author

Alecaddd commented Dec 26, 2019

I think I fixed all the other crashes happening except for those related to the fill model.
Random segfaults were happening when setting the cursor on startup, and when quickly clicking on the empty canvas.

Onto figuring out why the fill model causes a crash when clearing the list of items.

@Alecaddd Alecaddd marked this pull request as ready for review Dec 26, 2019
@Alecaddd

This comment has been minimized.

Copy link
Member Author

Alecaddd commented Dec 26, 2019

Done! This is fixed....I think.
Ready for a full review!

@albfan
albfan approved these changes Dec 27, 2019
Copy link
Member

albfan left a comment

For me, the segfaults are gone right now (at least for the use case I was aware of)

Just not sure why debug code is commented, as it only is show if GTK_DEBUG=akiraDevel is exported.

@Alecaddd

This comment has been minimized.

Copy link
Member Author

Alecaddd commented Dec 27, 2019

Thanks for the review.
I commented the debug because I needed to print messages only for the sections I was debugger, and all the other stuff were making a lot of noise.
I prefer to keep it commented so we can enable only the messages we need instead of having a terminal filled with everything.
What do you think?

@albfan

This comment has been minimized.

Copy link
Member

albfan commented Dec 27, 2019

As they are debug, they should only be printed if G_MESSAGES_DEBUG=all is set. Let me check what's happening.

Right now we can merge this way.

@Alecaddd Alecaddd merged commit 7a3ca59 into master Dec 27, 2019
4 checks passed
4 checks passed
build
Details
build
Details
lint
Details
lint
Details
@Alecaddd Alecaddd deleted the fix-fill-segfault branch Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.