crashpad integration

539 views
Skip to first unread message

digrand...@gmail.com

unread,
Apr 3, 2018, 11:42:43 AM4/3/18
to Crashpad-dev
Hi everyone,
I know there is many documentation on source code for crashpad, but is there any documentation, or example of how to integrate it in an application?
I fail all my try . When I start handler, an error message occured and the return of method is false.
[5204:8288:20180403,152110.161:ERROR registration_protocol_win.cc:84] TransactNamedPipe: Le canal de communication a ├®t├® ferm├®. (109)
I 'm trying to explore chromium but i can't generate solution from command " gn gen out\Default --ide=vs ".
This is my code to start handler:

#include "stdafx.h"
#include "Person.h"
#include "client/crashpad_client.h"
#include <string>
#include <map>
#include <vector>


int main()
{

crashpad::CrashpadClient client;
#ifdef _DEBUG
const base::FilePath handlerPath = base::FilePath(L"C:\\workspace\\crashpad\\crashpad\\out\\Debug\\crashpad_handler.exe");
const base::FilePath databasePath = base ::FilePath(L"C:\\workspace\\crashpad\\crashpad\\out\\Debug\\crashpad_database_util.exe");
const base::FilePath tempDir;
#else
const base::FilePath handlerPath = base::FilePath(L"C:\\workspace\\crashpad\\crashpad\\out\\Release\\crashpad_handler.exe");
const base::FilePath databasePath = base::FilePath(L"C:\\workspace\\crashpad\\crashpad\\out\\Release\\crashpad_database_util.exe");
const base::FilePath tempDir;
#endif


if (client.StartHandler(handlerPath, databasePath, base::FilePath(), std::string(), std::map<std::string, std::string>(), std::vector<std::string>(), true, false))
{

}


return 0;
}
Thanks for your help.

Fabien

Samy Bahra

unread,
Apr 3, 2018, 1:10:27 PM4/3/18
to digrand...@gmail.com, Crashpad-dev
Hi Fabien

We have detailed documentation up at https://help.backtrace.io/integration-guides/compiled-languages-and-applications/crashpad-integration-guide - If you've any issues with our packaging or non-upstream issues though, I ask you take it to our support channel.


--
You received this message because you are subscribed to the Google Groups "Crashpad-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crashpad-dev...@chromium.org.
To post to this group, send email to crashp...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crashpad-dev/46baf866-6b51-40af-a0a8-8f667e6386bb%40chromium.org.
--
Samy Al Bahra
CTO / Co-Founder

Scott Graham

unread,
Apr 3, 2018, 6:16:58 PM4/3/18
to digrand...@gmail.com, Crashpad-dev
Hi Fabien,

The main thing that looks wrong there is that databasePath should be a path to an possibly-not-yet-existing directory, not the path to the database utility tool. The database path is where Crashpad stores crash reports and user settings.

Scott

--
You received this message because you are subscribed to the Google Groups "Crashpad-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crashpad-dev+unsubscribe@chromium.org.

Fabien Di Grande

unread,
Apr 4, 2018, 4:09:06 AM4/4/18
to Scott Graham, Crashpad-dev
Thanks for your help, I've changed the databasePath but i have the same error message. I look at your website this afternoon. Seey you soon.

Fabien

digrand...@gmail.com

unread,
Apr 5, 2018, 5:57:52 AM4/5/18
to Crashpad-dev, sco...@chromium.org

Hi, thanks for your help, I made modifications and now, I can create a client correctly. My next step is to create a minidump when my application crash. I know that I'm close to reach the goal.
See you
Fabien

Scott Graham

unread,
Apr 5, 2018, 11:49:33 AM4/5/18
to Fabien Di Grande, Crashpad-dev
If StartHandler() is succeeding, then Crashpad is set up correctly and crashes should be getting caught. If your process crashes, you should see crashes in the database directory you provided at initialization.

You can inspect the directory directly to see if there's a .dmp file there (on Windows), or more generally use crashpad_database_util to inspect the database.
Reply all
Reply to author
Forward
0 new messages