Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#3711 closed bug (fixed)

Bug in BOutlineListView

Reported by: PieterPanman Owned by: anevilyak
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

When I enable a selection message for an OutlineListView, I get a crash if you select one of the last items, and collapse their parent.

Simple testcase: see attachment. Select last item, and collapse its parent. Boom.

I suspect it is something with the index of the collapsed items.

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-pc-haiku"...(no debugging symbols found)

[tcsetpgrp failed in terminal_inferior: Invalid Argument]
Thread 3349 caused an exception: Segment violation
Reading symbols from /boot/system/runtime_loader...done.
Loaded symbols for /boot/system/runtime_loader
Reading symbols from /boot/system/lib/libroot.so...done.
Loaded symbols for /boot/system/lib/libroot.so
Reading symbols from /boot/system/lib/libbe.so...done.
Loaded symbols for /boot/system/lib/libbe.so
Reading symbols from /boot/system/lib/libstdc++.r4.so...done.
Loaded symbols for /boot/system/lib/libstdc++.r4.so
[tcsetpgrp failed in terminal_inferior: Invalid Argument]
[Switching to team ./TestOutlineListView (3345) thread w>Test (3349)]
0x003f29d6 in BListItem::IsSelected () from /boot/system/lib/libbe.so
(gdb) bt
#0  0x003f29d6 in BListItem::IsSelected () from /boot/system/lib/libbe.so
#1  0x003f5a6e in BListView::Invoke () from /boot/system/lib/libbe.so
#2  0x003a1951 in BInvoker::InvokeNotify () from /boot/system/lib/libbe.so
#3  0x003f57d2 in BListView::Select () from /boot/system/lib/libbe.so
#4  0x004094ee in BOutlineListView::Collapse () from /boot/system/lib/libbe.so
#5  0x0040881d in BOutlineListView::MouseDown () from /boot/system/lib/libbe.so
#6  0x0045d4bf in BWindow::DispatchMessage () from /boot/system/lib/libbe.so
#7  0x00461808 in BWindow::task_looper () from /boot/system/lib/libbe.so
#8  0x003a4e83 in BLooper::_task0_ () from /boot/system/lib/libbe.so
#9  0x00228cd8 in thread_entry () from /boot/system/lib/libroot.so
#10 0x7003ffec in ?? ()

Attachments (1)

TestApp.cpp (742 bytes ) - added by PieterPanman 16 years ago.
Test app

Download all attachments as: .zip

Change History (8)

comment:1 by PieterPanman, 16 years ago

Component: - GeneralKits/Interface Kit

whoops, forgot component.

comment:2 by anevilyak, 16 years ago

Owner: changed from axeld to anevilyak
Status: newassigned

by PieterPanman, 16 years ago

Attachment: TestApp.cpp added

Test app

comment:3 by PieterPanman, 16 years ago

Also, this is not new, I've witnessed this months ago too. (Kept thinking I was doing something wrong :-) )

comment:4 by anevilyak, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev30015.

comment:5 by PieterPanman, 16 years ago

Resolution: fixed
Status: closedreopened

Thanks, the crashing is indeed gone, excellent.

I did however notice some slightly weird behavior. Try the same test application again.

  • Select the last item.
  • collapse its parent
  • expand it again
  • collapse it again
  • expand it again
  • try to select the last item's parent: it is not possible
  • try it again, now you can select it. Weird huh?

Obviously its parent should be selectable on the first click.

In addition to this, (If you agree with it, I will create a new ticket for it), the following request: Say you select a child. In Windows, if I press the left key, it will jump to its parent, if you press it again, it will collapse. In haiku, pressing the left button does not make it jump to its parent. I don't know what the BeOS behavior is, but I find myself using this frequently in Windows.

comment:6 by anevilyak, 16 years ago

Resolution: fixed
Status: reopenedclosed

I can look into both, but please file new tickets for them rather than hijacking this one, as they're entirely different problems.

comment:7 by PieterPanman, 16 years ago

Sure, done. See tickets #3724 and #3725. Thanks.

Note: See TracTickets for help on using tickets.