Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.8.1
-
None
-
Windows 7 x64, build with msvc2010 for 64bit app.
-
17f263905f00dfd0f01d9f5226ac06b07aa9d421
Description
I got a heap corruption( according to _CrtCheckMemory() ) when using QGLWidget::renderText, with some specific parameters.
In the following code sample:
assert( _CrtCheckMemory() );
renderText( x + (max_height/4.0) * w, y + (fm.descent() + (label.shadedText ? 1.0 : 0.0)) * h, 0.0, temp_string, label.font );
assert( _CrtCheckMemory() );
the second _CrtCheckMemory call returns false indicating a heap corruption.
The label parameter is a valid a object, so as the widget. fm is a QFontMetricsF object and temp_string is a QString.
Concrete parameters which are handed over the rendertext function:
void QGLWidget::renderText( 7.5, 106.0, 0.0, "Th 2.90", ( a font with family="Courier New" styleName="" pointSize=8.0), int)