mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 06:03:51 +00:00
There may be no source location associated with failure.
This commit is contained in:
parent
9944a73444
commit
3e3ee0ec2f
@ -461,7 +461,6 @@ bool View::Draw()
|
|||||||
if( ImGui::BeginPopupModal( "Instrumentation failure", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
|
if( ImGui::BeginPopupModal( "Instrumentation failure", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
|
||||||
{
|
{
|
||||||
const auto& data = s_instance->m_worker.GetFailureData();
|
const auto& data = s_instance->m_worker.GetFailureData();
|
||||||
const auto& srcloc = s_instance->m_worker.GetSourceLocation( data.srcloc );
|
|
||||||
|
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
TextCentered( ICON_FA_SKULL );
|
TextCentered( ICON_FA_SKULL );
|
||||||
@ -471,14 +470,18 @@ bool View::Draw()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text( "%s", Worker::GetFailureString( failure ) );
|
ImGui::Text( "%s", Worker::GetFailureString( failure ) );
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if( srcloc.name.active )
|
if( data.srcloc != 0 )
|
||||||
{
|
{
|
||||||
TextFocused( "Zone name:", s_instance->m_worker.GetString( srcloc.name ) );
|
const auto& srcloc = s_instance->m_worker.GetSourceLocation( data.srcloc );
|
||||||
|
if( srcloc.name.active )
|
||||||
|
{
|
||||||
|
TextFocused( "Zone name:", s_instance->m_worker.GetString( srcloc.name ) );
|
||||||
|
}
|
||||||
|
TextFocused( "Function:", s_instance->m_worker.GetString( srcloc.function ) );
|
||||||
|
ImGui::TextDisabled( "Location:" );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Text( "%s:%i", s_instance->m_worker.GetString( srcloc.file ), srcloc.line );
|
||||||
}
|
}
|
||||||
TextFocused( "Function:", s_instance->m_worker.GetString( srcloc.function ) );
|
|
||||||
ImGui::TextDisabled( "Location:" );
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Text( "%s:%i", s_instance->m_worker.GetString( srcloc.file ), srcloc.line );
|
|
||||||
TextFocused( "Thread:", s_instance->m_worker.GetThreadString( data.thread ) );
|
TextFocused( "Thread:", s_instance->m_worker.GetThreadString( data.thread ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(id)" );
|
ImGui::TextDisabled( "(id)" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user