{"action":"created","issue":{"url":"https://api.github.com/repos/HandBrake/HandBrake/issues/1524","repository_url":"https://api.github.com/repos/HandBrake/HandBrake","labels_url":"https://api.github.com/repos/HandBrake/HandBrake/issues/1524/labels{/name}","comments_url":"https://api.github.com/repos/HandBrake/HandBrake/issues/1524/comments","events_url":"https://api.github.com/repos/HandBrake/HandBrake/issues/1524/events","html_url":"https://github.com/HandBrake/HandBrake/pull/1524","id":348678660,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2OTcwOTI3","number":1524,"title":"Fix arithmetic exception in hb_set_anamorphic_size2() when displaying…","user":{"login":"emericg","id":691258,"node_id":"MDQ6VXNlcjY5MTI1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/691258?v=4","gravatar_id":"","url":"https://api.github.com/users/emericg","html_url":"https://github.com/emericg","followers_url":"https://api.github.com/users/emericg/followers","following_url":"https://api.github.com/users/emericg/following{/other_user}","gists_url":"https://api.github.com/users/emericg/gists{/gist_id}","starred_url":"https://api.github.com/users/emericg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emericg/subscriptions","organizations_url":"https://api.github.com/users/emericg/orgs","repos_url":"https://api.github.com/users/emericg/repos","events_url":"https://api.github.com/users/emericg/events{/privacy}","received_events_url":"https://api.github.com/users/emericg/received_events","type":"User","site_admin":false},"labels":[{"id":251385808,"node_id":"MDU6TGFiZWwyNTEzODU4MDg=","url":"https://api.github.com/repos/HandBrake/HandBrake/labels/Bug","name":"Bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"bradleysepos","id":70239,"node_id":"MDQ6VXNlcjcwMjM5","avatar_url":"https://avatars1.githubusercontent.com/u/70239?v=4","gravatar_id":"","url":"https://api.github.com/users/bradleysepos","html_url":"https://github.com/bradleysepos","followers_url":"https://api.github.com/users/bradleysepos/followers","following_url":"https://api.github.com/users/bradleysepos/following{/other_user}","gists_url":"https://api.github.com/users/bradleysepos/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleysepos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleysepos/subscriptions","organizations_url":"https://api.github.com/users/bradleysepos/orgs","repos_url":"https://api.github.com/users/bradleysepos/repos","events_url":"https://api.github.com/users/bradleysepos/events{/privacy}","received_events_url":"https://api.github.com/users/bradleysepos/received_events","type":"User","site_admin":false},"assignees":[{"login":"bradleysepos","id":70239,"node_id":"MDQ6VXNlcjcwMjM5","avatar_url":"https://avatars1.githubusercontent.com/u/70239?v=4","gravatar_id":"","url":"https://api.github.com/users/bradleysepos","html_url":"https://github.com/bradleysepos","followers_url":"https://api.github.com/users/bradleysepos/followers","following_url":"https://api.github.com/users/bradleysepos/following{/other_user}","gists_url":"https://api.github.com/users/bradleysepos/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleysepos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleysepos/subscriptions","organizations_url":"https://api.github.com/users/bradleysepos/orgs","repos_url":"https://api.github.com/users/bradleysepos/repos","events_url":"https://api.github.com/users/bradleysepos/events{/privacy}","received_events_url":"https://api.github.com/users/bradleysepos/received_events","type":"User","site_admin":false},{"login":"jstebbins","id":709720,"node_id":"MDQ6VXNlcjcwOTcyMA==","avatar_url":"https://avatars0.githubusercontent.com/u/709720?v=4","gravatar_id":"","url":"https://api.github.com/users/jstebbins","html_url":"https://github.com/jstebbins","followers_url":"https://api.github.com/users/jstebbins/followers","following_url":"https://api.github.com/users/jstebbins/following{/other_user}","gists_url":"https://api.github.com/users/jstebbins/gists{/gist_id}","starred_url":"https://api.github.com/users/jstebbins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstebbins/subscriptions","organizations_url":"https://api.github.com/users/jstebbins/orgs","repos_url":"https://api.github.com/users/jstebbins/repos","events_url":"https://api.github.com/users/jstebbins/events{/privacy}","received_events_url":"https://api.github.com/users/jstebbins/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/HandBrake/HandBrake/milestones/12","html_url":"https://github.com/HandBrake/HandBrake/milestone/12","labels_url":"https://api.github.com/repos/HandBrake/HandBrake/milestones/12/labels","id":3436525,"node_id":"MDk6TWlsZXN0b25lMzQzNjUyNQ==","number":12,"title":"1.1.2","description":"Next patch release. No new features, only bug fixes.","creator":{"login":"jstebbins","id":709720,"node_id":"MDQ6VXNlcjcwOTcyMA==","avatar_url":"https://avatars0.githubusercontent.com/u/709720?v=4","gravatar_id":"","url":"https://api.github.com/users/jstebbins","html_url":"https://github.com/jstebbins","followers_url":"https://api.github.com/users/jstebbins/followers","following_url":"https://api.github.com/users/jstebbins/following{/other_user}","gists_url":"https://api.github.com/users/jstebbins/gists{/gist_id}","starred_url":"https://api.github.com/users/jstebbins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstebbins/subscriptions","organizations_url":"https://api.github.com/users/jstebbins/orgs","repos_url":"https://api.github.com/users/jstebbins/repos","events_url":"https://api.github.com/users/jstebbins/events{/privacy}","received_events_url":"https://api.github.com/users/jstebbins/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2018-06-19T17:40:30Z","updated_at":"2018-08-08T11:11:47Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-08-08T11:06:02Z","updated_at":"2018-08-08T16:06:53Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/HandBrake/HandBrake/pulls/1524","html_url":"https://github.com/HandBrake/HandBrake/pull/1524","diff_url":"https://github.com/HandBrake/HandBrake/pull/1524.diff","patch_url":"https://github.com/HandBrake/HandBrake/pull/1524.patch"},"body":"**Description of Change:**\r\n\r\nHandBrake crashes when displaying the preview, right when all thumbnail are created and the 'preview progressbar' is done. The Arch Linux build has been systematically segfaulting for a week and its been pissing me off so I took a closer look at this. Repository version is 1.1.1 and building from git didn't changed anything.\r\n\r\nI don't know if this is the right fix, but on my machine, the problem is in hb_set_anamorphic_size2() with:\r\n`int mod = geo->modulus ? EVEN(geo->modulus) : 2;`\r\nand because geo->modulus equals -1 for the last of the preview jobs (0 for the other), it crashes when doing:\r\n`width = MULTIPLE_MOD_UP(geo->geometry.width, mod);`\r\nlater in the fonction.\r\n\r\nWith:\r\n`int mod = (geo->modulus > 0) ? EVEN(geo->modulus) : 2;`\r\nIt stops crashing and all previews are back looking normal.\r\n\r\n**Test on:**\r\n\r\n- [ ] Windows 10+  (via MinGW)\r\n- [ ] macOS 10.13+\r\n- [x] Arch Linux\r\n\r\n**Log file output (If relevant):**\r\n\r\n```\r\nThread 1 \"ghb\" received signal SIGFPE, Arithmetic exception.\r\n0x000055555566cf36 in hb_set_anamorphic_size2 ()\r\n(gdb) bt\r\n#0  0x000055555566cf36 in hb_set_anamorphic_size2 ()\r\n#1  0x0000555555666831 in ghb_get_preview_image ()\r\n#2  0x000055555565cb86 in init_preview_image ()\r\n#3  0x000055555565ccce in ghb_set_preview_image ()\r\n#4  0x00007ffff39c2c96 in  () at /usr/lib/libgobject-2.0.so.0\r\n#5  0x00007ffff39de9e9 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0\r\n#6  0x00007ffff39df130 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0\r\n#7  0x00007ffff39c2a4d in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0\r\n#8  0x00007ffff39d5e40 in  () at /usr/lib/libgobject-2.0.so.0\r\n#9  0x00007ffff39de6f6 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0\r\n#10 0x00007ffff39df130 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0\r\n#11 0x00007ffff5953678 in  () at /usr/lib/libgtk-3.so.0\r\n#12 0x0000555555654fc1 in ghb_update_widget ()\r\n#13 0x000055555565532a in ghb_ui_settings_update ()\r\n#14 0x0000555555655be6 in ghb_settings_to_ui ()\r\n#15 0x00005555556367f4 in ghb_load_post_settings.part ()\r\n#16 0x0000555555638715 in title_changed_cb ()\r\n#17 0x00007ffff39c2a4d in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0\r\n#18 0x00007ffff39d5e40 in  () at /usr/lib/libgobject-2.0.so.0\r\n#19 0x00007ffff39de6f6 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0\r\n#20 0x00007ffff39df130 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0\r\n#21 0x00007ffff59a9c7b in  () at /usr/lib/libgtk-3.so.0\r\n#22 0x00007ffff59aca0c in gtk_combo_box_set_active_iter () at /usr/lib/libgtk-3.so.0\r\n#23 0x0000555555654e50 in ghb_update_widget ()\r\n---Type <return> to continue, or q <return> to quit---\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/HandBrake/HandBrake/issues/comments/411461181","html_url":"https://github.com/HandBrake/HandBrake/pull/1524#issuecomment-411461181","issue_url":"https://api.github.com/repos/HandBrake/HandBrake/issues/1524","id":411461181,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTQ2MTE4MQ==","user":{"login":"jstebbins","id":709720,"node_id":"MDQ6VXNlcjcwOTcyMA==","avatar_url":"https://avatars0.githubusercontent.com/u/709720?v=4","gravatar_id":"","url":"https://api.github.com/users/jstebbins","html_url":"https://github.com/jstebbins","followers_url":"https://api.github.com/users/jstebbins/followers","following_url":"https://api.github.com/users/jstebbins/following{/other_user}","gists_url":"https://api.github.com/users/jstebbins/gists{/gist_id}","starred_url":"https://api.github.com/users/jstebbins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstebbins/subscriptions","organizations_url":"https://api.github.com/users/jstebbins/orgs","repos_url":"https://api.github.com/users/jstebbins/repos","events_url":"https://api.github.com/users/jstebbins/events{/privacy}","received_events_url":"https://api.github.com/users/jstebbins/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T16:06:53Z","updated_at":"2018-08-08T16:06:53Z","author_association":"CONTRIBUTOR","body":"Looking a little closer, I see why -1 causes a crash.  The EVEN macro converts -1 to 0 to make it EVEN.  So patch is OK to solve that particular problem.\r\n\r\nBut I would still like to understand how a value of -1 is being passed to begin with.  I can't reproduce it at all, even if I manually change the value in the preset before running HandBrake."}}
{"actor":{"display_login":"jstebbins"}}