Bug 467860

Summary: vdrift crashes when used on certain cards (mesa instead of nvidea)
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: vdriftAssignee: Gwyn Ciesla <gwync>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: adrin.jalali, gwync
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 20090215-1.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-09 22:46:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hans de Goede 2008-10-21 12:01:54 UTC
As you may have seen I've fixed the new merged vdrift package in rawhide to actually include the data. This only fixes half of the problems with vdrift in rawhide though.

The other issue is that it crashes when run on opensource (Mesa) opengl drivers:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000004a7379 in SHADER::Load (this=0xb31db8, name=@0x7fffffffd8f0)
    at src/shader.cpp:25
#2  0x00000000004a86cb in SHADER_MANAGER::Load (this=<value optimized out>, 
    name=@0x7fffffffd8f0) at src/shader.cpp:293
#3  0x000000000041208a in GRAPHICS::Init (this=0x7b9788) at src/graphics.cpp:68
#4  0x000000000041b6e0 in GAME::Start (this=0x7b6f40, args=@0x7fffffffe080)
    at src/game.cpp:1502
#5  0x000000000040b965 in main (argc=1, argv=<value optimized out>)
    at src/main.cpp:26

If you look in src/shader.cpp line 25 you see:
        program = glCreateProgramObjectARB();

The problem is that glCreateProgramObjectARB is a function pointer which is part of GLEW, and which only gets set if the OpenGL implementation supports glCreateProgramObjectARB(). vdrift is not checking for this and thus crashing on cards / OpenGL implementations which lack this. Note that the F-9 version does not suffer from this.

I've also tested the new (with data included) F-10 version with nvidea drivers and there it works fine.

Comment 1 Gwyn Ciesla 2008-10-21 15:00:01 UTC
So can this simply be wrapped to check and abort with an error, or is there a more widely-supported function we could use?

Comment 2 Hans de Goede 2008-10-21 15:31:48 UTC
(In reply to comment #1)
> So can this simply be wrapped to check and abort with an error, or is there a
> more widely-supported function we could use?

I'm not an OpenGL expert, but catching this and then exiting wiht an error is not acceptable, this will make vdrift break on many systems (where the F-9 version does work). I think this is best discussed upstream.

Comment 3 Gwyn Ciesla 2008-10-21 16:32:38 UTC
Posted in upstream Bugs forum, will file bug if no reply.

http://vdrift.net/Forum/viewtopic.php?t=1029&start=0&postdays=0&postorder=asc&highlight=

Comment 4 Bug Zapper 2008-11-26 04:05:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Gwyn Ciesla 2009-01-02 13:24:07 UTC
*** Bug 478591 has been marked as a duplicate of this bug. ***

Comment 6 Gwyn Ciesla 2009-01-02 13:25:33 UTC
FYI, upstream indicates that this is fixed in development, but not word on a release.  I'll try to get a patch together.

Comment 7 Gwyn Ciesla 2009-03-05 19:39:43 UTC
I have a new version in rawhide.  If it works, I'll push it for 10.

Comment 8 Hans de Goede 2009-03-08 09:18:17 UTC
(In reply to comment #7)
> I have a new version in rawhide.  If it works, I'll push it for 10.  

I can confirm this new version fixes vdrift on ATI cards, good job!

Comment 9 Fedora Update System 2009-03-09 14:24:41 UTC
vdrift-20090215-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/vdrift-20090215-1.fc10

Comment 10 Fedora Update System 2009-03-09 22:46:19 UTC
vdrift-20090215-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.