Assertion failure ('Infinity + -Infinity' and '-Infinity + Infinity' are undefined or multiplication of infinity) with CSS transition/animations
Categories
(Core :: XPCOM, defect)
Tracking
()
People
(Reporter: jruderman, Assigned: boris)
References
Details
(Keywords: assertion, regression, testcase, Whiteboard: qa-not-actionable)
Attachments
(2 files, 3 obsolete files)
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
Comment 3•9 years ago
|
||
Assignee | ||
Comment 4•9 years ago
|
||
Assignee | ||
Comment 5•9 years ago
|
||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Updated•4 years ago
|
Comment 8•3 years ago
|
||
This still repros. Maybe it is reasonable to do that? But these are also exposed to JS so maybe we need a deeper fix. Boris, do you know what the right thing to do here would be?
Assignee | ||
Comment 9•3 years ago
|
||
OK. I assign this to myself for now so I won't miss this bug.
Assignee | ||
Comment 10•3 years ago
|
||
Assignee | ||
Comment 11•3 years ago
|
||
my call stack
#01: mozilla::dom::Animation::IntervalEndTime(mozilla::BaseTimeDuration<mozilla::StickyTimeDurationValueCalculator> const&) const[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x1425dd8]
#02: mozilla::dom::CSSTransition::QueueEvents(mozilla::BaseTimeDuration<mozilla::StickyTimeDurationValueCalculator> const&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x142c058]
#03: mozilla::dom::CSSTransition::Tick()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x142c714]
#04: mozilla::dom::AnimationTimeline::Tick()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x1428f68]
[Child 14600, Main Thread] WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file /Users/boris/Projects/firefox/gecko-dev/modules/libpref/Preferences.cpp:4595
#05: mozilla::dom::DocumentTimeline::MostRecentRefreshTimeUpdated()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x142e270]
#06: nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsRefreshDriver::IsExtraTick)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x4521dc8]
#07: mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x452ad7c]
#08: mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x452ac64]
#09: mozilla::VsyncRefreshDriverTimer::RunRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x452a91c]
#10: mozilla::VsyncRefreshDriverTimer::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x4529f4c]
#11: mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsyncTimerOnMainThread()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x45294e0]
#12: mozilla::dom::VsyncMainChild::RecvNotify(mozilla::VsyncEvent const&, float const&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x3b681e0]
#13: mozilla::dom::PVsyncChild::OnMessageReceived(IPC::Message const&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x3d1082c]
#14: mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xbf6afc]
#15: mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xbba038]
#16: mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message> >)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xbb7e7c]
#17: mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xbb85c8]
#18: mozilla::ipc::MessageChannel::MessageTask::Run()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xbb9120]
#19: mozilla::RunnableTask::Run()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x2de4a4]
#20: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x2b6830]
#21: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x2b55ec]
#22: mozilla::TaskController::ProcessPendingMTTask(bool)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x2b5898]
#23: mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x2e3b4c]
#24: nsThread::ProcessNextEvent(bool, bool*)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x2ca504]
#25: NS_ProcessNextEvent(nsIThread*, bool)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x2d0c60]
#26: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xbbdf38]
#27: MessageLoop::Run()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xb40bf8]
#28: nsBaseAppShell::Run()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x4225134]
#29: nsAppShell::Run()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x4297f28]
#30: XRE_RunAppShell()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x59b61d4]
#31: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xbbe9e8]
#32: MessageLoop::Run()[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0xb40bf8]
#33: XRE_InitChildProcess(int, char**, XREChildData const*)[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/toolkit/library/build/XUL +0x59b5a20]
#34: main[/Users/boris/Projects/firefox/gecko-dev/objdirs/obj-browser-debug/dist/NightlyDebug.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container +0x6d4]
Comment 12•3 years ago
|
||
The calculation in question is actually;
EffectEnd() - mEffect->NormalizedTiming().Delay()
In most cases, EffectEnd() is including the Delay() so that theoretically we can skip the subtraction in question. That's said, I am not sure whether it's good or not in terms of spec compliance.
Assignee | ||
Comment 13•3 years ago
|
||
So basically, this is an undefined part. I just checked the implementation in WebKit and Chromium, they just let C++ compiler decide the result. For example, in WebKit:
intervalEnd = std::max(0_s, Seconds::fromMilliseconds(std::min(timing.endTime - timing.delay, timing.activeDuration)));
If both endTime
and delay
are inf, I guess the result in WebKit is something like this:
=> std::max(0_s, Seconds::fromMilliseconds(std::min(inf - inf, timing.activeDuration)))
=> std::max(0_s, Seconds::fromMilliseconds(std::min(NaN, timing.activeDuration)))
=> std::max(0_s, Seconds::fromMilliseconds(NaN))
=> 0
Note: Seconds
use double
to store the value. Any comparison involving NaNs is false, and so in the implementation of std::min the comparison fails and the first argument is returned, because the standard wants the first argument if the arguments are equivalent. (See GCC bug 47706).
In any case, I think there is no better way to fix this and so I guess the spec just leaves this as a undefined part. Perhaps we can just return zero duration if both are inf.
Assignee | ||
Comment 14•3 years ago
|
||
If both end time and start delay are Infinity, the result of interval
end time is undefined, so now we return zero duration to avoid the
assertion in StickyTimeDuration.
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•