{"action":"opened","issue":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/2186","labels_url":"https://api.github.com/repos/mpv-player/mpv/issues/2186/labels{/name}","comments_url":"https://api.github.com/repos/mpv-player/mpv/issues/2186/comments","events_url":"https://api.github.com/repos/mpv-player/mpv/issues/2186/events","html_url":"https://github.com/mpv-player/mpv/issues/2186","id":98619887,"number":2186,"title":"Logging code crashes","user":{"login":"Jehan","id":794997,"avatar_url":"https://avatars.githubusercontent.com/u/794997?v=3","gravatar_id":"","url":"https://api.github.com/users/Jehan","html_url":"https://github.com/Jehan","followers_url":"https://api.github.com/users/Jehan/followers","following_url":"https://api.github.com/users/Jehan/following{/other_user}","gists_url":"https://api.github.com/users/Jehan/gists{/gist_id}","starred_url":"https://api.github.com/users/Jehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jehan/subscriptions","organizations_url":"https://api.github.com/users/Jehan/orgs","repos_url":"https://api.github.com/users/Jehan/repos","events_url":"https://api.github.com/users/Jehan/events{/privacy}","received_events_url":"https://api.github.com/users/Jehan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-02T16:18:15Z","updated_at":"2015-08-02T16:18:15Z","closed_at":null,"body":"I was testing mpv from git for bug #908 and it would crash each time a call to mp_dbg() is made, in particular when calling atomic_load_explicit(&root->reload_counter, memory_order_relaxed) in common/msg.c\r\n\r\nI don't think this is related to the commit for #908 since it happens even with enca (as in the example below), whether or not detection fails or succeeds. Hence I open a new bug report.\r\n\r\nAnyway here a backtrace:\r\nProgram received signal SIGSEGV, Segmentation fault.\r\nmp_msg_test (log=log@entry=0x7c01a0, lev=lev@entry=6) at ../common/msg.c:133\r\n133\t        atomic_load_explicit(&root->reload_counter, memory_order_relaxed))\r\n(gdb) bt\r\n#0  mp_msg_test (log=log@entry=0x7c01a0, lev=lev@entry=6) at ../common/msg.c:133\r\n#1  0x000000000042c01a in mp_msg_va (log=0x7c01a0, lev=6, format=0x4e0568 \"Detection with %.*s failed: fallback to %s\\n\", va=0x7fffffffd5f8)\r\n    at ../common/msg.c:337\r\n#2  0x000000000042c0d2 in mp_msg (log=log@entry=0x7c01a0, lev=lev@entry=6, \r\n    format=format@entry=0x4e0568 \"Detection with %.*s failed: fallback to %s\\n\") at ../common/msg.c:606\r\n#3  0x000000000044a08b in mp_charset_guess (talloc_ctx=talloc_ctx@entry=0x7bfa70, log=log@entry=0x7c01a0, buf=..., user_cp=<optimized out>, \r\n    user_cp@entry=0x773fc0 \"auto\", flags=flags@entry=2) at ../misc/charset_conv.c:247\r\n#4  0x000000000044a586 in mp_charset_guess_and_conv_to_utf8 (log=log@entry=0x7bfa70, buf=..., user_cp=user_cp@entry=0x773fc0 \"auto\", \r\n    flags=flags@entry=2) at ../misc/charset_conv.c:269\r\n#5  0x0000000000434d75 in d_check_file (demuxer=0x7bfd40, check=<optimized out>) at ../demux/demux_libass.c:64\r\n#6  0x000000000042f8ed in open_given_type (check=DEMUX_CHECK_NORMAL, params=0x7fffffffd970, stream=0x7fffe184e050, \r\n    desc=0x4ccb60 <demuxer_desc_libass>, log=0x7bf470, global=0x76cf60) at ../demux/demux.c:993\r\n#7  demux_open (stream=0x7fffe184e050, params=params@entry=0x7fffffffd970, global=global@entry=0x76cf60) at ../demux/demux.c:1058\r\n#8  0x000000000042fc4b in demux_open_url (url=url@entry=0x78a410 \"some-sub.srt\", params=0x7fffffffd970, cancel=<optimized out>, global=0x76cf60)\r\n    at ../demux/demux.c:1087\r\n#9  0x000000000046ab0c in mp_add_external_file (mpctx=mpctx@entry=0x76c170, filename=<optimized out>, filter=filter@entry=STREAM_SUB)\r\n    at ../player/loadfile.c:710\r\n#10 0x000000000046c022 in open_subtitles_from_options (mpctx=0x76c170) at ../player/loadfile.c:753\r\n#11 play_current_file (mpctx=0x76c170) at ../player/loadfile.c:1151\r\n#12 mp_play_files (mpctx=mpctx@entry=0x76c170) at ../player/loadfile.c:1398\r\n#13 0x000000000046d30c in mpv_main (argc=<optimized out>, argv=0x7fffffffdb68) at ../player/main.c:533\r\n#14 0x00007ffff1f08700 in __libc_start_main () from /lib64/libc.so.6\r\n#15 0x000000000040ee39 in _start ()\r\n"}}