SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Bugs that have been resolved.

Moderator: Graf Zahl

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by dpJudas »

ibm5155 wrote:this is the initial run from gzdoom in fullscreen mode, first, it takes almost 20 seconds under the same function, and when it finish loading the FShader, the cpu drop goes to zero, but I can only see a thing on screen when the last small rise from the cpu shows, then I can actually use the game and see the stuff...
Here's the cpu/ram usage
...
I belive the code somehow is working just fine, but it takes so many time to see something, but since you hear the sounds and can toy with the menu, you feel that the game crashed...
Is there by any chance a newer version of your GPU driver? Sounds like some driver issue where the shader compiler spends an unreasonable long time optimizing.
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by ibm5155 »

gl.glslversion (running with the intel gpu) had the value equals 4.01000023

EDIT: why did it only posted that part?...

ok, here're some pictures with your commit
Test running just doom2.wad in fullscreen
Image
The blue line means when the gzdoom gui finish to load the game, and the red line means when you actually see something on screen...
But as a note, this is running in debug mode so maybe some extra time is being wasted here.

Now, in release mode running without visual studio tools.
Intel HD4000:
doom2.wad fullscreen:Crash the driver, and even after 30 seconds the only thing u can see is the mouse cursor
doom2.wad windowed:start without any delay, and you can see everything, changing the resolution takes 1 extra second compared to the amd gpu, but it hardly ever gets stucked in the black screen...
spooky.wad fullscreen:Crash the driver, and even after 30 seconds the only thing u can see is the mouse cursor
spooky.wad windowed:start without any delay, and you can see everything, changing the resolution takes 1 extra second compared to the amd gpu, but it hardly ever gets stucked in the black screen...

NOTE: you can hear the gui menu and the title music right after the screen goes black.

amd hd 8870m:
doom2.wad fullscreen: shows the screen in some seconds, but if you change the screen resolution, the screen will be black and will never return back...
doom2.wad windowed:works fine, but hardly ever when changing the screen resolution, you'll only be able to see the mouse cursor and nothing more.
spooky.wad fullscreen: no more black screen on camera, and the same result when changing the resolution...
spooky.wad windowed:works fine, but hardly ever when changing the screen resolution, you'll only be able to see the mouse cursor and nothing more.

NOTE2: when the screen goes black when changing the resolution in windowed mode, if you try to change the resolution to another one, the screen will return and you'll be able to see the game again...
Last edited by ibm5155 on Sun Jul 31, 2016 16:31, edited 1 time in total.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by dpJudas »

Hehe, well then remarking that if statement had no effect as it was already true:

Code: Select all

bool FGLRenderBuffers::IsEnabled()
{
	return gl_renderbuffers && gl.glslversion != 0;
}
Nice to know the version is this high though. Rules out the compatibility mode code.
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by ibm5155 »

Just an extra note, on the amd gpu when I'm in fullscreen mode, when the screen goes back, if I try to change the resolution again, it fixes the background and I'm able to see the game again
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by dpJudas »

What happens if you turn the whole thing off by typing gl_renderbuffers 0 in the console? Does that fix it?
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by ibm5155 »

nop.
I tried to update the gpu driver from intel, on the first try I runned gzdoom, it actually worked in fullscreen, but on the next try, it did the "good" and old vídeo driver crash :(

EDIT:
Actually, the intel drivers doesn't crash if I alt tab the game when it goes to fullscreen mode, I wait some time, do an alt tab and tadah, doom 2 logo is there and the driver doesn't crash...
Now on intel case, why does the screen does "melt" effect effect on under the doom 2 logo, it doesn't that with the amd gpu???

Also, I noticed with task manager, that the gpu driver crash after the FShader::Load process, my guess is that it crashes when it tries to show the first frame on screen

EDIT2: I belive it doesn't crash when I alt tab because it shows a pause image before the doom 2 logo (just a guess)

EDIT3: If that helps, it crashes in the glFinish(); call inside of void OpenGLFrameBuffer::Swap()
replacing glFinish by glFlush didn't fixed it either :(

Also once I did a step by step debug, and I managed to get the title screen...
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by dpJudas »

I just tried with the Intel HD 4600 graphics on my i7 and it runs gzdoom fine without any problems - even with multisampling, bloom and tonemap enabled.

I'm not really sure what to conclude from all this. I can try create a branch where I insert a bunch of glError checks and such and see if there's any remote hint from your GPU drivers that things aren't as they are meant to be. At this point I'm about 90% sure this is a driver issue - the question left is whether we can workaround it or not.

Btw are the Intel and AMD GPUs in the same computer? A laptop by any chance?
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by ibm5155 »

Yes, it's a notebook and they are in the same notebook.
Did you test it in windowed mode or in fullscreen mode?

EDIT: idk if that counts but I'm using 2 monitors

UPDATE:
I discovered that on intel hd 4000, it only crash the driver if running gzdoom in fullscreen mode only at monitor 1, running gzdoom under monitor 2 didn't crashed
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by dpJudas »

I tried both windowed and full screen. Only used one monitor though.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by dpJudas »

Could you try see what happens if you use the OpenGL initialization code on this branch: https://github.com/dpjudas/zdoom/tree/o ... ion_helper

It changes where the "dummy" HWND window is located for wglCreateContextAttribs. Just in case your crash is somehow related to the Intel driver being called on an AMD window or visa versa.
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by ibm5155 »

I did a clean build, and still it's crashing :(
BUT, when the driver crashed, I tried to change from fullscreen to Windowed mode, and then a fatal error window from gzdoom was showed, and this is what it showed

Code: Select all

Ok I lost the code :|
but it was something related to opengl not being able to create a window context
Before EDIT: actually once I tried to alt enter in fullscreen mode (even if the driver crashed), the screen went back and it showed the doom 2 background + menus and it was working in windowed mode :O ,and even if i press alt + enter, it goes to fullscreen mode and it shows everything :OOO
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by dpJudas »

Hmm, that is very interesting. The fatal message you saw was probably one of those:
  • Unable to create OpenGL creation query window
  • Unable to retrieve OpenGL creation query device context
  • Unable to create OpenGL context for creation query window
(maybe not the best error messages to tell apart ;))

