Opened 9 years ago

Closed 9 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:
Has a Patch: no 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 9 years ago.
LayoutBug2.zip (34.5 KB) - added by cipri 9 years ago.
layoutbug

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by cipri

Attachment: LayoutBug.zip added

Changed 9 years ago by cipri

Attachment: LayoutBug2.zip added

layoutbug

comment:1 Changed 9 years ago by bonefish

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.

comment:2 in reply to:  1 ; Changed 9 years ago by 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.

comment:3 in reply to:  2 ; Changed 9 years ago by cipri

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).

comment:4 in reply to:  3 ; Changed 9 years ago by 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.

comment:5 in reply to:  4 Changed 9 years ago by cipri

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 Changed 9 years ago by cipri

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 Changed 9 years ago by tqh

Resolution: invalid
Status: newclosed

Thanks for reporting back.

Note: See TracTickets for help on using tickets.