#18716 closed bug (fixed)

Crash in BListView::MouseUp()

Reported by: jackburton Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: Kits/Interface Kit Version: R1/Development
Keywords: BListView Cc:
Blocked By: Blocking:
Platform: All

Description

The attached application crashes in BListView::MouseUp().

Seems the problem could be the changes in https://cgit.haiku-os.org/haiku/commit/?id=6761bf581fd14cac9fd22825fa6baa399263dc83

Specifically, these lines:

-	uint32* buttons = 0;
-	GetMouse(&where, buttons);
+	// if mouse up selection is invalid reselect mouse down selection
+	if (index == -1)
+		index = fTrack->item_index;

where index can be set to an invalid item (0) in certain cases. I encountered the bug myself in Genio. The problem was debugged and tracked down by Andrea Anzani, which also provided the test application.

For reference, here's a link to the Genio issue: https://github.com/Genio-The-Haiku-IDE/Genio/issues/228

Attachments (1)

BListViewCrash.zip (7.4 KB ) - added by jackburton 11 months ago.

Download all attachments as: .zip

Change History (3)

by jackburton, 11 months ago

Attachment: BListViewCrash.zip added

comment:1 by waddlesplash, 11 months ago

Milestone: UnscheduledR1/beta5

comment:2 by waddlesplash, 11 months ago

Resolution: fixed
Status: newclosed

Fix merged in hrev57476.

Note: See TracTickets for help on using tickets.