Qt-interest Archive, December 2007
glDrawArrays - Crash - 4.3.3
Message 1 in thread
I'm getting a crash that I can't explain.
"Unhandled exception at 0x5ed06ff1 in foo.exe: 0xC0000005: Access
violation reading location 0x01db1100."
It's when I'm drawing a vertex array. I'm getting an invalid access
to memory that is nowhere near the verts that are getting passed. I
even went as far as creating a local array of floats in the function
that calls glDrawArrays and just sending those as opposed to my real
verts. No dice. Even if I only draw 5 verts. I am 100% certain that
the verts I'm sending lie in valid memory.
This is the last range that's sent to glDrawArrays before the crash.
0x1f3a010 to 0x1f3a910
Like I said, nowhere near 0x01....
If I comment out the glDrawArrays call, all is well. I'm stumped.
Where would you go from here?
This code is fine on mac and linux (gcc 3.x and 4.x respectively) but
bad on windows (both msvc.net and 2005.)
As a side note, I was also getting a crash in QGLWidget::renderText
until I updated to 4.3.3
thanks, (I've been on this for 2 days now.)
-Willy
--
[ signature omitted ]
Message 2 in thread
Hi,
> If I comment out the glDrawArrays call, all is well. I'm stumped.
> Where would you go from here?
I'd use a memory debugger such as Purify.
This looks like a memory error elsewhere in the program.
--
[ signature omitted ]