- Initialize newFilename to QString(), or QgsDebugMsg for newFilename segfaults (line 650) - Set test assert to QgsVectorFileWriter::WriterError enum for success (NoError = 0, i.e. false)
- Loading branch information
There are no files selected for viewing
4 comments
on commit 89eb054
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.
Not sure if these edits are enough to warrant removing @expectedFailure decorator. I looked on CDash and it seems that it may fix similar failures on other platforms.
When running with debug output, if the new optional parameter newFilename is unused and not initialized in QgsVectorFileWriter constructor, won't the QString::append() on line 650 will still segfault when trying to dereference the uninitialized pointer?
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.
Hi Larry
I wrote this test because code in my InaSAFE realtime which used to work fine suddenly brok (I think after a commit from Radim 2 weeks back).
I think it is better that we fix the underlying code, unless we are going to consider this to be an API breakage (which I dont see the need for).
Regards
Tim
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.
Hi Tim,
The follow-up 6b3aed0 commit fixes the underlying code for both versions of the test. (Not sure if it fixes all broken aspects of the code.)
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.
assert myResult == True <-- pep8 friendly