Call stacks are not collected on MacOS 12.4
-- The C compiler identification is AppleClang 13.1.6.13160021
I'm also using dsymutil to extract the debug symbols.
The lldb debugger is able to retrieve call stack information.
The only way I managed to get it working was to add the following lines in my main function, before everything else:
while (i < 30)
{
TracyCZoneS(Main, 3, TRACY_ENABLE)
SDL_Delay(200);
TracyCZoneEnd(Main);
i++;
TracyCFrameMark()
}
For some reason this kicks the call stack collection:
The only way I can reproduce this is by having outdated dsymutil symbols. Otherwise can't repro.
Unfortunately, it's not the case on my side, I double checked. I will take some time in the next days to debug on tracy's source code.
I tested with the test application, replacing everything in main with a busy loop. Do you have a test case?
I GOT IT! :D
The test works on my side as well!
To reproduce this, replace everything from the main function with a function call from an included file.
The function from the included cpp file should contain this:
#include <chrono>
#include <mutex>
#include <thread>
#include <stdlib.h>
#include "../Tracy.hpp"
#include "../common/TracySystem.hpp"
#define STB_IMAGE_IMPLEMENTATION
#define STBI_ONLY_JPEG
#include "stb_image.h"
void test_call_stack()
{
int x, y;
auto image = stbi_load( "image.jpg", &x, &y, nullptr, 4 );
for(;;)
{
TracyMessageL( "Tick" );
std::this_thread::sleep_for( std::chrono::milliseconds( 2 ) );
{
ZoneScoped;
std::this_thread::sleep_for( std::chrono::milliseconds( 2 ) );
}
FrameImage( image, x, y, 0, false );
FrameMark;
}
}
Please let me know how it works.
I checked the stack from the memory tab on alloc btw
The example you have provided is not self-contained.
I can confirm I have the same issue as well, even with the Test app (without any modifications). Memory allocations only show the symbol and not the function line in the stack trace.
Also on 12.4
Seems like I'm also seeing the same issues on iOS ?

Some progress on this. It seems like i had to generate debug symbols with dsym instead of just dwarf. the dsym needs to be next to the actual executable in case of a bundled .app. <Package.app>/Contents/MacOS/
There's still some odd behavior but I believe it's not coming from tracy anymore.
Thanks !
Same issue. Finally I found the solution in tracy_user_manual.pdf:
On iOS you will have to add a New Run Script Phase to your XCode project, which shall execute the following shell script: cp -rf ${TARGET_BUILD_DIR}/${WRAPPER_NAME}.dSYM/* ${TARGET_BUILD_DIR}/${ UNLOCALIZED_RESOURCES_FOLDER_PATH}/${PRODUCT_NAME}.dSYM