Opened 14 years ago

Closed 14 years ago

#5736 closed bug (invalid)

LayoutBug, AlignLayoutWith, SplitLayout

Reported by: cipri Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Perhaps it's related again to BGLView (and AlignLayoutWith)

I attached source code and binary which show the bug.

Start the program, then press on "Start" (button), and then resize the SplitLayout (the bar in the middle). Drag the middle bar completely from left to right and vice versa, and you should be able to see the bug. (If the Start button is not pressed, than the resizing works correctly).

Attachments (2)

LayoutBug.zip (34.5 KB ) - added by cipri 14 years ago.
LayoutBug2.zip (34.5 KB ) - added by cipri 14 years ago.
layoutbug

Download all attachments as: .zip

Change History (9)

by cipri, 14 years ago

Attachment: LayoutBug.zip added

by cipri, 14 years ago

Attachment: LayoutBug2.zip added

layoutbug

comment:1 by bonefish, 14 years ago

Priority: lownormal
Version: R1/alpha1R1/Development

I think the problem is that the split view doesn't deal correctly with layout invalidations (caused by BStringView::SetText() each second) while dragging.

in reply to:  1 ; comment:2 by cipri, 14 years ago

Replying to bonefish:

I think the problem is that the split view doesn't deal correctly with layout invalidations (caused by BStringView::SetText() each second) while dragging.

Perhaps, but I'm not so sure about that. In the source code, AlignLayoutWith is called two times. If one of them is uncommented, then (if I can remember correctly) it works correctly. So perhaps it is related to the alignment.

in reply to:  2 ; comment:3 by cipri, 14 years ago

Replying to cipri:

Replying to bonefish:

I think the problem is that the split view doesn't deal correctly with layout invalidations (caused by BStringView::SetText() each second) while dragging.

Perhaps, but I'm not so sure about that. In the source code, AlignLayoutWith is called two times. If one of them is uncommented, then (if I can remember correctly) it works correctly. So perhaps it is related to the alignment.

sorry, I remembered it wrong :P. (it's the same, if one or two alignments). (I confused it with something similar ) In the source code, you find these two lines:

leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );

if you make a little change, and turn them into:

leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );

then the program crashes.

I think both variants should work the same fact is, that the second variant crashes the program. (and this didn't happen, before BGLView - bug (which I reported some time ago) was fixed).

in reply to:  3 ; comment:4 by bonefish, 14 years ago

Replying to cipri:

In the source code, you find these two lines:

leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );

if you make a little change, and turn them into:

leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );

then the program crashes.

I see no difference between those lines.

in reply to:  4 comment:5 by cipri, 14 years ago

Replying to bonefish:

Replying to cipri:

In the source code, you find these two lines:

leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );

if you make a little change, and turn them into:

leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );

then the program crashes.

I see no difference between those lines.

sorry, I wrote two times the same. Now the correct information:

In the source (mainwindow.cpp) you find the two lines leftLayout->AlignLayoutWith( middleLayout, B_VERTICAL ); rightLayout->AlignLayoutWith( middleLayout, B_VERTICAL );

now if you change the second line from rightLayout->AlignLayoutWith( middleLayout, B_VERTICAL );

into: middleLayout->AlignLayoutWith( rightLayout, B_VERTICAL );

the program crashes and the debugger is called.

(and I think, it didn't crash before bug #5522 was fixed).

comment:6 by cipri, 14 years ago

it seems this bug has been solved, i tried it today, and it works like it is expected. So I think it can be closed. And thank you for solving it :-)

comment:7 by tqh, 14 years ago

Resolution: invalid
Status: newclosed

Thanks for reporting back.

Note: See TracTickets for help on using tickets.