Are you seeing the crash on first launch? Or only when switching between windowed and fullscreen?
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by ibm5155 »

I don't see the error on first launch, on first launch, (in fullscreen mode), I see a black screen + the doom guy habbit mouse cursor, after some seconds I heard the gpu crash and then I press alt+enter, and that was the moment where the game crashed...
But somehow it's not crashing anymore, instead, it just show the doom 2 background image and menus, if I press alt+enter, it goes back to fullscreen mode and somehow, it's not glitched anymore and you can actually use it...

Intel and their weird bugs

EDIT: instead of crashing, it does that with the background and menu
Image
if I start a new game, the menu gets fixed

EDIT2:
Actually, I can start the game in fullscreen without crashing, I just need to open the menu really fast,the game doesn't crash but it shows this.
Image
Also if I start to play and return to the title, it Works just right
Image

EDIT3: finally, a log from intel gpu when I alt tab when the driver crashed

Code: Select all

OS: Windows NT (NT 10.0) Build 10586
    
M_LoadDefaults: Load system defaults.
Using program directory for storage
W_Init: Init WADfiles.
 adding D:/Programacao/Online Projects/ZdoomGL/bin/Release/gzdoom.pk3, 620 lumps
 adding D:/Programacao/Online Projects/ZdoomGL/bin/Release/doom2.wad, 2956 lumps
I_Init: Setting up machine state.
CPU speed: 2395 MHz
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz
  Family 6, Model 58, Stepping 9
  Features: MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
