telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.43k stars 5.05k forks source link

Failed to run #26849

Closed mr05je closed 10 months ago

mr05je commented 10 months ago

Steps to reproduce

  1. Use build instruction for windows (x64 or x32)
  2. Try to launch application

Expected behaviour

App should start and work correctly

Actual behaviour

App launch for ~1 sec, but after that app crashing by ffmpeg

Additional info:

Operating system

Windows

Version of Telegram Desktop

4.10.1

Installation source

Other (unofficial) source

Crash ID

No response

Logs

[2023.09.24 09:08:55] Launched version: 4010000, install beta: [FALSE], alpha: 0, debug mode: [FALSE]
[2023.09.24 09:08:55] Logs started
[2023.09.24 09:08:55] This is the only instance of Telegram, starting server and app...
[2023.09.24 09:08:55] Global devicePixelRatio: 1
[2023.09.24 09:08:55] QT_DPI_ADJUSTMENT_POLICY: AdjustDpi
[2023.09.24 09:08:55] Primary screen DPI: 96, Base: 96.
[2023.09.24 09:08:55] Computed screen scale: 100
[2023.09.24 09:08:55] DevicePixelRatio: 1
[2023.09.24 09:08:55] ScreenScale: 100
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAOpenSansRegular.ttf' loaded 'DAOpenSansRegular'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAOpenSansRegularItalic.ttf' loaded 'DAOpenSansRegularItalic'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2023.09.24 09:08:55] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.09.24 09:08:55] Using DirectX compiler 'C:\WINDOWS\SYSTEM32\d3dcompiler_47.dll'.
[2023.09.24 09:08:55] App Info: reading settings...
[2023.09.24 09:08:55] App Info: reading encrypted settings...
[2023.09.24 09:08:55] OpenAL Logging Level: (not set)
[2023.09.24 09:08:55] App Info: reading accounts info...
[2023.09.24 09:08:55] App Info: reading encrypted info...
[2023.09.24 09:08:55] App Info: reading map...
[2023.09.24 09:08:55] App Info: reading encrypted map...
[2023.09.24 09:08:55] App Info: reading encrypted user settings...
[2023.09.24 09:08:55] App Info: encrypted user settings read.
[2023.09.24 09:08:55] App Info: reading encrypted mtp data...
[2023.09.24 09:08:55] MTP Info: read keys, current: 1, to destroy: 0
[2023.09.24 09:08:55] Map read time: 0
[2023.09.24 09:08:55] App Info: reading encrypted mtp config...
[2023.09.24 09:08:56] Export Info: Destroy top bar by controller removal.
[2023.09.24 09:08:56] OpenGL: Using custom 'gpu_driver_bug_list.json'.
[2023.09.24 09:08:56] OpenGL Profile: OpenGLES.
[2023.09.24 09:08:56] OpenGL Renderer: ANGLE (NVIDIA, NVIDIA GeForce GTX 1660 Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.15.3699)
[2023.09.24 09:08:56] OpenGL Vendor: Google Inc. (NVIDIA)
[2023.09.24 09:08:56] OpenGL Version: OpenGL ES 3.0.0 (ANGLE 2.1.10 git hash: e3f59e8d0c3e)
[2023.09.24 09:08:56] OpenGL Extensions: GL_ANGLE_pack_reverse_row_order, GL_OES_texture_float_linear, GL_ANGLE_instanced_arrays, GL_OES_packed_depth_stencil, GL_EXT_multisampled_render_to_texture, GL_CHROMIUM_bind_uniform_location, GL_ANGLE_translated_shader_source, GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture, GL_EXT_texture_compression_rgtc, GL_OES_shader_multisample_interpolation, GL_OES_draw_elements_base_vertex, GL_CHROMIUM_bind_generates_resource, GL_OES_texture_float, GL_ANGLE_base_vertex_base_instance, GL_OES_EGL_image, GL_CHROMIUM_lose_context, GL_EXT_texture_norm16, GL_EXT_draw_elements_base_vertex, GL_EXT_texture_mirror_clamp_to_edge, GL_EXT_EGL_image_external_wrap_modes, GL_EXT_float_blend, GL_OES_compressed_EAC_R11_unsigned_texture, GL_EXT_render_snorm, GL_ANGLE_texture_compression_dxt5, GL_ANGLE_shader_pixel_local_storage_coherent, GL_ANGLE_framebuffer_blit, GL_CHROMIUM_sync_query, GL_EXT_conservative_depth, GL_EXT_occlusion_query_boolean, GL_APPLE_clip_distance, GL_NV_EGL_stream_consumer_external, GL_OES_mapbuffer, GL_OES_compressed_ETC2_sRGB8_texture, GL_ANGLE_base_vertex_base_instance_shader_builtin, GL_EXT_map_buffer_range, GL_EXT_shader_texture_lod, GL_EXT_draw_buffers_indexed, GL_ANGLE_get_serialized_context_string, GL_ANGLE_multiview_multisample, GL_ANGLE_shader_pixel_local_storage, GL_ANGLE_texture_multisample, GL_KHR_debug, GL_CHROMIUM_copy_compressed_texture, GL_NV_framebuffer_blit, GL_ANGLE_lossy_etc_decode, GL_EXT_texture_filter_anisotropic, GL_EXT_texture_storage, GL_ANGLE_get_tex_level_parameter, GL_OES_vertex_array_object, GL_EXT_texture_compression_bptc, GL_OVR_multiview, GL_AMD_performance_monitor, GL_OES_element_index_uint, GL_OES_texture_half_float_linear, GL_EXT_texture_compression_s3tc_srgb, GL_NV_shader_noperspective_interpolation, GL_ANGLE_copy_texture_3d, GL_EXT_draw_buffers, GL_EXT_read_format_bgra, GL_OES_draw_buffers_indexed, GL_OES_EGL_image_external, GL_OES_rgb8_rgba8, , GL_OES_fbo_render_mipmap, GL_ANGLE_clip_cull_distance, GL_CHROMIUM_copy_texture, GL_ANGLE_client_arrays, GL_ANGLE_program_cache_control, GL_EXT_color_buffer_half_float, GL_KHR_parallel_shader_compile, GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture, GL_EXT_texture_border_clamp, GL_OES_texture_npot, GL_OES_texture_stencil8, GL_EXT_color_buffer_float, GL_EXT_unpack_subimage, GL_EXT_instanced_arrays, GL_EXT_robustness, GL_EXT_texture_compression_dxt1, GL_OES_compressed_EAC_RG11_signed_texture, GL_EXT_depth_clamp, GL_EXT_texture_type_2_10_10_10_REV, GL_EXT_texture_format_BGRA8888, GL_EXT_clip_control, GL_EXT_debug_label, GL_OES_compressed_EAC_RG11_unsigned_texture, GL_WEBGL_video_texture, GL_OVR_multiview2, GL_OES_EGL_image_external_essl3, GL_EXT_blend_func_extended, GL_OES_compressed_EAC_R11_signed_texture, GL_OES_depth24, GL_OES_get_program_binary, GL_ANGLE_memory_size, GL_ANGLE_polygon_mode, GL_EXT_disjoint_timer_query, GL_ANGLE_robust_client_memory, GL_EXT_clip_cull_distance, GL_OES_sample_variables, GL_EXT_frag_depth, GL_EXT_multi_draw_indirect, GL_ANGLE_multi_draw, GL_EXT_texture_rg, GL_NV_pixel_buffer_object, GL_ANGLE_framebuffer_multisample, GL_OES_texture_border_clamp, GL_EXT_sRGB, GL_ANGLE_texture_compression_dxt3, GL_EXT_polygon_offset_clamp, GL_ANGLE_texture_usage, GL_OES_compressed_ETC2_RGBA8_texture, GL_OES_compressed_ETC2_sRGB8_alpha8_texture, GL_OES_compressed_ETC2_RGB8_texture, GL_EXT_blend_minmax, GL_ANGLE_renderability_validation, GL_NV_fence, GL_OES_texture_half_float, GL_EXT_discard_framebuffer, GL_OES_depth32, GL_OES_surfaceless_context, GL_ANGLE_provoking_vertex, GL_EXT_base_instance, GL_EXT_debug_marker, GL_OES_standard_derivatives, GL_ANGLE_stencil_texturing, GL_ANGLE_depth_texture, GL_ANGLE_request_extension, GL_NV_pack_subimage
[2023.09.24 09:08:56] EGL Extensions: EGL_EXT_create_context_robustness, EGL_ANGLE_d3d_share_handle_client_buffer, EGL_ANGLE_d3d_texture_client_buffer, EGL_ANGLE_surface_d3d_texture_2d_share_handle, EGL_ANGLE_query_surface_pointer, EGL_ANGLE_window_fixed_size, EGL_ANGLE_keyed_mutex, EGL_ANGLE_surface_orientation, EGL_ANGLE_direct_composition, EGL_ANGLE_windows_ui_composition, EGL_NV_post_sub_buffer, EGL_KHR_create_context, EGL_KHR_image, EGL_KHR_image_base, EGL_KHR_gl_texture_2D_image, EGL_KHR_gl_texture_cubemap_image, EGL_KHR_gl_renderbuffer_image, EGL_KHR_get_all_proc_addresses, EGL_KHR_stream, EGL_KHR_stream_consumer_gltexture, EGL_NV_stream_consumer_gltexture_yuv, EGL_ANGLE_stream_producer_d3d_texture, EGL_ANGLE_create_context_webgl_compatibility, EGL_CHROMIUM_create_context_bind_generates_resource, EGL_CHROMIUM_sync_control, EGL_EXT_pixel_format_float, EGL_KHR_surfaceless_context, EGL_ANGLE_display_texture_share_group, EGL_ANGLE_display_semaphore_share_group, EGL_ANGLE_create_context_client_arrays, EGL_ANGLE_program_cache_control, EGL_ANGLE_robust_resource_initialization, EGL_ANGLE_create_context_extensions_enabled, EGL_ANDROID_blob_cache, EGL_ANDROID_recordable, EGL_ANGLE_image_d3d11_texture, EGL_ANGLE_create_context_backwards_compatible, EGL_KHR_no_config_context, EGL_KHR_create_context_no_error, EGL_KHR_reusable_sync, 
[2023.09.24 09:08:56] OpenGL: QOpenGLContext created, version: 3.3.
[2023.09.24 09:08:56] OpenGL: [TRUE] (Window)
[2023.09.24 09:08:57] Streaming Error: Error in avcodec_find_decoder (code: 167, text: Error number 167 occurred).
c0re100 commented 10 months ago

