Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#763 closed bug (fixed)

[Tracker] doesn't open several selected files if folder doesn't contain subfolder

Reported by: diver Owned by: bonefish
Priority: normal Milestone: R1
Component: Servers/registrar Version:
Keywords: Cc: axeld
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by bonefish)

Race condition in BRoster::Launch(): Two processes launching the same app at the same time. If the second one preempts the first one before it has finished the early pre-registration with the registrar it doesn't get a valid team ID and fails to send its "on launch" messages (argv, refs). Reproducible using the Tracker: open several text files at once (with the editor not yet running).

Change History (8)

comment:1 by diver, 13 years ago

Summary: [Ttracker] doesn't open several selected files if folder doesn't contain subfolder[Tracker] doesn't open several selected files if folder doesn't contain subfolder

comment:2 by axeld, 13 years ago

Description: modified (diff)
Platform: All
Status: newassigned

While I can easily reproduce the problem itself (that Tracker doesn't open all of the selected files), I fail to see any connection with having a folder in that directory or not. It only works flawlessly when the application is already running. I would assume this to be a bug in libbe.so.

comment:3 by marcusoverhagen, 13 years ago

Files in /boot/beos/system/boot are executeable shell scripts, not normal text files. None should be opened (in text editor?), they all should be executed.

comment:4 by axeld, 13 years ago

Component: ApplicationsGeneral/registrar
Owner: changed from axeld to bonefish
Status: assignednew

I've investigated the issue, and it's the fault of the Registrar. Tracker just does several BRoster::Launch() in a row. The first BRoster::_AddApplication() will succeed, the subsequent ones will fail with B_ALREADY_RUNNING - unfortunately, BRoster::GetRunningAppInfo() will fail afterwards, as the team hasn't completed its registration. Therefore, the messages are not sent to the application. If we also use GetAppInfo(signature, ...) the message will be sent, but still doesn't reach the team, as it doesn't have completed its registration, and therefore its team variable is still unset (which the registrar obviously doesn't care about too much). Either the team value has to be set earlier (as part of the preregistration), or the registrar needs to collect messages targeted at such a team and send them when it completes its registration. I'll give Ingo a try at a better solution ;-)

comment:5 by axeld, 13 years ago

Cc: axeld added

To Marcus: none of them has the executable bit set, furthermore, only the installer scripts have the bash shebang.

comment:6 by bonefish, 13 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

comment:7 by bonefish, 13 years ago

Description: modified (diff)

comment:8 by bonefish, 13 years ago

Fixed in revision 18728.

Note: See TracTickets for help on using tickets.