{"action":"created","issue":{"url":"https://api.github.com/repos/pagespeed/mod_pagespeed/issues/1078","labels_url":"https://api.github.com/repos/pagespeed/mod_pagespeed/issues/1078/labels{/name}","comments_url":"https://api.github.com/repos/pagespeed/mod_pagespeed/issues/1078/comments","events_url":"https://api.github.com/repos/pagespeed/mod_pagespeed/issues/1078/events","html_url":"https://github.com/pagespeed/mod_pagespeed/issues/1078","id":76066246,"number":1078,"title":"check failure in `image_rewrite_filter` on truncated image","user":{"login":"jeffkaufman","id":262566,"avatar_url":"https://avatars.githubusercontent.com/u/262566?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffkaufman","html_url":"https://github.com/jeffkaufman","followers_url":"https://api.github.com/users/jeffkaufman/followers","following_url":"https://api.github.com/users/jeffkaufman/following{/other_user}","gists_url":"https://api.github.com/users/jeffkaufman/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffkaufman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffkaufman/subscriptions","organizations_url":"https://api.github.com/users/jeffkaufman/orgs","repos_url":"https://api.github.com/users/jeffkaufman/repos","events_url":"https://api.github.com/users/jeffkaufman/events{/privacy}","received_events_url":"https://api.github.com/users/jeffkaufman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-13T17:41:10Z","updated_at":"2015-05-13T17:46:06Z","closed_at":null,"body":"When `image_rewrite_filter` optimizes a truncated image it can CHECK-fail:\r\n\r\n```\r\n[Wed May 13 11:51:21 2015] [alert] [mod_pagespeed 1.10.0.0-7210 @23900] [0513/115120:FATAL:image_rewrite_filter.cc(807)]\r\nCheck failed: image_dim.width() > 0 && image_dim.height() > 0. \r\nthird_party/chromium/src/base/debug/stack_trace_posix.cc:475: base::debug::StackTrace::StackTrace [0x2b835547e00c]\r\nthird_party/chromium/src/base/logging.cc:562: logging::LogMessage::~LogMessage [0x2b835547f40d]\r\nnet/instaweb/rewriter/image_rewrite_filter.cc:807: net_instaweb::ImageRewriteFilter::ResizeImageIfNecessary [0x2b835556859e]\r\nnet/instaweb/rewriter/image_rewrite_filter.cc:1005 (discriminator 2): net_instaweb::ImageRewriteFilter::RewriteLoadedResourceImpl [0x2b8355569381]\r\nnet/instaweb/rewriter/image_rewrite_filter.cc:439 (discriminator 3): net_instaweb::ImageRewriteFilter::Context::RewriteSingle [0x2b83555660c9]\r\nnet/instaweb/rewriter/single_rewrite_context.cc:80 (discriminator 1): net_instaweb::SingleRewriteContext::Rewrite [0x2b83555bc8cc]\r\nnet/instaweb/rewriter/rewrite_context.cc:1204: net_instaweb::RewriteContext::InvokeRewriteFunction::Run [0x2b83555b44fe]\r\npagespeed/kernel/base/function.cc:52: net_instaweb::Function::CallRun [0x2b8355760ea6]\r\npagespeed/kernel/thread/queued_worker_pool.cc:164: net_instaweb::QueuedWorkerPool::Run [0x2b83557a89a9]\r\n./third_party/pagespeed/kernel/base/function.h:202 (discriminator 3): net_instaweb::MemberFunction2<net_instaweb::QueuedWorkerPool, net_instaweb::QueuedWorkerPool::Sequence*, net_instaweb::QueuedWorker*>::Run [0x2b83557af9ea]\r\npagespeed/kernel/base/function.cc:52: net_instaweb::Function::CallRun [0x2b8355760ea6]\r\npagespeed/kernel/thread/worker.cc:81 (discriminator 1): net_instaweb::Worker::WorkThread::Run [0x2b83557b52e4]\r\npagespeed/kernel/thread/pthread_thread_system.cc:123: net_instaweb::PthreadThreadImpl::InvokeRun [0x2b83559c1d9b]\r\n/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x2b8354be4182]\r\n/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x2b83550f847d]\r\n```\r\n\r\nThis shouldn't happen.  Invalid images should only generate `kInfo` messages and `+debug` comments."},"comment":{"url":"https://api.github.com/repos/pagespeed/mod_pagespeed/issues/comments/101756728","html_url":"https://github.com/pagespeed/mod_pagespeed/issues/1078#issuecomment-101756728","issue_url":"https://api.github.com/repos/pagespeed/mod_pagespeed/issues/1078","id":101756728,"user":{"login":"jmaessen","id":629064,"avatar_url":"https://avatars.githubusercontent.com/u/629064?v=3","gravatar_id":"","url":"https://api.github.com/users/jmaessen","html_url":"https://github.com/jmaessen","followers_url":"https://api.github.com/users/jmaessen/followers","following_url":"https://api.github.com/users/jmaessen/following{/other_user}","gists_url":"https://api.github.com/users/jmaessen/gists{/gist_id}","starred_url":"https://api.github.com/users/jmaessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmaessen/subscriptions","organizations_url":"https://api.github.com/users/jmaessen/orgs","repos_url":"https://api.github.com/users/jmaessen/repos","events_url":"https://api.github.com/users/jmaessen/events{/privacy}","received_events_url":"https://api.github.com/users/jmaessen/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T17:46:06Z","updated_at":"2015-05-13T17:46:06Z","body":"Hmm, this was a DCHECK because we should be checking this at the caller.\nIt'd be good to add a test case if we're not doing that.\n\nOn Wed, May 13, 2015 at 1:41 PM, Jeff Kaufman <notifications@github.com>\nwrote:\n\n> When image_rewrite_filter optimizes a truncated image it can CHECK-fail:\n>\n> [Wed May 13 11:51:21 2015] [alert] [mod_pagespeed 1.10.0.0-7210 @23900] [0513/115120:FATAL:image_rewrite_filter.cc(807)] Check failed: image_dim.width() > 0 && image_dim.height() > 0.\n> third_party/chromium/src/base/debug/stack_trace_posix.cc:475: base::debug::StackTrace::StackTrace [0x2b835547e00c]\n> third_party/chromium/src/base/logging.cc:562: logging::LogMessage::~LogMessage [0x2b835547f40d]\n> net/instaweb/rewriter/image_rewrite_filter.cc:807: net_instaweb::ImageRewriteFilter::ResizeImageIfNecessary [0x2b835556859e]\n> net/instaweb/rewriter/image_rewrite_filter.cc:1005 (discriminator 2): net_instaweb::ImageRewriteFilter::RewriteLoadedResourceImpl [0x2b8355569381]\n> net/instaweb/rewriter/image_rewrite_filter.cc:439 (discriminator 3): net_instaweb::ImageRewriteFilter::Context::RewriteSingle [0x2b83555660c9]\n> net/instaweb/rewriter/single_rewrite_context.cc:80 (discriminator 1): net_instaweb::SingleRewriteContext::Rewrite [0x2b83555bc8cc]\n> net/instaweb/rewriter/rewrite_context.cc:1204: net_instaweb::RewriteContext::InvokeRewriteFunction::Run [0x2b83555b44fe]\n> pagespeed/kernel/base/function.cc:52: net_instaweb::Function::CallRun [0x2b8355760ea6]\n> pagespeed/kernel/thread/queued_worker_pool.cc:164: net_instaweb::QueuedWorkerPool::Run [0x2b83557a89a9]\n> ./third_party/pagespeed/kernel/base/function.h:202 (discriminator 3): net_instaweb::MemberFunction2<net_instaweb::QueuedWorkerPool, net_instaweb::QueuedWorkerPool::Sequence*, net_instaweb::QueuedWorker*>::Run [0x2b83557af9ea]\n> pagespeed/kernel/base/function.cc:52: net_instaweb::Function::CallRun [0x2b8355760ea6]\n> pagespeed/kernel/thread/worker.cc:81 (discriminator 1): net_instaweb::Worker::WorkThread::Run [0x2b83557b52e4]\n> pagespeed/kernel/thread/pthread_thread_system.cc:123: net_instaweb::PthreadThreadImpl::InvokeRun [0x2b83559c1d9b]\n> /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x2b8354be4182]\n> /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x2b83550f847d]\n>\n> This shouldn't happen. Invalid images should only generate kInfo messages\n> and +debug comments.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/pagespeed/mod_pagespeed/issues/1078>.\n>\n"}}