crash on macOS when loading Shade

Bug #1760170 reported by Be
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Unassigned

Bug Description

This occurs when loading the Shade skin by pressing Apply in the preferences. When restarting Mixxx, it crashes on startup. Starting up works again after manually editing mixxx.cfg to use a different skin.

Revision history for this message
Be (be.ing) wrote :
Revision history for this message
Be (be.ing) wrote :
Changed in mixxx:
milestone: none → 2.1.0
importance: Undecided → High
Revision history for this message
Daniel Schürmann (daschuer) wrote :

QImage::rect() is only rarly used.
In wspinny.cpp, waveformrenderbackground.cpp and waveformmarkrange.

Can you reproduce the crash without spinnies and waveforms?

Revision history for this message
jus (jus) wrote :

When switching to Shade from a skin with cover display on spinny enabled, the cover mask defininiton is expected, but not defined in
https://github.com/mixxxdj/mixxx/blob/master/res/skins/Shade/deck.xml#L220

So adding a mask.png, and something like
<PathMask>mask.svg</PathMask>
<ShowCover>true</ShowCover>

should do it.

Changed in mixxx:
status: New → Confirmed
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This cannot be the issue, because the Deere spinny with the cover art is destroyed first.
The Shade spinny with no coverart and m_pMaskImage == nullptr is initialized. m_pMaskImage is allways checked for null.
It is more likely, that the waveforms or spinny are still accessed even though they are already destroyed. So it might be an occurrence of https://bugs.launchpad.net/mixxx/+bug/1759637 or such.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Can you switch to Shade without loading a track before?
Can you start with Shade by editing the mixxx.cfg file?

Revision history for this message
jus (jus) wrote :
Download full text (5.9 KiB)

Tested again, Mixxx crashed with
....
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x400000005)
    frame #0: 0x00000001014ea4b4 QtGui`QImage::rect() const + 20
QtGui`QImage::rect:
-> 0x1014ea4b4 <+20>: movl 0x4(%rax), %ecx
    0x1014ea4b7 <+23>: addl %edx, %ecx
    0x1014ea4b9 <+25>: movl 0x8(%rax), %edx
    0x1014ea4bc <+28>: decl %edx
Target 0: (mixxx) stopped.
(lldb) thread backtrace all
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x400000005)
  * frame #0: 0x00000001014ea4b4 QtGui`QImage::rect() const + 20
    frame #1: 0x00000001005ef90c mixxx`WSpinny::paintEvent(this=0x000000012a09ce30, e=<unavailable>) at wspinny.cpp:340 [opt]
    frame #2: 0x00000001014b835d QtGui`QWidget::event(QEvent*) + 2349
    frame #3: 0x00000001020cb042 QtOpenGL`QGLWidget::event(QEvent*) + 82
    frame #4: 0x0000000101460b0d QtGui`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
    frame #5: 0x0000000101464d68 QtGui`QApplication::notify(QObject*, QEvent*) + 232
    frame #6: 0x000000010119f54c QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
    frame #7: 0x00000001014b5d9e QtGui`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1374
    frame #8: 0x000000010140535a QtGui`-[QCocoaView drawRect:] + 1786
    frame #9: 0x00007fff45cf1c21 AppKit`_NSViewDrawRect + 83
    frame #10: 0x00007fff4558ab38 AppKit`-[NSView _drawRect:clip:] + 1819
    frame #11: 0x00007fff455d2f62 AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1735
    frame #12: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #13: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #14: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #15: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #16: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #17: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #18: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #19: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #20: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #21: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #22: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #23: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #24: 0x00007fff455d342f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964
    frame #25: 0x00007fff45588a52 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 938
    frame #26: 0x00007fff455881d...

Read more...

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It looks like WImageStore::getImage(const PixmapSource& source, double scaleFactor) {
Returns an invalid pointer.

Please try if a

if (source.isEmpty()) {
    return nullptr;
}

At the top of the function

And in:

QString makeSkinPath(const QString& relativePath) const {
        if (relatvePath.isEmpty() || relativePath.startsWith("/") || relativePath.contains(":")) {

Fixes the issue.

Revision history for this message
Daniel Schürmann (daschuer) wrote :
Be (be.ing)
Changed in mixxx:
status: Confirmed → Fix Committed
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/9206

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.