crashpad icon indicating copy to clipboard operation
crashpad copied to clipboard

App reports invalid attachments from Chrome crashpad database

Open alecazam opened this issue 1 year ago • 7 comments

Our game has a debug builds that don't include crashpad in the build, and crashpad_handler.exe isn't deployed alongside the .exe. Only our shipping builds do this. Yet when running the debug build, we get crashpad errors in our logs with errors trying to find attachments from Chrome. This is worriesome that somehow our app even without the crashpad library or handler is somehow triggering crashpad errors.

[1115/142504.058:ERROR:filesystem_win.cc(130)] GetFileAttributes C:\Users\foo\AppData\Local\Google\Chrome\User Data\Crashpad\attachments\c46abb11-db2d-4000-ae60-62c212511087: The system cannot find the file specified. (0x2)
[1115/142504.059:ERROR:filesystem_win.cc(130)] GetFileAttributes C:\Users\foo\AppData\Local\Google\Chrome\User Data\Crashpad\attachments\66f378f7-2f27-47b4-9284-722b89ddb398: The system cannot find the file specified. (0x2)
[1115/142504.059:ERROR:filesystem_win.cc(130)] GetFileAttributes C:\Users\foo\AppData\Local\Google\Chrome\User Data\Crashpad\attachments\201f16ff-7792-4774-8648-26ea43ec91a9: The system cannot find the file specified. (0x2)
[1115/142504.064:ERROR:filesystem_win.cc(130)] GetFileAttributes C:\Users\foo\AppData\Local\Google\Chrome\User Data\Crashpad\attachments\65950f34-8e80-4070-935b-25950d63ef02: The system cannot find the file specified. (0x2) 

The workaround for now, was to go to this folder delete the metadata file from Google/Chrome.

alecazam avatar Nov 20 '23 23:11 alecazam

Don't initialize crashpad in the debug build if you don't want to use it.

KrzaQ avatar Nov 20 '23 23:11 KrzaQ

We don't and we can't. The library isn't even loaded. So makes no sense why these errors show up. I've already reported the code in the Issues for how to wipe the crashpad database, and in Release we do that every time we launch. That code wasn't a part of the sample code from Backtrace. Without it, we were getting similar errors above but from our app metadata. The errors above are from Google Chrome but in our game.

alecazam avatar Nov 20 '23 23:11 alecazam

#if IS_RELEASE

#include <client/crashpad_client.h>
#include <client/settings.h>
#include <client/crash_report_database.h>
#include <client/crashpad_info.h>

// This is using libs built from new sources
// renamed from client.lib
#pragma comment( lib, "crashpad_client.lib" )

#endif

alecazam avatar Nov 20 '23 23:11 alecazam

Are you disabling the actual function calls for crashpad initialization?

KrzaQ avatar Nov 20 '23 23:11 KrzaQ

Yes, they're all in that file.

#if IS_RELEASE InitializeCrashpad( backtraceToken ); #else (void)backtraceToken; #endif

alecazam avatar Nov 21 '23 00:11 alecazam

In that case, backtrace-crashpad is unlikely to be the culprit. Is it possible that your game or one of its dependencies include Google Chrome or something Chrome-based to render webpages (e.g. help, eula)?

KrzaQ avatar Nov 21 '23 22:11 KrzaQ

Yes, maybe there's a Chromium or mini chromium that is causing this. Will see if that's the case.

alecazam avatar Nov 22 '23 01:11 alecazam