Crash in DropShadow::drawForPath

I draw a relatively complex path for the waveform view. Because it looks nice, i also drop a shadow to it :) 

A user now had a crash in the drop shadow routine. It happened when he dragged a file into the view. I have a timer on this UI to trigger repaints but the drag and drop maybe also calls repaint. I don't think it has something to do with the drop shadow function itself. Maybe something i don't understand.

Is it save to call repaint by a timer?


Process:               Logic Pro X [549]
Path:                  /Applications/Logic Pro Pro X
Code Type:             X86-64 (Native)
OS Version:            Mac OS X 10.10.2 (14C109)
Crashed Thread:        0  Dispatch queue:
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Application Specific Information:
Assertion failed: (CGFloatIsValid(x) && CGFloatIsValid(y)), function void CGPathMoveToPoint(CGMutablePathRef, const CGAffineTransform *, CGFloat, CGFloat), file Paths/, line 254.

Thread 0 Crashed:: Dispatch queue:
0   libsystem_kernel.dylib            0x00007fff963fe286 __pthread_kill + 10
1   libsystem_c.dylib             0x00007fff9b5bab53 abort + 129
2   libsystem_c.dylib             0x00007fff9b582c39 __assert_rtn + 321
3            0x00007fff8ce5da40 CGPathMoveToPoint + 183
4   ch.toguaudioline.talsampler   0x00000001374674d0 juce::CoreGraphicsContext::createPath(juce::Path const&) const + 118
5   ch.toguaudioline.talsampler   0x000000013746742e juce::CoreGraphicsContext::fillPath(juce::Path const&, juce::AffineTransform const&) + 398
6   ch.toguaudioline.talsampler   0x000000013746487e juce::DropShadow::drawForPath(juce::Graphics&, juce::Path const&) const + 846
7   ch.toguaudioline.talsampler   0x000000013759101c TalBigWaveAreaComponent::paint(juce::Graphics&) + 3548
8   ch.toguaudioline.talsampler   0x00000001374a2919 juce::Component::paintComponentAndChildren(juce::Graphics&) + 131
9   ch.toguaudioline.talsampler   0x00000001374a2634 juce::Component::paintWithinParentContext(juce::Graphics&) + 74
10  ch.toguaudioline.talsampler   0x00000001374a2a6b juce::Component::paintComponentAndChildren(juce::Graphics&) + 469
11  ch.toguaudioline.talsampler   0x00000001374a2634 juce::Component::paintWithinParentContext(juce::Graphics&) + 74
12  ch.toguaudioline.talsampler   0x00000001374a2a6b juce::Component::paintComponentAndChildren(juce::Graphics&) + 469
13  ch.toguaudioline.talsampler   0x00000001374a2634 juce::Component::paintWithinParentContext(juce::Graphics&) + 74
14  ch.toguaudioline.talsampler   0x00000001374a2a6b juce::Component::paintComponentAndChildren(juce::Graphics&) + 469


Have you debugged to see why your pointer is equal to nullptr ?


I was not able to reproduce it on my system. I will try again... Only one user reported this issue so far.