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

First day with LibraryViewManager #10

Closed
wants to merge 255 commits into from
Closed

First day with LibraryViewManager #10

wants to merge 255 commits into from

Conversation

jmigual
Copy link

@jmigual jmigual commented Jun 1, 2016

By the way now that I've seen your last message in the Mixxx devel, forget about the getButtonBar(), getLeftPane() and getRightPane() it must be set*() and the LegacySkinParser must setup and style them.

m_pLeftPane = new QStackedWidget;
m_features.resize(RIGHT_PANE_COUNT);

for (int i = 0; i < RIGHT_PANE_COUNT; ++i) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should be done by the Skin, similar how it is working today.

@daschuer
Copy link
Owner

daschuer commented Jun 1, 2016

IMHO you are on th right track, except the skin interaction.

@jmigual
Copy link
Author

jmigual commented Jun 7, 2016

Hi Daniel,
I've made some changes if you want to review them

delete feature;

for (LibraryFeature* f : m_features) {
delete f;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK this looks scary, but works, because of the clear below.
How about using qDeleteAll or use smart pointers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll use qDeleteAll here a smart pointer is not necessary, he have full knowledge of the pointer behaviour


// Must be a unique name for each feature, it must be a unique name for each
// different feature
virtual QString getFeatureName() = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this and its overrides are finally unused :-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! And I forgot to remove it 😓

On Sun, Jul 3, 2016, 12:19 Daniel Schürmann notifications@github.com
wrote:

In src/library/libraryfeature.h
#10 (comment):

 virtual ~LibraryFeature();

 virtual QVariant title() = 0;
 virtual QIcon getIcon() = 0;
  • // Must be a unique name for each feature, it must be a unique name for each
  • // different feature
  • virtual QString getFeatureName() = 0;

It looks like this and its overrides are finally unused :-)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/daschuer/mixxx/pull/10/files/fd67608147f2b65021b6b0e7ce49ddf7a3f9ae47#r69388910,
or mute the thread
https://github.com/notifications/unsubscribe/AGMV00HCev3jAg5TxQrZUrFZuY7Qn-hNks5qR4ycgaJpZM4Ir3iU
.

@daschuer
Copy link
Owner

daschuer commented Jul 3, 2016

There is an issue with your own master branch.
28db1fd
Should not exist.

It looks like it is you intention that your master branch mirrors the mixxxdj/mixxx master branch, but it is not.

The issue starts with e5cb15e
This is not a real issue, since the additional commits seams not to contain code, but we should avoid future null merge commits.

This can be done by resetting your master branch:

git checkout master
git reset upstream/master --hard

You should also remove the latest null merge commit by redo the master merge:

git checkout feature/libraryManager
git reset b0fd7c7
git add src/test/durationutiltest.cpp src/util/duration.cpp
git stash
git merge upstream/master -s ours
git stash pop
git commit -a --amend
git push -f

@jmigual jmigual mentioned this pull request Jul 7, 2016
PlaylistDAO &m_playlistDao;
TrackDAO &m_trackDao;
PlaylistTableModel* m_pPlaylistTableModel;
QPointer<PlaylistTableModel> m_pPlaylistTableModel;
QHash<int, QPointer<PlaylistTableModel> > m_playlistTableModel;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is hard to distinguish m_pPlaylistTableModel from m_playlistTableModel.
How about m_playlistTableModelHash?

Can m_playlistTableModelHash become private?

Since both are protected members the lifetime, should be clear.
Or are they used outside the creating class after the feature is gone?

@jmigual
Copy link
Author

jmigual commented Jul 12, 2016

Yes m_playlistTableModelHash can become private. It's access is done only in the getPlaylistTableModel function, I'll change it

@jmigual jmigual closed this Jan 15, 2017
@jmigual jmigual deleted the feature/libraryManager branch January 24, 2017 21:39
daschuer pushed a commit that referenced this pull request Mar 16, 2017
daschuer pushed a commit that referenced this pull request Oct 8, 2017
daschuer pushed a commit that referenced this pull request Jun 15, 2020
update Novation Launchpad controller scripts
daschuer pushed a commit that referenced this pull request Jan 3, 2021
function pointers for signal-slot connections in effects system
daschuer pushed a commit that referenced this pull request Jan 3, 2021
Fix reading/writing of library.last_played_at
daschuer pushed a commit that referenced this pull request Mar 16, 2022
…h sync

