#18683 closed bug (invalid)

BRoster::Launch with args strange behaviour

Reported by: jackburton Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Application Kit Version: R1/beta4
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Consider the following code:

BString one("BeScreenCapture");
BString two("parameter");

const char* argv[] = { one.String(), two.String(), NULL };
be_roster->Launch("application/x-vnd.Haiku-debugger", 2, argv);

The debugger is launched, but with garbled parameters (you can see it from the screenshot).

If I change the above code with:

const char* argv[] = { strdup(one.String()), strdup(two.String()), NULL };

the debugger starts and attaches to BeScreenCapture correctly.

Am I missing something in my code ? Are the args strings supposed to be owned by BRoster::Launch() ?

Or could be more a debugger issue ?

Attachments (1)

Schermata del 2023-11-23 17-57-30.png (42.4 KB ) - added by jackburton 12 months ago.

Download all attachments as: .zip

Change History (2)

by jackburton, 12 months ago

comment:1 by jackburton, 12 months ago

Resolution: invalid
Status: newclosed

Invalid: turns out there's a problem in the code (which is not exactly like the one I posted)

Note: See TracTickets for help on using tickets.