#627 closed bug (fixed)
Cannot open another copy of the Terminal program
Reported by: | Owned by: | bonefish | |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications | Version: | |
Keywords: | Cc: | diver, Niels.Reedijk@…, bonefish | |
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
Test description:
- Click on the leaf in the Deskbar.
- Select Applications -> Terminal.
The Terminal window you have just requested does not appear.
Note: This seems to only fail periodically if it's the first action performed after starting up Haiku. From my tests I would estimate you can reproduce it 90% of the time.
After this failure I could get another Terminal window by typing "Terminal" in the original Terminal window that Haiku starts by default, but I could not get one from Deskbar or Tracker.
Test setup: VMWare image rev17582 on XP
Attachments (1)
Change History (32)
comment:1 by , 18 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
comment:4 by , 18 years ago
Rechecked on the rev17637 image and it still happens intermittently. :-(
comment:5 by , 18 years ago
(In reply to comment #0)
From the latest (06-04-2006) Buildfactory image... click Terminal from the Be menu or double-click the icon in /boot/beos/apps and the Terminal window never shows. ... type Terminal from the open window, and a new Terminal window opens ... select Start New Terminal from the Terminal menu and the new window opens ... If I close the Terminal that opens when the system boots, I have to re-boot to open a Terminal window.
comment:6 by , 18 years ago
It seems, that you could launch Terminal from processcontroller's replicant.
comment:8 by , 18 years ago
Confirmed in hrev17923 in VMWare that closing the auto-launched Terminal and attempting to restart it from the deskbar fails as described in this bug.
comment:9 by , 18 years ago
Owner: | changed from | to
---|
comment:11 by , 18 years ago
More info:
if started from Terminal, the above loop does this: read returns, handshake.status is PTY_WS, write is called and returns, read returns and handshake.status is PTY_OK. The loop exits. If started from Tracker, read returns, handshake.status is PTY_WS, write is called but never returns.
comment:12 by , 18 years ago
Cc: | added |
---|
follow-up: 14 comment:13 by , 18 years ago
Platform: | → All |
---|
I think I may have found a baby-step of a solution. Somehow, the terminal depends on the filetype "application/x-vnd.Be-SHEL" (from R5) being there. I added it using FileTypes and haven't had a lick of trouble starting Terminal since. I am using 19070 and was having the same startup problems with Terminal.
follow-up: 15 comment:14 by , 18 years ago
Correction to that last post: That file type addition had absolutely NOTHING to do with it... I restarted Haiku and the crashes started again. However, I can successfully start a Terminal window via the ProcessController. Can anyone confirm this?
Replying to mthayes:
I think I may have found a baby-step of a solution. Somehow, the terminal depends on the filetype "application/x-vnd.Be-SHEL" (from R5) being there. I added it using FileTypes and haven't had a lick of trouble starting Terminal since. I am using 19070 and was having the same startup problems with Terminal.
comment:15 by , 18 years ago
Description: | modified (diff) |
---|
Replying to mthayes:
Correction to that last post: That file type addition had absolutely NOTHING to do with it... I restarted Haiku and the crashes started again. However, I can successfully start a Terminal window via the ProcessController. Can anyone confirm this?
Yes. Starting Terminal via ProcessController works 100% of the times, just like starting from Terminal itself. Starting from Tracker, though, only sometimes works.
comment:16 by , 18 years ago
I have the same problem. I did a ping
and pressed CTRL+C
. The whole Terminal closed (instead of only killing ping
) and after that I couldn't open the Terminal, anymore (from Tracker, at least).
comment:17 by , 18 years ago
Interestingly, this seem to be fixed (I tried rebooting thrice, could always launch a new terminal from tracker). Could have been hrev19857 again ?
follow-up: 20 comment:19 by , 18 years ago
Yup, still reproducible with hrev19864 and VMware (ping google.com
and then CTRL+C
).
follow-up: 21 comment:20 by , 18 years ago
Replying to wkornewald:
Yup, still reproducible with hrev19864 and VMware (
ping google.com
and thenCTRL+C
).
That's a different problem (and there's already a bug opened for that one). I was just talking about the inability to launch Terminal.
comment:21 by , 18 years ago
Replying to jackburton:
Replying to wkornewald:
Yup, still reproducible with hrev19864 and VMware (
ping google.com
and thenCTRL+C
).That's a different problem (and there's already a bug opened for that one). I was just talking about the inability to launch Terminal.
No, after that I can't launch Terminal, anymore.
comment:22 by , 18 years ago
To reproduce the problem, I press Alt+N several times. Terminal tries to find which number it should put in its window title. It asks the running instances of Terminal and gets some not yet running apps which can't answer requests. Here is a patch which fixes the problem, please comment
Index: src/servers/registrar/TRoster.cpp =================================================================== --- src/servers/registrar/TRoster.cpp (révision 20011) +++ src/servers/registrar/TRoster.cpp (copie de travail) @@ -705,6 +705,8 @@
for (AppInfoList::Iterator it(fRegisteredApps.It());
RosterAppInfo *info = *it; ++it) {
+ if (info->state != APP_STATE_REGISTERED) + continue;
if (!signature !strcasecmp(signature, info->signature)) reply.AddInt32("teams", info->team);
}
follow-up: 24 comment:23 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied in revision 20014 (to be reviewed).
follow-up: 25 comment:24 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:25 by , 18 years ago
Replying to wkornewald:
Replying to korli:
Applied in revision 20014 (to be reviewed).
Please write hrev20014 instead of "revision", so your changeset gets linked to svnview, automatically.
Thanks for the education :)
Anyway, I've tested it with hrev20015 on VMware and I still can reproduce both bugs.
Then it seems I solved another bug testcase, good for me ;)
comment:27 by , 18 years ago
Cc: | added |
---|
The problem still persists in hrev20387. 100% reproducible in VMWare.
To elaborate a little more on Jack's earlier analysis: The program is terminated in spawn_shell(). fork() succeeds and the parent runs into the handshake loop. It receives PTY_WS and sends a reply. The child runs successfully till the point where it tries to finish the handshake protocol by sending PTY_OK. The write() to cp_pipe[1] never returns. It somehow causes the child to be terminated as well as the parent.
This bug is particularly annoying in combination with bug #113, which closes your first Terminal.
comment:28 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:29 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 31 comment:30 by , 18 years ago
Isn't a bit scary that (from the commit log of hrev20393) applications started from Tracker don't have a valid stderr ?
comment:31 by , 18 years ago
Replying to jackburton:
Isn't a bit scary that (from the commit log of hrev20393) applications started from Tracker don't have a valid stderr ?
Definitely! It's on my ToDo list to fix it. Well, if it still persists, that is. Since Tracker and Deskbar are started by a shell (via fork() + exec()), this might just as well have been a symptom of the CoW bug.
Happens here too. When I launch Terminal from deskbar, a "Terminal" item appears for half a second or so in the deskbar team list, then it disappears, and the Terminal window never shows up.