When loading a track that is not yet present in the library (and thus
doesn't have any BPM because it hasn't been analyzed yet) while another
deck is playing and both decks have sync enabled, a debug assertion is
triggered:

    DEBUG ASSERT: "isValid()" in function double mixxx::Bpm::value() const at src/track/bpm.h:53
    Aborted (core dumped)

The backtrace looks as follows:

    #0  0x00007f175c87234c in __pthread_kill_implementation () at /usr/lib/libc.so.6
    #1  0x00007f175c8254b8 in raise () at /usr/lib/libc.so.6
    #2  0x00007f175c80f534 in abort () at /usr/lib/libc.so.6
    #3  0x00007f175cf05ee4 in qt_assert(char const*, char const*, int) () at /usr/lib/libQt5Core.so.5
    #4  0x000055deb2e67e1c in mixxx::(anonymous namespace)::handleMessage(QtMsgType, QMessageLogContext const&, QString const&) (type=<optimized out>, context=<optimized out>, input=<optimized out>) at src/util/logging.cpp:355
    #5  0x00007f175cf47128 in  () at /usr/lib/libQt5Core.so.5
    #6  0x00007f175cf3fd8a in  () at /usr/lib/libQt5Core.so.5
    #7  0x00007f175cf06526 in QMessageLogger::critical(char const*, ...) const () at /usr/lib/libQt5Core.so.5
    #8  0x000055deb2e5c720 in mixxx_debug_assert(char const*, char const*, int, char const*) (assertion=assertion@entry=0x55deb39bd0db "isValid()", file=file@entry=0x55deb39bbf30 "src/track/bpm.h", line=line@entry=53, function=function@entry=0x55deb39bbf08 "double mixxx::Bpm::value() const") at gsrc/util/assert.h:9
    #9  0x000055deb2ee7e7e in mixxx_debug_assert_return_true(char const*, char const*, int, char const*) (function=0x55deb39bbf08 "double mixxx::Bpm::value() const", line=53, file=0x55deb39bbf30 "src/track/bpm.h", assertion=0x55deb39bd0db "isValid()") at gsrc/util/assert.h:18
    #10 mixxx::Bpm::value() const (this=<synthetic pointer>) at src/track/bpm.h:53
    #11 mixxx::operator*(mixxx::Bpm, double) (multiple=1, bpm=...) at src/track/bpm.h:160
    #12 SyncControl::setLocalBpm(mixxx::Bpm) (this=<optimized out>, localBpm=...) at src/engine/sync/synccontrol.cpp:567
    #13 0x000055deb34c7ba3 in EngineBuffer::postProcess(int) (this=0x55deb56eb060, iBufferSize=2048) at src/engine/enginebuffer.cpp:1318
    #14 0x000055deb3139023 in EngineMaster::processChannels(int) (this=0x55deb5449440, iBufferSize=<optimized out>) at src/engine/enginemaster.cpp:383
    #15 0x000055deb31394f7 in EngineMaster::process(int) (this=0x55deb5449440, iBufferSize=iBufferSize@entry=2048) at src/engine/enginemaster.cpp:410
    #16 0x000055deb2f91d0b in SoundManager::onDeviceOutputCallback(long) (this=<optimized out>, iFramesPerBuffer=iFramesPerBuffer@entry=1024) at src/soundio/soundmanager.cpp:596
    #17 0x000055deb32dd794 in SoundDevicePortAudio::callbackProcessClkRef(long, float*, float const*, PaStreamCallbackTimeInfo const*, unsigned long) (this=0x55deb553e6b0, framesPerBuffer=1024, out=<optimized out>, in=<optimized out>, timeInfo=<optimized out>, statusFlags=<optimized out>) at src/soundio/sounddeviceportaudio.cpp:965

This happens because `newLocalBpm` is invalid when `localBpm` is
invalid. Trying to do sync decks while no tempo information is available
does not make sense, so we only synchronize decks if the local BPM is
available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants