sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.79k stars 922 forks source link

Segmentation violation in DrawLissajous #3027

Closed emlyn closed 2 years ago

emlyn commented 2 years ago

I was just trying out the Sonic Pi v4 beta 3 from Patreon (on MacOS), and every time I enable the Lissajous scope in the preferences it immediately crashes with a segmentation violation in the DrawLissajous function (a MacOS problem report window pops up shortly after it dies). I'm on an M1 Mac on MacOS 12.2.1. The other scope modes all work fine, and they all work (including Lissajous) on Sonic Pi 3.3.1.

Here are the error report details: ``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Sonic Pi [72558] Path: /Applications/Sonic Pi v4 BETA 3.app/Contents/MacOS/Sonic Pi Identifier: net.sonic-pi.app Version: 4.0.0 (4.0.0) Code Type: X86-64 (Translated) Parent Process: launchd [1] User ID: 501 Date/Time: 2022-02-24 16:38:41.4680 +0000 OS Version: macOS 12.2.1 (21D62) Report Version: 12 Anonymous UUID: E5D3F08D-388C-C4FE-8099-6C60B9DC15A2 Sleep/Wake UUID: 29074F66-A3C8-433C-89DE-663732D404CC Time Awake Since Boot: 87000 seconds Time Since Wake: 915 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000600400116624 Exception Codes: 0x0000000000000001, 0x0000600400116624 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [72558] VM Region Info: 0x600400116624 is not in any region. Bytes after previous region: 16644138533 Bytes before following region: 34850571459036 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-/rwx SM=NUL ...(unallocated) ---> GAP OF 0x1fb628000000 BYTES MALLOC_MEDIUM 7fb648000000-7fb648800000 [ 8192K] rw-/rwx SM=PRV Kernel Triage: VM - pmap_enter failed with resource shortage Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 Sonic Pi 0x1042ca652 SonicPi::ScopeWindow::DrawLissajous(SonicPi::ProcessedAudio const&, QPainter&, SonicPi::ScopeWindowPanel&) + 466 1 Sonic Pi 0x1042caec4 SonicPi::ScopeWindow::paintEvent(QPaintEvent*) + 1732 2 QtWidgets 0x10f3dff95 QWidget::event(QEvent*) + 1093 3 QtWidgets 0x10f3a6a56 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262 4 QtWidgets 0x10f3a7e02 QApplication::notify(QObject*, QEvent*) + 466 5 QtCore 0x111e6c2b6 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 166 6 QtWidgets 0x10f3d9f0b QWidgetPrivate::sendPaintEvent(QRegion const&) + 43 7 QtWidgets 0x10f3b4099 0x10f393000 + 135321 8 QtWidgets 0x10f3b42b2 0x10f393000 + 135858 9 QtWidgets 0x10f3e01be QWidget::event(QEvent*) + 1646 10 QtWidgets 0x10f4f1094 QMainWindow::event(QEvent*) + 276 11 QtWidgets 0x10f3a6a56 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262 12 QtWidgets 0x10f3a7e02 QApplication::notify(QObject*, QEvent*) + 466 13 QtCore 0x111e6c2b6 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 166 14 QtCore 0x111e6d3f3 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 803 15 libqcocoa.dylib 0x1116a8892 0x11166c000 + 247954 16 libqcocoa.dylib 0x1116a8f98 0x11166c000 + 249752 17 CoreFoundation 0x7ff80d274c08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 18 CoreFoundation 0x7ff80d274b70 __CFRunLoopDoSource0 + 180 19 CoreFoundation 0x7ff80d2748e3 __CFRunLoopDoSources0 + 242 20 CoreFoundation 0x7ff80d2732ff __CFRunLoopRun + 897 21 CoreFoundation 0x7ff80d2728a9 CFRunLoopRunSpecific + 567 22 HIToolbox 0x7ff8162fe4f1 RunCurrentEventLoopInMode + 292 23 HIToolbox 0x7ff8162fe118 ReceiveNextEventCommon + 284 24 HIToolbox 0x7ff8162fdfe5 _BlockUntilNextEventMatchingListInModeWithFilter + 70 25 AppKit 0x7ff80fbc8d88 _DPSNextEvent + 886 26 AppKit 0x7ff80fbc73f4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1411 27 AppKit 0x7ff80fbb9919 -[NSApplication run] + 586 28 libqcocoa.dylib 0x1116a7d74 0x11166c000 + 245108 29 QtCore 0x111e686b7 QEventLoop::exec(QFlags) + 471 30 QtCore 0x111e6c852 QCoreApplication::exec() + 130 31 Sonic Pi 0x1042a17d1 main + 849 32 dyld 0x205f384fe start + 462 Thread 1:: com.apple.rosetta.exceptionserver 0 runtime 0x7ff7ffee48e4 0x7ff7ffee0000 + 18660 1 runtime 0x7ff7ffef1928 0x7ff7ffee0000 + 71976 2 runtime 0x7ff7ffef30a4 0x7ff7ffee0000 + 77988 Thread 2: 0 runtime 0x7ff7fff02814 0x7ff7ffee0000 + 141332 Thread 3: 0 runtime 0x7ff7fff02814 0x7ff7ffee0000 + 141332 Thread 4:: Dispatch queue: glmtl.ioSurfaceNotifierQueue 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d171aba mach_msg_trap + 10 2 libdispatch.dylib 0x7ff80d00f0a3 dispatch_mig_server + 220 3 libdispatch.dylib 0x7ff80cff4cc9 _dispatch_client_callout + 8 4 libdispatch.dylib 0x7ff80cff7746 _dispatch_continuation_pop + 460 5 libdispatch.dylib 0x7ff80d008a5a _dispatch_source_invoke + 2150 6 libdispatch.dylib 0x7ff80cffab85 _dispatch_lane_serial_drain + 335 7 libdispatch.dylib 0x7ff80cffb7c8 _dispatch_lane_invoke + 366 8 libdispatch.dylib 0x7ff80d0057e1 _dispatch_workloop_worker_thread + 758 9 libsystem_pthread.dylib 0x7ff80d1ab074 _pthread_wqthread + 326 10 libsystem_pthread.dylib 0x7ff80d1a9ffb start_wqthread + 15 Thread 5:: Thread (pooled) 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d174506 __psynch_cvwait + 10 2 QtCore 0x111caf620 0x111c86000 + 169504 3 QtCore 0x111caf37e 0x111c86000 + 168830 4 QtCore 0x111caf2f3 QWaitCondition::wait(QMutex*, QDeadlineTimer) + 83 5 QtCore 0x111cabd5d 0x111c86000 + 154973 6 QtCore 0x111ca78a9 0x111c86000 + 137385 7 libsystem_pthread.dylib 0x7ff80d1ae4f4 _pthread_start + 125 8 libsystem_pthread.dylib 0x7ff80d1aa00f thread_start + 15 Thread 6:: Thread (pooled) 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d174506 __psynch_cvwait + 10 2 QtCore 0x111caf620 0x111c86000 + 169504 3 QtCore 0x111caf37e 0x111c86000 + 168830 4 QtCore 0x111caf2f3 QWaitCondition::wait(QMutex*, QDeadlineTimer) + 83 5 QtCore 0x111cabd5d 0x111c86000 + 154973 6 QtCore 0x111ca78a9 0x111c86000 + 137385 7 libsystem_pthread.dylib 0x7ff80d1ae4f4 _pthread_start + 125 8 libsystem_pthread.dylib 0x7ff80d1aa00f thread_start + 15 Thread 7:: Thread (pooled) 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d174506 __psynch_cvwait + 10 2 QtCore 0x111caf620 0x111c86000 + 169504 3 QtCore 0x111caf37e 0x111c86000 + 168830 4 QtCore 0x111caf2f3 QWaitCondition::wait(QMutex*, QDeadlineTimer) + 83 5 QtCore 0x111cabd5d 0x111c86000 + 154973 6 QtCore 0x111ca78a9 0x111c86000 + 137385 7 libsystem_pthread.dylib 0x7ff80d1ae4f4 _pthread_start + 125 8 libsystem_pthread.dylib 0x7ff80d1aa00f thread_start + 15 Thread 8: 0 runtime 0x7ff7fff02814 0x7ff7ffee0000 + 141332 Thread 9:: com.apple.NSEventThread 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d171aba mach_msg_trap + 10 2 CoreFoundation 0x7ff80d274df1 __CFRunLoopServiceMachPort + 319 3 CoreFoundation 0x7ff80d2734af __CFRunLoopRun + 1329 4 CoreFoundation 0x7ff80d2728a9 CFRunLoopRunSpecific + 567 5 AppKit 0x7ff80fd36fd8 _NSEventThread + 132 6 libsystem_pthread.dylib 0x7ff80d1ae4f4 _pthread_start + 125 7 libsystem_pthread.dylib 0x7ff80d1aa00f thread_start + 15 Thread 10: 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d1743da __semwait_signal + 10 2 libc++.1.dylib 0x7ff80d117c11 std::__1::this_thread::sleep_for(std::__1::chrono::duration > const&) + 73 3 Sonic Pi 0x104274fe8 void std::__1::this_thread::sleep_for >(std::__1::chrono::duration > const&) + 1560 4 Sonic Pi 0x1042ffb90 0x104168000 + 1670032 5 Sonic Pi 0x1042ff651 0x104168000 + 1668689 6 libsystem_pthread.dylib 0x7ff80d1ae4f4 _pthread_start + 125 7 libsystem_pthread.dylib 0x7ff80d1aa00f thread_start + 15 Thread 11: 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d179e4a __select + 10 2 Sonic Pi 0x10431e3bb SonicPi::OscServerUDP::start() + 2075 3 Sonic Pi 0x104302e61 0x104168000 + 1683041 4 Sonic Pi 0x104302be1 0x104168000 + 1682401 5 libsystem_pthread.dylib 0x7ff80d1ae4f4 _pthread_start + 125 6 libsystem_pthread.dylib 0x7ff80d1aa00f thread_start + 15 Thread 12: 0 ??? 0x7ff89d73e940 ??? 1 libsystem_kernel.dylib 0x7ff80d1743da __semwait_signal + 10 2 libc++.1.dylib 0x7ff80d117c11 std::__1::this_thread::sleep_for(std::__1::chrono::duration > const&) + 73 3 Sonic Pi 0x104325c67 SonicPi::AudioProcessor::Run() + 3799 4 Sonic Pi 0x104337998 0x104168000 + 1898904 5 Sonic Pi 0x104337731 0x104168000 + 1898289 6 libsystem_pthread.dylib 0x7ff80d1ae4f4 _pthread_start + 125 7 libsystem_pthread.dylib 0x7ff80d1aa00f thread_start + 15 Thread 13: 0 runtime 0x7ff7fff02814 0x7ff7ffee0000 + 141332 Thread 14: 0 runtime 0x7ff7fff02814 0x7ff7ffee0000 + 141332 Thread 15: 0 runtime 0x7ff7fff02814 0x7ff7ffee0000 + 141332 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000600000117620 rbx: 0x0000600000118080 rcx: 0x00007fb6b70543a0 rdx: 0x00000000fffffc01 rdi: 0x000000030e14fc40 rsi: 0x00000000fffffc01 rbp: 0x000000030e14fd30 rsp: 0x000000030e14fc30 r8: 0x00007fb6b7a97800 r9: 0x0000000000002000 r10: 0x0000000000000000 r11: 0x0000000000000000 r12: 0x00007fb6b7054500 r13: 0x00007fb6b70543a0 r14: 0x000000030e150201 r15: 0x000000030e150270 rip: 0x00000001042ca652 rfl: 0x0000000000000283 tmp0: 0x0000000000000000 tmp1: 0x00000001042ca5f6 tmp2: 0x0000000105ecc2c8 Binary Images: 0x104168000 - 0x105b55fff net.sonic-pi.app (4.0.0) <92fdad7c-9a3a-3128-a592-ffcc3894770a> /Applications/Sonic Pi v4 BETA 3.app/Contents/MacOS/Sonic Pi 0x10f393000 - 0x10f7defff org.qt-project.QtWidgets (5.15) /Applications/Sonic Pi v4 BETA 3.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 0x111c86000 - 0x1121c9fff org.qt-project.QtCore (5.15) <103a2350-5a72-30ff-8dae-31642d830707> /Applications/Sonic Pi v4 BETA 3.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 0x11166c000 - 0x1117d3fff libqcocoa.dylib (*) <6fe65bbe-99db-37e9-a8e5-566f444d4b50> /Applications/Sonic Pi v4 BETA 3.app/Contents/PlugIns/platforms/libqcocoa.dylib 0x7ff80d1f5000 - 0x7ff80d6f5fff com.apple.CoreFoundation (6.9) <1d1db08b-810c-316e-b9d9-eecdff8ee6e3> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7ff8162cc000 - 0x7ff8165c3fff com.apple.HIToolbox (2.1.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x7ff80fb8a000 - 0x7ff810a1bfff com.apple.AppKit (6.9) <9d3ab204-4858-3120-b002-5c38b02edec4> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x205f33000 - 0x205f9efff dyld (*) <7de33963-bbc5-3996-ba6e-f1d562c17c95> /usr/lib/dyld 0x7ff7ffee0000 - 0x7ff7fff0ffff runtime (*) /usr/libexec/rosetta/runtime 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ??? 0x7ff80d171000 - 0x7ff80d1a7fff libsystem_kernel.dylib (*) /usr/lib/system/libsystem_kernel.dylib 0x7ff80cff2000 - 0x7ff80d038fff libdispatch.dylib (*) <67d92c93-aa68-34c2-964b-23e8a8d32098> /usr/lib/system/libdispatch.dylib 0x7ff80d1a8000 - 0x7ff80d1b3fff libsystem_pthread.dylib (*) /usr/lib/system/libsystem_pthread.dylib 0x7ff80d102000 - 0x7ff80d15afff libc++.1.dylib (*) /usr/lib/libc++.1.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 420 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=989.7M resident=0K(0%) swapped_out_or_unallocated=989.7M(100%) Writable regions: Total=1.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Accelerate framework 384K 3 Activity Tracing 256K 1 CG backing stores 2176K 4 CG image 100K 4 ColorSync 228K 25 CoreAnimation 100K 8 CoreGraphics 12K 2 CoreServices 352K 2 CoreUI image data 1424K 10 Foundation 16K 1 Kernel Alloc Once 8K 1 MALLOC 319.1M 58 MALLOC guard page 192K 9 MALLOC_MEDIUM (reserved) 960.0M 8 reserved VM address space (unallocated) MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated) OpenGL GLSL 256K 3 Rosetta Arena 4096K 2 Rosetta Generic 1240K 307 Rosetta IndirectBranch 1024K 1 Rosetta JIT 128.0M 1 Rosetta Return Stack 300K 30 Rosetta Thread Context 300K 30 STACK GUARD 24K 6 Stack 15.2M 16 Stack Guard 56.0M 9 VM_ALLOCATE 3572K 47 VM_ALLOCATE (reserved) 44K 5 reserved VM address space (unallocated) __DATA 20.2M 338 __DATA_CONST 12.3M 181 __DATA_DIRTY 549K 101 __FONT_DATA 4K 1 __GLSLBUILTINS 5176K 1 __LINKEDIT 706.8M 37 __OBJC_RO 81.8M 1 __OBJC_RW 3136K 2 __TEXT 282.8M 348 __UNICODE 588K 1 dyld private memory 1024K 1 mapped file 5.4G 492 shared memory 816K 16 unshared pmap 10.3M 8 =========== ======= ======= TOTAL 8.3G 2122 TOTAL, minus reserved VM space 7.0G 2122 ----------- Full Report ----------- {"app_name":"Sonic Pi","timestamp":"2022-02-24 16:38:44.00 +0000","app_version":"4.0.0","slice_uuid":"92fdad7c-9a3a-3128-a592-ffcc3894770a","build_version":"4.0.0","platform":1,"bundleID":"net.sonic-pi.app","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.2.1 (21D62)","incident_id":"A6D6A364-5F19-4AF1-A678-6358DE427DB6","name":"Sonic Pi"} { "uptime" : 87000, "procLaunch" : "2022-02-24 16:38:04.3924 +0000", "procRole" : "Foreground", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookPro17,1", "procStartAbsTime" : 2088595364508, "coalitionID" : 13655, "osVersion" : { "train" : "macOS 12.2.1", "build" : "21D62", "releaseType" : "User" }, "captureTime" : "2022-02-24 16:38:41.4680 +0000", "incident" : "A6D6A364-5F19-4AF1-A678-6358DE427DB6", "bug_type" : "309", "pid" : 72558, "procExitAbsTime" : 2089483634006, "translated" : true, "cpuType" : "X86-64", "procName" : "Sonic Pi", "procPath" : "\/Applications\/Sonic Pi v4 BETA 3.app\/Contents\/MacOS\/Sonic Pi", "bundleInfo" : {"CFBundleShortVersionString":"4.0.0","CFBundleVersion":"4.0.0","CFBundleIdentifier":"net.sonic-pi.app"}, "storeInfo" : {"deviceIdentifierForVendor":"1A36982B-123E-5558-8ED2-E7510272A2A3","thirdParty":true}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "net.sonic-pi.app", "crashReporterKey" : "E5D3F08D-388C-C4FE-8099-6C60B9DC15A2", "wakeTime" : 915, "sleepWakeUUID" : "29074F66-A3C8-433C-89DE-663732D404CC", "sip" : "enabled", "vmRegionInfo" : "0x600400116624 is not in any region. Bytes after previous region: 16644138533 Bytes before following region: 34850571459036\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-\/rwx SM=NUL ...(unallocated)\n---> GAP OF 0x1fb628000000 BYTES\n MALLOC_MEDIUM 7fb648000000-7fb648800000 [ 8192K] rw-\/rwx SM=PRV ", "isCorpse" : 1, "exception" : {"codes":"0x0000000000000001, 0x0000600400116624","rawCodes":[1,105570297275940],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000600400116624"}, "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":72558}, "ktriageinfo" : "VM - pmap_enter failed with resource shortage\n", "vmregioninfo" : "0x600400116624 is not in any region. Bytes after previous region: 16644138533 Bytes before following region: 34850571459036\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-\/rwx SM=NUL ...(unallocated)\n---> GAP OF 0x1fb628000000 BYTES\n MALLOC_MEDIUM 7fb648000000-7fb648800000 [ 8192K] rw-\/rwx SM=PRV ", "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":420},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":1393702,"threadState":{"r13":{"value":140422731350944},"rflags":{"value":643},"rax":{"value":105553117410848},"rosetta":{"tmp2":{"value":4394369736},"tmp1":{"value":4365002230},"tmp0":{"value":0}},"r14":{"value":13121159681},"rsi":{"value":4294966273},"r8":{"value":140422742112256},"rdx":{"value":4294966273},"r10":{"value":0},"r9":{"value":8192},"r15":{"value":13121159792},"rbx":{"value":105553117413504},"r11":{"value":0},"rip":{"value":4365002322},"rbp":{"value":13121158448},"rsp":{"value":13121158192},"r12":{"value":140422731351296},"rcx":{"value":140422731350944},"flavor":"x86_THREAD_STATE","rdi":{"value":13121158208}},"queue":"com.apple.main-thread","frames":[{"imageOffset":1451602,"symbol":"SonicPi::ScopeWindow::DrawLissajous(SonicPi::ProcessedAudio const&, QPainter&, SonicPi::ScopeWindowPanel&)","symbolLocation":466,"imageIndex":0},{"imageOffset":1453764,"symbol":"SonicPi::ScopeWindow::paintEvent(QPaintEvent*)","symbolLocation":1732,"imageIndex":0},{"imageOffset":315285,"symbol":"QWidget::event(QEvent*)","symbolLocation":1093,"imageIndex":1},{"imageOffset":80470,"symbol":"QApplicationPrivate::notify_helper(QObject*, QEvent*)","symbolLocation":262,"imageIndex":1},{"imageOffset":85506,"symbol":"QApplication::notify(QObject*, QEvent*)","symbolLocation":466,"imageIndex":1},{"imageOffset":1991350,"symbol":"QCoreApplication::notifyInternal2(QObject*, QEvent*)","symbolLocation":166,"imageIndex":2},{"imageOffset":290571,"symbol":"QWidgetPrivate::sendPaintEvent(QRegion const&)","symbolLocation":43,"imageIndex":1},{"imageOffset":135321,"imageIndex":1},{"imageOffset":135858,"imageIndex":1},{"imageOffset":315838,"symbol":"QWidget::event(QEvent*)","symbolLocation":1646,"imageIndex":1},{"imageOffset":1433748,"symbol":"QMainWindow::event(QEvent*)","symbolLocation":276,"imageIndex":1},{"imageOffset":80470,"symbol":"QApplicationPrivate::notify_helper(QObject*, QEvent*)","symbolLocation":262,"imageIndex":1},{"imageOffset":85506,"symbol":"QApplication::notify(QObject*, QEvent*)","symbolLocation":466,"imageIndex":1},{"imageOffset":1991350,"symbol":"QCoreApplication::notifyInternal2(QObject*, QEvent*)","symbolLocation":166,"imageIndex":2},{"imageOffset":1995763,"symbol":"QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)","symbolLocation":803,"imageIndex":2},{"imageOffset":247954,"imageIndex":3},{"imageOffset":249752,"imageIndex":3},{"imageOffset":523272,"symbol":"__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__","symbolLocation":17,"imageIndex":4},{"imageOffset":523120,"symbol":"__CFRunLoopDoSource0","symbolLocation":180,"imageIndex":4},{"imageOffset":522467,"symbol":"__CFRunLoopDoSources0","symbolLocation":242,"imageIndex":4},{"imageOffset":516863,"symbol":"__CFRunLoopRun","symbolLocation":897,"imageIndex":4},{"imageOffset":514217,"symbol":"CFRunLoopRunSpecific","symbolLocation":567,"imageIndex":4},{"imageOffset":206065,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":5},{"imageOffset":205080,"symbol":"ReceiveNextEventCommon","symbolLocation":284,"imageIndex":5},{"imageOffset":204773,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":70,"imageIndex":5},{"imageOffset":257416,"symbol":"_DPSNextEvent","symbolLocation":886,"imageIndex":6},{"imageOffset":250868,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":1411,"imageIndex":6},{"imageOffset":194841,"symbol":"-[NSApplication run]","symbolLocation":586,"imageIndex":6},{"imageOffset":245108,"imageIndex":3},{"imageOffset":1975991,"symbol":"QEventLoop::exec(QFlags)","symbolLocation":471,"imageIndex":2},{"imageOffset":1992786,"symbol":"QCoreApplication::exec()","symbolLocation":130,"imageIndex":2},{"imageOffset":1284049,"symbol":"main","symbolLocation":849,"imageIndex":0},{"imageOffset":21758,"symbol":"start","symbolLocation":462,"imageIndex":7}]},{"id":1393708,"name":"com.apple.rosetta.exceptionserver","frames":[{"imageOffset":18660,"imageIndex":8},{"imageOffset":71976,"imageIndex":8},{"imageOffset":77988,"imageIndex":8}]},{"id":1393716,"frames":[{"imageOffset":141332,"imageIndex":8}]},{"id":1393717,"frames":[{"imageOffset":141332,"imageIndex":8}]},{"id":1393733,"queue":"glmtl.ioSurfaceNotifierQueue","frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":2746,"symbol":"mach_msg_trap","symbolLocation":10,"imageIndex":10},{"imageOffset":118947,"symbol":"dispatch_mig_server","symbolLocation":220,"imageIndex":11},{"imageOffset":11465,"symbol":"_dispatch_client_callout","symbolLocation":8,"imageIndex":11},{"imageOffset":22342,"symbol":"_dispatch_continuation_pop","symbolLocation":460,"imageIndex":11},{"imageOffset":92762,"symbol":"_dispatch_source_invoke","symbolLocation":2150,"imageIndex":11},{"imageOffset":35717,"symbol":"_dispatch_lane_serial_drain","symbolLocation":335,"imageIndex":11},{"imageOffset":38856,"symbol":"_dispatch_lane_invoke","symbolLocation":366,"imageIndex":11},{"imageOffset":79841,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":758,"imageIndex":11},{"imageOffset":12404,"symbol":"_pthread_wqthread","symbolLocation":326,"imageIndex":12},{"imageOffset":8187,"symbol":"start_wqthread","symbolLocation":15,"imageIndex":12}]},{"id":1393740,"name":"Thread (pooled)","frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":13574,"symbol":"__psynch_cvwait","symbolLocation":10,"imageIndex":10},{"imageOffset":169504,"imageIndex":2},{"imageOffset":168830,"imageIndex":2},{"imageOffset":168691,"symbol":"QWaitCondition::wait(QMutex*, QDeadlineTimer)","symbolLocation":83,"imageIndex":2},{"imageOffset":154973,"imageIndex":2},{"imageOffset":137385,"imageIndex":2},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":12},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":12}]},{"id":1393741,"name":"Thread (pooled)","frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":13574,"symbol":"__psynch_cvwait","symbolLocation":10,"imageIndex":10},{"imageOffset":169504,"imageIndex":2},{"imageOffset":168830,"imageIndex":2},{"imageOffset":168691,"symbol":"QWaitCondition::wait(QMutex*, QDeadlineTimer)","symbolLocation":83,"imageIndex":2},{"imageOffset":154973,"imageIndex":2},{"imageOffset":137385,"imageIndex":2},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":12},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":12}]},{"id":1393743,"name":"Thread (pooled)","frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":13574,"symbol":"__psynch_cvwait","symbolLocation":10,"imageIndex":10},{"imageOffset":169504,"imageIndex":2},{"imageOffset":168830,"imageIndex":2},{"imageOffset":168691,"symbol":"QWaitCondition::wait(QMutex*, QDeadlineTimer)","symbolLocation":83,"imageIndex":2},{"imageOffset":154973,"imageIndex":2},{"imageOffset":137385,"imageIndex":2},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":12},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":12}]},{"id":1393747,"frames":[{"imageOffset":141332,"imageIndex":8}]},{"id":1393748,"name":"com.apple.NSEventThread","frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":2746,"symbol":"mach_msg_trap","symbolLocation":10,"imageIndex":10},{"imageOffset":523761,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":319,"imageIndex":4},{"imageOffset":517295,"symbol":"__CFRunLoopRun","symbolLocation":1329,"imageIndex":4},{"imageOffset":514217,"symbol":"CFRunLoopRunSpecific","symbolLocation":567,"imageIndex":4},{"imageOffset":1757144,"symbol":"_NSEventThread","symbolLocation":132,"imageIndex":6},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":12},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":12}]},{"id":1393772,"frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":13274,"symbol":"__semwait_signal","symbolLocation":10,"imageIndex":10},{"imageOffset":89105,"symbol":"std::__1::this_thread::sleep_for(std::__1::chrono::duration > const&)","symbolLocation":73,"imageIndex":13},{"imageOffset":1101800,"symbol":"void std::__1::this_thread::sleep_for >(std::__1::chrono::duration > const&)","symbolLocation":1560,"imageIndex":0},{"imageOffset":1670032,"imageIndex":0},{"imageOffset":1668689,"imageIndex":0},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":12},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":12}]},{"id":1393773,"frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":36426,"symbol":"__select","symbolLocation":10,"imageIndex":10},{"imageOffset":1795003,"symbol":"SonicPi::OscServerUDP::start()","symbolLocation":2075,"imageIndex":0},{"imageOffset":1683041,"imageIndex":0},{"imageOffset":1682401,"imageIndex":0},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":12},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":12}]},{"id":1394088,"frames":[{"imageOffset":140705770236224,"imageIndex":9},{"imageOffset":13274,"symbol":"__semwait_signal","symbolLocation":10,"imageIndex":10},{"imageOffset":89105,"symbol":"std::__1::this_thread::sleep_for(std::__1::chrono::duration > const&)","symbolLocation":73,"imageIndex":13},{"imageOffset":1825895,"symbol":"SonicPi::AudioProcessor::Run()","symbolLocation":3799,"imageIndex":0},{"imageOffset":1898904,"imageIndex":0},{"imageOffset":1898289,"imageIndex":0},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":12},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":12}]},{"id":1394120,"frames":[{"imageOffset":141332,"imageIndex":8}]},{"id":1394121,"frames":[{"imageOffset":141332,"imageIndex":8}]},{"id":1394123,"frames":[{"imageOffset":141332,"imageIndex":8}]}], "usedImages" : [ { "source" : "P", "arch" : "x86_64", "base" : 4363550720, "CFBundleShortVersionString" : "4.0.0", "CFBundleIdentifier" : "net.sonic-pi.app", "size" : 27189248, "uuid" : "92fdad7c-9a3a-3128-a592-ffcc3894770a", "path" : "\/Applications\/Sonic Pi v4 BETA 3.app\/Contents\/MacOS\/Sonic Pi", "name" : "Sonic Pi", "CFBundleVersion" : "4.0.0" }, { "source" : "P", "arch" : "x86_64", "base" : 4550373376, "CFBundleShortVersionString" : "5.15", "CFBundleIdentifier" : "org.qt-project.QtWidgets", "size" : 4505600, "uuid" : "d8e35a95-cfdb-3bc8-a8be-cc02aca49414", "path" : "\/Applications\/Sonic Pi v4 BETA 3.app\/Contents\/Frameworks\/QtWidgets.framework\/Versions\/5\/QtWidgets", "name" : "QtWidgets", "CFBundleVersion" : "5.15.2" }, { "source" : "P", "arch" : "x86_64", "base" : 4593311744, "CFBundleShortVersionString" : "5.15", "CFBundleIdentifier" : "org.qt-project.QtCore", "size" : 5521408, "uuid" : "103a2350-5a72-30ff-8dae-31642d830707", "path" : "\/Applications\/Sonic Pi v4 BETA 3.app\/Contents\/Frameworks\/QtCore.framework\/Versions\/5\/QtCore", "name" : "QtCore", "CFBundleVersion" : "5.15.2" }, { "source" : "P", "arch" : "x86_64", "base" : 4586913792, "size" : 1474560, "uuid" : "6fe65bbe-99db-37e9-a8e5-566f444d4b50", "path" : "\/Applications\/Sonic Pi v4 BETA 3.app\/Contents\/PlugIns\/platforms\/libqcocoa.dylib", "name" : "libqcocoa.dylib" }, { "source" : "P", "arch" : "x86_64", "base" : 140703348772864, "CFBundleShortVersionString" : "6.9", "CFBundleIdentifier" : "com.apple.CoreFoundation", "size" : 5246976, "uuid" : "1d1db08b-810c-316e-b9d9-eecdff8ee6e3", "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation", "name" : "CoreFoundation", "CFBundleVersion" : "1856.107" }, { "source" : "P", "arch" : "x86_64", "base" : 140703500648448, "CFBundleShortVersionString" : "2.1.1", "CFBundleIdentifier" : "com.apple.HIToolbox", "size" : 3112960, "uuid" : "c538aa78-7afd-3f8a-8fdb-1fc2acde6b3f", "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox", "name" : "HIToolbox" }, { "source" : "P", "arch" : "x86_64", "base" : 140703392374784, "CFBundleShortVersionString" : "6.9", "CFBundleIdentifier" : "com.apple.AppKit", "size" : 15278080, "uuid" : "9d3ab204-4858-3120-b002-5c38b02edec4", "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit", "name" : "AppKit", "CFBundleVersion" : "2113.30.116" }, { "source" : "P", "arch" : "x86_64", "base" : 8689758208, "size" : 442368, "uuid" : "7de33963-bbc5-3996-ba6e-f1d562c17c95", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "source" : "P", "arch" : "arm64", "base" : 140703127437312, "size" : 196608, "uuid" : "faca02c7-0a4c-3629-a746-55ddcfee9116", "path" : "\/usr\/libexec\/rosetta\/runtime", "name" : "runtime" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" }, { "source" : "P", "arch" : "x86_64", "base" : 140703348232192, "size" : 225280, "uuid" : "c1d58a50-5a4d-3bcb-a1fc-ec0902ce34d3", "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib", "name" : "libsystem_kernel.dylib" }, { "source" : "P", "arch" : "x86_64", "base" : 140703346663424, "size" : 290816, "uuid" : "67d92c93-aa68-34c2-964b-23e8a8d32098", "path" : "\/usr\/lib\/system\/libdispatch.dylib", "name" : "libdispatch.dylib" }, { "source" : "P", "arch" : "x86_64", "base" : 140703348457472, "size" : 49152, "uuid" : "ee564342-d8f2-396d-b642-40092cf34d82", "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib", "name" : "libsystem_pthread.dylib" }, { "source" : "P", "arch" : "x86_64", "base" : 140703347777536, "size" : 364544, "uuid" : "fa3f989d-0003-37ef-a495-36be29bc1552", "path" : "\/usr\/lib\/libc++.1.dylib", "name" : "libc++.1.dylib" } ], "sharedCache" : { "base" : 140703345213440, "size" : 15218196480, "uuid" : "5c9ff5db-8827-329a-8a37-2483935a9ea1" }, "vmSummary" : "ReadOnly portion of Libraries: Total=989.7M resident=0K(0%) swapped_out_or_unallocated=989.7M(100%)\nWritable regions: Total=1.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 384K 3 \nActivity Tracing 256K 1 \nCG backing stores 2176K 4 \nCG image 100K 4 \nColorSync 228K 25 \nCoreAnimation 100K 8 \nCoreGraphics 12K 2 \nCoreServices 352K 2 \nCoreUI image data 1424K 10 \nFoundation 16K 1 \nKernel Alloc Once 8K 1 \nMALLOC 319.1M 58 \nMALLOC guard page 192K 9 \nMALLOC_MEDIUM (reserved) 960.0M 8 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nOpenGL GLSL 256K 3 \nRosetta Arena 4096K 2 \nRosetta Generic 1240K 307 \nRosetta IndirectBranch 1024K 1 \nRosetta JIT 128.0M 1 \nRosetta Return Stack 300K 30 \nRosetta Thread Context 300K 30 \nSTACK GUARD 24K 6 \nStack 15.2M 16 \nStack Guard 56.0M 9 \nVM_ALLOCATE 3572K 47 \nVM_ALLOCATE (reserved) 44K 5 reserved VM address space (unallocated)\n__DATA 20.2M 338 \n__DATA_CONST 12.3M 181 \n__DATA_DIRTY 549K 101 \n__FONT_DATA 4K 1 \n__GLSLBUILTINS 5176K 1 \n__LINKEDIT 706.8M 37 \n__OBJC_RO 81.8M 1 \n__OBJC_RW 3136K 2 \n__TEXT 282.8M 348 \n__UNICODE 588K 1 \ndyld private memory 1024K 1 \nmapped file 5.4G 492 \nshared memory 816K 16 \nunshared pmap 10.3M 8 \n=========== ======= ======= \nTOTAL 8.3G 2122 \nTOTAL, minus reserved VM space 7.0G 2122 \n", "legacyInfo" : { "threadTriggered" : { "queue" : "com.apple.main-thread" } }, "trialInfo" : { "rollouts" : [ { "rolloutId" : "60da5e84ab0ca017dace9abf", "factorPackIds" : { }, "deploymentId" : 240000008 }, { "rolloutId" : "607844aa04477260f58a8077", "factorPackIds" : { "SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a" }, "deploymentId" : 240000066 }, { "rolloutId" : "602ad4dac86151000cf27e46", "factorPackIds" : { "SIRI_DICTATION_ASSETS" : "61fb0e87c773c43cde3bb80e" }, "deploymentId" : 240000303 }, { "rolloutId" : "5fc94383418129005b4e9ae0", "factorPackIds" : { }, "deploymentId" : 240000231 }, { "rolloutId" : "601d9415f79519000ccd4b69", "factorPackIds" : { "SIRI_TEXT_TO_SPEECH" : "620161cb295c182621eced20" }, "deploymentId" : 240000392 }, { "rolloutId" : "5ffde50ce2aacd000d47a95f", "factorPackIds" : { }, "deploymentId" : 240000111 } ], "experiments" : [ ] } } Model: MacBookPro17,1, BootROM 7429.81.3, proc 8:4:4 processors, 16 GB, SMC Graphics: Apple M1, Apple M1, Built-In Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online Memory Module: LPDDR4 AirPort: Wi-Fi, wl0: Oct 26 2021 16:10:41 version 18.20.310.15.7.8.120 FWID 01-5d6c3867 Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus USB Device: Yubikey 4 CCID Thunderbolt Bus: MacBook Pro, Apple Inc. Thunderbolt Bus: MacBook Pro, Apple Inc. ```
lilyinstarlight commented 2 years ago

I can replicate the seg fault on my Linux system before playing audio (after starting a run it enables just fine)

It looks like that scope expects at least 1024 audio samples from the audio processor (see here and here in scope_window.cpp), but only 1 fake sample is initialized in that buffer before a run (see here in scope_window.cpp). That causes a seg fault when that scope tries to access nonexistent samples when it is enabled before audio (but work just fine after that sample buffer has been filled once)

Those files were last changed in #2644 so @cmaughan may have more insight. The fix may be to either initialize 4096 samples (the fixed FrameSamples from scope.cpp) in the code here or have the Lissajous scope dynamically calculate samples and not assume 1024 samples (the fixed LissajousSamples in scope_window.cpp)

samaaron commented 2 years ago

On Windows I don't get a segfault, but none of the "Scope Kinds" toggles have any effect. This may or may not be related.

emlyn commented 2 years ago

I can confirm that if I make it play something first, then I can enable the Lissajous scope, but then when I quit and restart, it crashes immediately on startup. I had to edit the gui-settings.ini file to set scope\show-lissajous=false before it would start up.

cmaughan commented 2 years ago

Since this is something I wrote, I'll get around to fixing it this week; sorry for the trouble.

samaaron commented 2 years ago

@cmaughan if you manage to find some time - that would be amazing!

cmaughan commented 2 years ago

Is like to add a new visualiser, just haven't thought of a good one yet.

samaaron commented 2 years ago

Is like to add a new visualiser, just haven't thought of a good one yet.

What about some sort of blur/shift+blur/rotate+blur modifier to the existing visualisers. Just thinking of the good old winamp days!

cmaughan commented 2 years ago

Do you have an example?

On Tue, Mar 22, 2022 at 5:53 PM Sam Aaron @.***> wrote:

Is like to add a new visualiser, just haven't thought of a good one yet.

What about some sort of blur/shift+blur/rotate+blur modifier to the existing visualisers. Just thinking of the good old winamp days!

— Reply to this email directly, view it on GitHub https://github.com/sonic-pi-net/sonic-pi/issues/3027#issuecomment-1075445696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5M73WP5RX3F7MUKB7WLLVBICH5ANCNFSM5PIARJPA . You are receiving this because you were mentioned.Message ID: @.***>

emlyn commented 2 years ago

Is like to add a new visualiser, just haven't thought of a good one yet.

What about some sort of blur/shift+blur/rotate+blur modifier to the existing visualisers. Just thinking of the good old winamp days!

A (configurable?) persistence, like an old phosphor oscilloscope, on at least the lissajous mode would be awesome (i.e. when something is drawn it slowly fades instead of disappearing as soon as the next frame is displayed). Maybe even infinite persistence, with a command to clear it?

Also, a minor annoyance: it seems that the y axis points downwards - it would be nicer if it points upwards (not that it makes any difference for normal use cases!).

You can probably tell that I've been playing around with Lissajous figures recently 🙂, I'll try to clean things up and post my explorations to in-thread soon.

emlyn commented 2 years ago

Just thinking aloud... every time the scope is about to be redrawn, instead of just clearing it and drawing the new frame, you could have a set of configurable transforms that you apply to the current display, and then draw the new frame on top. You could blur it, rotate it, translate it, fade it (maybe others, and all with parameters configurable from code, so the effect can be changed dynamically). Current behaviour could be reproduced by having 100% fade. Less than 100% would give the phosphor effect. Adding varying amounts of blur/rotation etc. would produce the WinAmp style effects that I think Sam is referring to.

samaaron commented 2 years ago

Yep, I was just thinking about the kind of thing @emlyn has described in way more detail.

samaaron commented 2 years ago

v4 is now released.

cmaughan commented 2 years ago

The effect you describe isn't hard; but does require blending to the target

On Tue, Mar 22, 2022 at 9:31 PM Sam Aaron @.***> wrote:

Yep, I was just thinking about the kind of thing @emlyn https://github.com/emlyn has described in way more detail.

— Reply to this email directly, view it on GitHub https://github.com/sonic-pi-net/sonic-pi/issues/3027#issuecomment-1075663499, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5M75M7ZIRHYXYDOKEOALVBI32BANCNFSM5PIARJPA . You are receiving this because you were mentioned.Message ID: @.***>