![]() |
I think I found a bug. Small sample includet (requires Qt)
1 Attachment(s)
Yesterday I played a bit around with the QGLWidget from the Qt Toolkit from Trolltech. This widget allows it to embed an opengl context into a GUI-Application. There is a funktion renderText to render some text into the widget. But this function does not work together with my nVidia-Card. I'm very sure that the problem is in the nvidia-code and not in Trolltech's, because the same programm is working on ATI hardware. Im using Mandrake Linux 9.1 together with the newest nVidia-drivers (that one with installer). I have a Geforce 2 MX 200 with 64 MB SDRAM. I use an Pentium II on a mainboard with Intel chipset.
Here's the source: Code:
#include <qgl.h> |
1 Attachment(s)
And here is what gdb says:
Code:
Program received signal SIGSEGV, Segmentation fault. |
I don't get a segfault with copied-and-pasted code.
I also don't get any text, but I have a feeling this is because you never set up your GL matrices properly (or at all). Have you looked in the README where it talks about segfaults in GL programs? |
Now it should work as exspected, but it still crashes. I also can't find any usefull informations about segfaults in the Readme file included with the driver. But programms shouldn't crash when the programmer forgot to set a correct matrix.
Here is the new code: Code:
#include <qgl.h> |
I was thinking about the wrong problem when I said that last bit. I was thinking that Qt was calling dlopen() on the GL library -- and the README does cover problems with this -- but that's not the case, I don't think.
In any case, it still doesn't crash for me, and I still don't get text. Maybe my version of renderText wasn't defined in properly? Hmm... Well, it does work (show up, that is) if I change the renderText call to renderText(0,0,0, "Kashmere"); instead. But since the problem is a segfault, and not "the text isn't showing up", ... hmm. When you're in gdb, after catching the signal, what does bt print? |
bt says nothing more than
Code:
0x408cf654 in __nvsym17602 () from /usr/lib/libGL.so.1There is one other people who had the crash with my programm one who get this programm fine working on an ATI card |
Well, I'm not sure what to tell you, other than "it works for me"...
Maybe try single-stepping the code under gdb? That would at least tell you which function call is segfaulting (it may not be happening in renderText). Or, you could compile Qt yourself, with debugging symbols, and install it somewhere obscure (like /opt/qt), then explicitly link against the debug version. That'd allow you to trace into renderText... |
H, compiling Qt myself will cost me one day (PII 266 Mhz). Isn't there somebody from the nvidia-team who can help?
|
same here... works fine... had to maximize the window to see it tho.... here's my compile line:
gcc test.cpp -I /usr/lib/qt3/include/ -L /usr/lib/qt3/lib/ -lqt-mt later |
Oooh, that is a difference. I used -lqt on my link line, but I only have one Qt library installed, the qt-mt one (libqt.so is a symlink to libqt-mt.so), so I ended up using the multithreaded Qt library anyway.
So if you are linking against -lqt, and libqt.so is not a symlink to libqt-mt, then that might be the difference. I don't see why, but it might be. Try -lqt-mt and see if that helps, if this is the case. |
I use mandrake linux 9.1. MDK 9.1 comes with qt 3 compiled as multi threaded library. I have no single threaded version of qt here
|
| All times are GMT -5. The time now is 09:44 AM. |
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2013, nV News.