Serious bug in QGLWidget::renderText() (fixed link, no need to register)
-
Hello guys :-),
the question is, is this really a bug?
I struggled a lot with the simulation I wrote to understand the cause of the segmentation fault that happens when scrolling, and eventually I found that text rendering is getting the program to crash when the size of the text changes dynamically with the simulation. Please check the simple program in the next link (12 kb). I took it from the example grabber from QtSDK 1.2 and added the text stuff.
http://www.filedropper.com/grabber
The problem with the program is that it crashes when zooming out to some level. In my simulation (which is over 5000 lines, so I can't put it here), I need to zoom out and in a few times to get a segmentation fault.
The wheel of the mouse is supposed to change the size of all the objects in the simulation. 2 lines are entered in the simulation to change the text size, which are in the function paintGL(), and these are:
[code]
this->renderText(2,2,0,QVariant(scaleRatio).toString(),QFont("Arial",static_cast<int>(scaleRatio*10),QFont::Normal,false));
this->renderText(2,2,0,QVariant(scaleRatio).toString(),QFont("Arial",static_cast<int>(0),QFont::Normal,false));
[/code]The first line is active in the example, and the second line is commented out. The difference is the size of the font. With the second line working with no problems when zooming in and out (just uncomment it and comment the first one, and run the program), we can prove that a zero sized font is not a problem for the Widget/OpenGL.
Why does the program crash when zooming out with the first line? it's an obvious bug... hasn't anyone faced this problem before?
Thank you for any efforts. This thing is really driving me crazy!!!
-
Come on guys! take a look at the program :(
-
OK. This is a serious bug in QGLWidget. If no one cares about it to give any answer about it, then perhaps I shouldn't report it.
Have a nice day, all.
-
Please don't get me wrong, but these forums are still driven by volunteers, who might or might not care about your problem, sooner or later. Around 20 hours is not a sufficient period to judge if one does or does not, especially when considering that it is weekend and most people have better stuff to do than lingering around here at the forums.
Feel free to file a "bug report":http://qt-project.org/doc/qt-4.8/bughowto.html or chance it on the "mailing list":http://lists.qt.nokia.com/mailman/listinfo or at #qt at freenode. If you need guaranteed and promptly support feel free to buy a commercial Qt license from "Digia":http://www.digia.com/en/Qt/.
-
If you think there is a bug, then "please report it":http://bugreports.qt-project.org/. Reporting bugs is the only way to make sure the developers that actually wrote the code see your issue!
Somebody who knows the code might stumble over your issue here, but that requires a bit of luck: The developers are paid to implement stuff, not to hang about a forum all day/weekend long.
-
Sorry, but I'm a bit angry because on stackoverflow no one volunteered to open the file, and so was the case here, so I was going crazy already.
I was hoping to get some discussion and confirmation that this is a bug before reporting it; but OK, I'm submitting it as it's.