Sound init failed. Using nosound.
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
DECORATE parsing took 41.58 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading default status bar definition.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
I_InitInput
I_StartupMouse
I_StartupKeyboard
I_StartupXInput
I_StartupRawPS2
I_StartupDirectInputJoystick
R_OPENGL: No valid pixel formats found. Retrying in compatibility mode
GL_VENDOR: Intel
GL_RENDERER: Intel(R) HD Graphics 4000
GL_VERSION: 4.0.0 - Build 10.18.10.4425 (Compatibility profile)
GL_SHADING_LANGUAGE_VERSION: 4.00 - Build 10.18.10.4425
GL_EXTENSIONS: GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_texture_edge_clamp GL_EXT_separate_specular_color GL_ARB_multitexture GL_ARB_map_buffer_alignment GL_ARB_conservative_depth GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_texture_env_add GL_IBM_texture_mirrored_repeat GL_EXT_multi_draw_arrays GL_SUN_multi_draw_arrays GL_NV_blend_square GL_ARB_texture_compression GL_3DFX_texture_compression_FXT1 GL_EXT_texture_filter_anisotropic GL_ARB_texture_border_clamp GL_ARB_point_parameters GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_EXT_texture_compression_s3tc GL_ARB_shadow GL_ARB_window_pos GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_ARB_vertex_program GL_EXT_texture_rectangle GL_ARB_fragment_program GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_ARB_vertex_buffer_object GL_EXT_texture_lod_bias GL_ARB_occlusion_query GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_non_power_of_two GL_ARB_vertex_shader GL_NV_texgen_reflection GL_ARB_point_sprite GL_ARB_fragment_program_shadow GL_EXT_blend_equation_separate GL_ARB_depth_texture GL_ARB_texture_rectangle GL_ARB_draw_buffers GL_ARB_color_buffer_float GL_ARB_half_float_pixel GL_ARB_texture_float GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_occlusion_query2 GL_EXT_draw_buffers2 GL_WIN_swap_hint GL_EXT_texture_sRGB GL_ARB_multisample GL_EXT_packed_float GL_EXT_texture_shared_exponent GL_ARB_texture_rg GL_ARB_texture_compression_rgtc GL_NV_conditional_render GL_ARB_texture_swizzle GL_EXT_texture_swizzle GL_ARB_texture_gather GL_ARB_sync GL_ARB_framebuffer_sRGB GL_EXT_packed_depth_stencil GL_ARB_depth_buffer_float GL_EXT_transform_feedback GL_ARB_transform_feedback2 GL_ARB_draw_indirect GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_ARB_framebuffer_object GL_ARB_framebuffer_no_attachments GL_EXT_texture_array GL_EXT_texture_integer GL_ARB_map_buffer_range GL_ARB_texture_buffer_range GL_EXT_texture_buffer GL_EXT_texture_snorm GL_ARB_blend_func_extended GL_INTEL_performance_queries GL_INTEL_performance_query GL_ARB_copy_buffer GL_ARB_sampler_objects GL_NV_primitive_restart GL_ARB_seamless_cube_map GL_ARB_uniform_buffer_object GL_ARB_depth_clamp GL_ARB_vertex_array_bgra GL_ARB_shader_bit_encoding GL_ARB_draw_buffers_blend GL_ARB_geometry_shader4 GL_EXT_geometry_shader4 GL_ARB_texture_query_lod GL_ARB_explicit_attrib_location GL_ARB_draw_elements_base_vertex GL_ARB_instanced_arrays GL_ARB_base_instance GL_ARB_fragment_coord_conventions GL_EXT_gpu_program_parameters GL_ARB_texture_buffer_object_rgb32 GL_ARB_compatibility GL_ARB_texture_rgb10_a2ui GL_ARB_texture_multisample GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_timer_query GL_ARB_tessellation_shader GL_ARB_vertex_array_object GL_ARB_provoking_vertex GL_ARB_sample_shading GL_ARB_texture_cube_map_array GL_EXT_gpu_shader4 GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_shader_subroutine GL_ARB_transform_feedback3 GL_ARB_get_program_binary GL_ARB_separate_shader_objects GL_ARB_shader_precision GL_ARB_vertex_attrib_64bit GL_ARB_viewport_array GL_ARB_transform_feedback_instanced GL_ARB_compressed_texture_pixel_storage GL_ARB_shader_atomic_counters GL_ARB_shading_language_packing GL_ARB_shading_language_420pack GL_ARB_texture_storage GL_EXT_texture_storage GL_ARB_vertex_attrib_binding GL_ARB_multi_draw_indirect GL_ARB_program_interface_query GL_ARB_texture_storage_multisample GL_ARB_buffer_storage GL_ARB_debug_output GL_KHR_debug GL_ARB_arrays_of_arrays GL_INTEL_map_texture GL_ARB_texture_compression_bptc GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_robustness GL_EXT_texture_sRGB_decode GL_KHR_blend_equation_advanced GL_EXT_shader_integer_mix GL_ARB_stencil_texturing WGL_EXT_depth_float WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_EXT_extensions_string WGL_EXT_swap_control WGL_EXT_swap_control_tear WGL_ARB_multisample WGL_ARB_pixel_format_float WGL_ARB_framebuffer_sRGB WGL_ARB_create_context WGL_ARB_create_context_profile WGL_EXT_pixel_format_packed_float WGL_EXT_create_context_es_profile WGL_EXT_create_context_es2_profile WGL_NV_DX_interop WGL_ARB_create_context_robustness
Max. texture size: 16384
Max. texture units: 16
Max. varying: 64
Max. uniform block size: 65536
Uniform block alignment: 16
Resolution: 640 x 480
Starting MIDI playback failed
"fullscreen" is "false"

Execution could not continue.

Unable to create OpenGL context for creation query window
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by ibm5155 »

Bad news:
This time, with the AMD gpu, the same sound was heared when safely disconnect the usb, the screen flickered, and then the only thing I could do is move and watch the mouse and see the red background (Actually, the same red tone that I see on surface pro with uefi disabled)...

I saw on event viewer and on the specified period there's a spam of "ATI EEU Service event error" logs, but the only thing it says is that the id is 16387.
and also I saw this information that started all
"Falha ao iniciar driver de vídeo; usando Driver de Vídeo Básico da Microsoft em vez disso. Verifique no Windows Update se há um driver de vídeo mais recente."
"Failed to start the vídeo driver; using the basic Windows driver insteaad. verify under Windows update if there're any driver update"

and the next one is another spam of this:
"O serviço Host de Sincronização_5a085cf foi finalizado inesperadamente. Isto aconteceu 2 vez(es). A seguinte ação corretiva será tomada em 10000 milissegundos: Reiniciar o serviço."
"The _5a085cf Synchronization Host service terminated unexpectedly. This happened 2 time (s). The following corrective action will be taken in 10000 milliseconds: Restart the service."

I belive I'm going to start to play gzdoom only under windowed mode :blergh:

I belive all that error should be under another error, since the main error from this thread was fixed
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: SetCamera broken wih commit aeb7df09de843542c3da7c889e5cc18540e59f87

Post by Rachael »

Yeah your drivers are a bit screwy if you're getting those messages. There's no reason they should be doing that. In fact, it should not even be possible for GZDoom to crash your driver, because the driver runs completely separate from the user mode "prison" that GZDoom runs from within.

Do your Windows Update first, then download a new driver from ATI (fresh copy, even if you already have it) and reinstall it.
Locked

Return to “Closed Bugs”