image I discovered that vpx library name is changed to vpxmt.lib, not vpx.lib🤔 That's why ffmpeg can't find vpx decoder.

https://github.com/desktop-app/patches/blob/master/libvpx/0003-generate-vpx-pc-with-msvs.patch#L38

mr05je commented 10 months ago

Should i wait or i can change it myself?

c0re100 commented 10 months ago

Should i wait or i can change it myself?

If you want to run successfully... First, change that patch L38 -lvpx > -lvpxmt and recompile libvpx and ffmpeg. After that, compile TDesktop. Everything should be fine.

mr05je commented 10 months ago

After changing patch, app builds, runs for 5 secs now and crashing with same error. FFmpeg builds with same warnings

LINK : warning LNK4044: unrecognized option '/IY/Telegram/TelegramDesktop/Libraries/win64/patches/../local/include'; ignored

But main error LINK : fatal error LNK1181: cannot open input file 'vpx.lib' disappeared

c0re100 commented 10 months ago

After changing patch, app builds, runs for 5 secs now and crashing with same error. FFmpeg builds with same warnings

LINK : warning LNK4044: unrecognized option '/IY/Telegram/TelegramDesktop/Libraries/win64/patches/../local/include'; ignored

But main error LINK : fatal error LNK1181: cannot open input file 'vpx.lib' disappeared

