DirectX Screen Errors?

Windows specific questions.
Post Reply
livewire
Posts: 78
Joined: Dec 07, 2006 3:43
Location: Orlando, FL

DirectX Screen Errors?

Post by livewire »

Hello,
I am running the following and I get a "Program received signal SIGSEGV, Segmentation fault" error on the ScreenRes function call. I have searched this forum and saw similar topics. My code works if I put this at the top "SetEnviron("fbgfx=gdi"). I haven't tried updating the directX since it works in dxdiag (the tests) and that wouldn't allow me to know what's wrong. The old threads/topics mention that the problem should have been fixed prior to the version of FreeBASIC that I am running (see my version below).

Code: Select all

ScreenRes 1024,768,32

Print "Hello World"
Sleep
This is the backtrace:
#0 0x00407ab3 in directx_exit ()
#1 0x00402eb5 in fb_hWin32Exit ()
#2 0x00401d4a in set_mode ()
#3 0x00402169 in fb_GfxScreenRes@24 ()
#4 0x00401352 in main (__FB_ARGC__=1, __FB_ARGV__=0x8724e8) at test.bas:4

I'm running Windows XP Pro SP3.
dxdiag shows this as the DirectX Version: DirectX 9.0c (4.09.0000.0904)

FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for win32 (target:win32)
Copyright (C) 2004-2008 The FreeBASIC development team.
Configured as standalone

Any ideas?[/code]
livewire
Posts: 78
Joined: Dec 07, 2006 3:43
Location: Orlando, FL

Post by livewire »

I just ran the same code with this FreeBASIC version and it worked.

FBC 0.21.0 from 07-27-09
livewire
Posts: 78
Joined: Dec 07, 2006 3:43
Location: Orlando, FL

Post by livewire »

I found the actual problem.

Hardware Acceleration was disabled in "Display Properties"->Settings->Advanced->Troubleshoot
Sisophon2001
Posts: 1706
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Post by Sisophon2001 »

The way the gfx code is structured, a failure to select a valid driver is a bug (and the GDI driver was valid). It sounds like you have found a reproducible way of forcing this bug? If so then I am sure it can be fixed. I will bookmark this thread, but I don't expect to have time to look for the problem soon.

Garvan
Post Reply