Opened 6 years ago

Closed 5 years ago

#9975 closed bug (fixed)

[Terminal] crashes after closing inactive tab via middle click

Reported by: diver Owned by: jackburton
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1/Development
Keywords: Cc: siarzhuk
Blocked By: Blocking:
Has a Patch: yes Platform: All


This is hrev46096.

Open two tabs in Terminal and close the first one using middle click.

thread 1485: w>Terminal 2: Desktop: -- 
		state: Call (AddChild failed - the view already has a parent.)
		0x723cfe00	0x18e9aa9	debugger + 0x39
		0x723cfe38	0x82c7c8	BView::_AddChild(BView*) + 0x38
		0x723cfe68	0x82c700	BView::AddChild(BView*) + 0x24
		0x723cfe98	0x808649	BTab::Select(BView*) + 0x59
		0x723cff28	0x80a322	BTabView::Select(int32) + 0x11a
		0x723cff88	0x5401c0	SmartTabView::Select(int32) + 0x20
		0x723cffb8	0x80bcfe	BTabView::RemoveTab(int32) + 0xee
		0x723d0038	0x5407f5	SmartTabView::RemoveTab(int32) + 0x21d
		0x723d0068	0x55fd49	TermWindow::_RemoveTab(int32) + 0x145
		0x723d0098	0x5602d6	TermWindow::TabMiddleClicked(SmartTabView*, BPoint, int32) + 0x22
		0x723d00e8	0x54011d	SmartTabView::MouseDown(BPoint) + 0x169
		0x723d02f8	0x8355e5	BWindow::DispatchMessage(BMessage*, BHandler*) + 0xf49
		0x723d0358	0x83a59a	BWindow::task_looper() + 0x26e
		0x723d0388	0x75b779	BLooper::_task0_(void*) + 0x3d
		0x723d03b0	0x18ee1a1	thread_entry + 0x21
		00000000	0x622a6250	commpage_thread_exit + 0

Attachments (2) (10.2 KB ) - added by gbonvehi 6 years ago.
Log from bug reproduced by closing term tabs
0001-TabView-BTab-Select-only-add-child-if-it-doesn-t-hav.patch (813 bytes ) - added by gbonvehi 6 years ago.
Fix Select trying to re-add a childtext/html

Download all attachments as: .zip

Change History (6)

comment:1 by gbonvehi, 6 years ago

Has a Patch: set

comment:2 by gbonvehi, 6 years ago

I've attach a patch which should fix this issue. There's another way to reproduce this: Open a Terminal, spawn 3 tabs, and move the last tab to the right (ALT+SHIFT+Right) and it will crash by the same issue reported here.

by gbonvehi, 6 years ago

Log from bug reproduced by closing term tabs

by gbonvehi, 6 years ago

Fix Select trying to re-add a childtext/html

comment:3 by gbonvehi, 6 years ago

Re made the patch correcting code style. Thanks to Skipp for the observation.

comment:4 by jessicah, 5 years ago

Resolution: fixed
Status: newclosed

Applied in hrev47168

Note: See TracTickets for help on using tickets.