Is it still crash for FindDecoder? Anyway, you can ignore this warning, this did not affect something.

mr05je commented 10 months ago

image https://github.com/telegramdesktop/tdesktop/blob/4fd68d97d5d2dd8ee6474bd8985344d24ad20e3a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp#L333 Yes

P.S.: rebuilt from scratch

c0re100 commented 10 months ago

image

https://github.com/telegramdesktop/tdesktop/blob/4fd68d97d5d2dd8ee6474bd8985344d24ad20e3a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp#L333

Yes P.S.: rebuilt from scratch

so strange... I'm fine after change to -lvpxmt. image

mr05je commented 10 months ago

strange, but after the rebuild everything works fine now, ty

ilya-fedin commented 10 months ago

I see it handles when codec returns nullptr, shouldn't it run just fine just be unable to play vp9 media?

mr05je commented 10 months ago

because of animated emojis

c0re100 commented 10 months ago

I see it handles when codec returns nullptr, shouldn't it run just fine just be unable to play vp9 media?

nullptr would lead to crash after this step. Cause it would declare a null codec and custom emoji/video sticker render can't use it. https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/ffmpeg/ffmpeg_frame_generator.cpp#L106 https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/ffmpeg/ffmpeg_frame_generator.cpp#L313

ilya-fedin commented 10 months ago

Indeed...

john-preston commented 10 months ago

Thanks for the report!