-
-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix processing FrameData with no frames #798
Conversation
@@ -95,7 +95,7 @@ void View::DrawTimelineFrames( const FrameData& frames ) | |||
{ | |||
const std::pair <int, int> zrange = m_worker.GetFrameRange( frames, m_vd.zvStart, m_vd.zvEnd ); | |||
if( zrange.first < 0 ) return; | |||
if( m_worker.GetFrameBegin( frames, zrange.first ) > m_vd.zvEnd || m_worker.GetFrameEnd( frames, zrange.second ) < m_vd.zvStart ) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's additional moment: after checking for frames.frames.empty()
I've faced crash when GetFrameRange
returned the frames.frames.end()
as a zrange.second
and m_worker.GetFrameEnd( frames, zrange.second )
went OOB
I'm unable to check the full-scale app right now, but my small sample still fails (not every launch) and now in another place Could the fact that now you don't immediately call P.S. what about the line I commented before ( |
This can be ignored. (Not really, but a fix is non-trivial and you get the warning in the UI that data is invalid until a save+load cycle.)
Can you provide output of an asan-enabled build that shows this is a problem? |
Agreed, I've reproduced the same problem on my branch too, so it's probably unrelated with the problem in hand.
Got it on a very same sample
That was the problem: if frame is not continuous, |
Should be fixed by d3da7dc. |
Small example seems stable. I won't be able to test it on full app till Monday. |
Your fix worked smoothly. Closing both PR and issure. Thanks a lot! |
I'm trying to solve the issue #789
The #666 partially fixed the problem by allowing us to not use
DeferItem
at all. But it causes some stability issues: ignoring of unpairedMarkEnd
leavesFrameData
object with emptyframes
. But the server processing is built around the fact, thatFrameData::frames
are guaranteed to be filled with something (e.g.Worker::GetFrameRange
goes out-of-bounds ifFrameData::frames
is empty). We've faced this while doing the following:TRACY_ON_DEMAND
tracy-profiler
and leave it waiting for127.0.0.1
tracy-profiler
crashesThis PR tries to close all possibly unsafe places (
GetFrameBegin/End/Range
shouldn't be called whenFrameData::frames
is empty). The usual stacktrace locally isView::DrawTimelineFrames( *fd )
->Worker::GetFrameRange( *fd )
->out-of-bounds on zitbegin--
The small synthetic example which crashes the master but seems stable with my fix. It should be placed in
examples/test_delay
.CMakeLists.txt
main.cpp
P.S. I thought about a way to not let
FrameData
like these into processing in the first place (filtering them somehow) but didn't find a proper place in the code.