Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with BB Editor on project load #1621

Closed
badosu opened this issue Jan 13, 2015 · 19 comments
Closed

Issues with BB Editor on project load #1621

badosu opened this issue Jan 13, 2015 · 19 comments
Labels
Milestone

Comments

@badosu
Copy link
Contributor

badosu commented Jan 13, 2015

So, the BB Editor simply disappears after loading a different project:

2015-01-13-132528_1211x343_scrot

You should be able to reproduce this by simply loading a project that has as many BB Tracks as enough to overflow the BB window vertically, something like 10 tracks should be enough.

You can use this project as a reference: Sidechain. Load the project and click on the BB Editor button to show it. Notice how the BB Editor does not show anything inside the container, and you can't add or edit tracks.

@tresf
Copy link
Member

tresf commented Jan 13, 2015

Recent changes are here.

https://github.com/LMMS/lmms/commits/master/src/gui/editors/SongEditor.cpp

P.S. @lukas-w is already looking into this.

@tresf tresf added the bug label Jan 14, 2015
@tresf tresf added this to the 1.2.0 milestone Jan 14, 2015
@romabysen
Copy link

I have the same problem except I can't get the Beat+Bassline editor window working, no matter how much a click on it or resize it.

@badosu
Copy link
Contributor Author

badosu commented Jan 14, 2015

@romabysen Even after clicking play?

@romabysen
Copy link

Oh wait, I do but only after I have loaded a few songs. After making a new project and then load a song it's back to not working and then I load a few songs and I can get it working by resizing the window.

Edit: it seems a bit random, sometimes I can get it working after loading one song, sometimes I need to load two or more.

@musikBear
Copy link

is this graphic glitch on all platforms -? Never saw it on win 32 (?)
However sometimes some of the gui sliders are 'obscured' (1.1)
'windowing' and back to full-screen fix it, but theee are of the type i like to call 'glitch' or bug2, annoying, but not critical

@badosu
Copy link
Contributor Author

badosu commented Jan 14, 2015

@musikBear @romabysen This was introduced recently and should not be present on any stable version.

I am going to take a look at it.

@romabysen
Copy link

Yep, it was introduced after the 1.1.0 release. I've only built from git source on Linux but I presume it also happen on Windows.

@tresf
Copy link
Member

tresf commented Jan 19, 2015

Partly closed with #1657. Will leave open for BBEditor.

@badosu
Copy link
Contributor Author

badosu commented Jan 20, 2015

Ok, so used git bisect to try find out which commit introduced the bug on the B/B Editor.

However I wasn't able to determine if some commits were good or bad. This is due to the fact that a change on the Timeline source file introduced compiling issues, so I had to skip these. Certainly one of these commits is the offending one:

git bisect skip
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
86f2c86
d8db894
3e9cc61
ec9158c
02006f9
e9d841d
4b27569
c6ee614
44b52eb
d029c85
11898a5
We cannot bisect more!

This is the commit that introduced the Timeline build issue: 11898a5. Let me try fixing this manually and re-running git bisect.

@badosu
Copy link
Contributor Author

badosu commented Jan 20, 2015

So, I really want this issue fixed because it affects the most basic usage of LMMS, and I can't move on to other issues while this is present.

I have a strong feeling that this problem was introduced on d029c85 . @lukas-w Any idea on what should I be looking for to fix this?

@lukas-w
Copy link
Member

lukas-w commented Jan 20, 2015

Hm… What exactly is the issue here? Is the BBEditor's content just not showing up at all or is it misplaced like it was in the song editor? What steps fix the issue when it occurs?

@badosu badosu changed the title Issues with Song/BB Editor on project load Issues with BB Editor on project load Jan 20, 2015
@badosu
Copy link
Contributor Author

badosu commented Jan 20, 2015

@lukas-w

Just updated the description, just load a different project with many BB Instruments, if the quantity is enough so that it overflows the window vertically then the BB Editor becomes unusable.

Here is a project that presents this problem: https://lmms.io/lsp/download_file.php?file=3587&name=sidechain.mmpz

@badosu
Copy link
Contributor Author

badosu commented Jan 20, 2015

@romabysen I discovered the reason why this bug seems random, read the updated description of this issue.

@lukas-w
Copy link
Member

lukas-w commented Jan 21, 2015

@badosu Thanks for the detailed research :)

lukas-w added a commit that referenced this issue Jan 22, 2015
@badosu
Copy link
Contributor Author

badosu commented Jan 22, 2015

Thanks @lukas-w, I am sorry I could not find it by myself. I am still trying to get the hang of the code. :-)

@lukas-w
Copy link
Member

lukas-w commented Jan 22, 2015

Huh? No worries. :) I'm the one who introduced the bug so I'm quite happy that I'm the one who cleans up the mess.
Also note that those parentWidget() calls in saveSettings and loadSettings are more of a hack and we actually shouldn't have them there.

@badosu
Copy link
Contributor Author

badosu commented Jan 22, 2015

Thanks for the description @lukas-w. Let me just ask how did this commit fix the overflow issue, was it by fixing the closeEvent override?

@lukas-w
Copy link
Member

lukas-w commented Jan 22, 2015

The closeEvent thing is just a clean-up. @DanWin introduced this in #1495 while I took a different approach to solving the issue in a different branch in d8db894.

The saveSettings and loadSettings override fixes it (at least I hope it does, have you tested it?). The bad commit was indeed d029c85. In #1426 (Editor Refactoring) I split all editors in two classes, one for the window+toolbar, and one for the actual inner widget (that's BBEditor and BBTrackContainerView here).
The saveSettings and loadSettings methods were supposed to save and restore the editor window's position, size and visibility on project load. They still reside in BBTrackContainerView, the inner widget, though, so when loading a project, the saved data would be applied on the inner widget instead of the actual MDI window. This happened here with hiding the track container widget instead of the window.
I fixed this by overriding the two methods to apply saved settings to the parentWidget(). The right solution (architecturally) would have been to move thm up to BBEditor, but I'll save that for another time.

@badosu
Copy link
Contributor Author

badosu commented Jan 22, 2015

@lukas-w thanks for the detailed explanation, I'll take a look and study it to understand the codebase better. :-)

The saveSettings and loadSettings override fixes it (at least I hope it does, have you tested it?).

Yes it works. Thanks!

mohamed--abdel-maksoud pushed a commit to mohamed--abdel-maksoud/lmms that referenced this issue Feb 3, 2015
mohamed--abdel-maksoud pushed a commit to mohamed--abdel-maksoud/lmms that referenced this issue Feb 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants