-
-
Notifications
You must be signed in to change notification settings - Fork 988
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
Might fix 1981 ("Midi Import crash in master branch") #1984
Conversation
This commit adds checks for conditions that are asserted during calls to get_atom_value. It might fix a crash that is described in 1981. Unfortunately no files have been attached to that issue. However, I was able to crash LMMS using a local file and this crash is gone with this fix. So hopefully this change also fixes the crashes described in 1981.
{ | ||
QString attr = evt->get_attribute(); | ||
if( attr == "tracknames" ) { | ||
if( attr == "tracknames" && evt->get_update_type() == 'a' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, better to be safe than sorry. I wonder where a trackname event will hold the track name if it doesn't have an atom to read, though.
Print as much debug info as possible for unhandled data.
Hi all, I have made the changes as proposed by @curlymorphic. The changed code prints as much debug information as possible. During my tests I have also noticed that strings written with |
There appears to be no real consistency in lmms on this. in some places |
If possible, I think it's better to use the qDebug() family of functions
|
Can't we safely call flush as often as we like? -Tres |
I think in the long run a better solution would be one where the programmer does not have to remember that he might need to flush. I propose to merge this fix and to create a new issue that's about cleaning up the debugging output for the whole code base and to replace it with something coherent, e.g. |
I completely agree. Merging. |
Might fix 1981 ("Midi Import crash in master branch")
This is a pull request for #1981.
The commit adds checks for conditions that are asserted during calls to
get_atom_value.
It might fix a crash that is described in 1981. Unfortunately no files
have been attached to that issue. However, I was able to crash LMMS
using a local file and this crash is gone with this fix. So hopefully this
change also fixes the crashes described in 1981.