inet icon indicating copy to clipboard operation
inet copied to clipboard

Several Visualizer modules can produce negative alpha in fade out

Open edlongman opened this issue 3 years ago • 2 comments

The following produces a negative delta on my machine sometimes when running in "Express mode" and then stopping.

delta = currentAnimationPosition.getRealTime() - linkVisualization->lastUsageAnimationPosition.getRealTime()

It is present in LinkBreakVisualizerBase.cc, LinkVisualizerBase.cc, PacketDropVisualizerBase.cc, PathVisualizerBase.cc and TracingObstacleLossVisualizerBase.cc.

When delta is negative, it throws the error "lineOpacity must be in the range [0,1]" (because it is negative)

edlongman avatar Mar 29 '22 16:03 edlongman

Just by looking at the code I don't see how could the real time difference be negative unless lastUsageAnimationPosition gets updated after currentAnimationPosition is initialized, otherwise opp_get_monotonic_clock_usecs() is not that monotonic after all?

levy avatar Mar 31 '22 06:03 levy

I'm honestly not sure how it happens, but it happens a lot in debug mode in my setup. Less often but still happens in release mode.

I'm running a big network which may be a factor.

The temp fix I've implemented just checks if delta < 0 with if delta > fadeOutTime

On Thu, 31 Mar 2022 at 07:53, Levente Mészáros @.***> wrote:

Just by looking at the code I don't see how could the real time difference be negative unless lastUsageAnimationPosition gets updated after currentAnimationPosition is initialized, otherwise opp_get_monotonic_clock_usecs() is not that monotonic after all?

— Reply to this email directly, view it on GitHub https://github.com/inet-framework/inet/issues/750#issuecomment-1084165716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFJJUEHA7EIZP6UGVIWR2LVCVDVXANCNFSM5R64YGBQ . You are receiving this because you authored the thread.Message ID: @.***>

edlongman avatar Mar 31 '22 06:03 edlongman