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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when deleting characters out of searches #216

Merged
merged 2 commits into from
Apr 7, 2017
Merged

Fix crash when deleting characters out of searches #216

merged 2 commits into from
Apr 7, 2017

Conversation

DDieter
Copy link
Contributor

@DDieter DDieter commented Apr 7, 2017

Fixes the bug that occurs when deleting characters out of searches.

It seems to be an issue with appstream where calling component.get_custom_value (...) a second time, causes it to return something that was already freed from memory (probably a bug in appstream?). When the component gets deconstructed, it calls free on this object again and crashes.

By moving the payments_key into the Package class, it will only call that method once and prevent this crash.

Fixes #202.

Copy link
Contributor

@donadigo donadigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it looks like the vapi for AppStream's get_custom_value is wrong, the returned string should be unowned since it is retrieved from the HashTable. The diff looks good. Though I haven't tested if it fixes the issue yet.

@danirabbit
Copy link
Member

I can confirm that this branch addresses the issue :)

@danirabbit danirabbit merged commit b0d0766 into elementary:master Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants