Aepelzen / AepelzensModules

modules for vcvrack
GNU General Public License v3.0
33 stars 18 forks source link

Burst periodically crashes with Burst invocation #4

Closed metaphorz closed 6 years ago

metaphorz commented 6 years ago

MAC OSX (High Sierra). Just built today (Dec 11, 12:26PM)

When I build the repository, there is a crash either

(1) When I create a new Burst module, or (2) When I create a 2nd Burst module (meaning the first invocation works).

From the trace, it seems that there is an issue in allocating dynamic memory: note "invalid pointer" reference

Process: Rack [40347] Path: /Applications/Rack.app/Contents/MacOS/Rack Identifier: com.vcvrack.rack Version: ??? (???) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Rack [40347] User ID: 502

Date/Time: 2017-12-11 12:24:47.096 -0600 OS Version: Mac OS X 10.13.1 (17B48) Report Version: 12 Anonymous UUID: F03B73B0-06FE-E41D-3CCB-FC276A08A93C

Sleep/Wake UUID: CFE578A9-A404-4ED9-BFF5-2834B5563467

Time Awake Since Boot: 400000 seconds Time Since Wake: 330000 seconds

System Integrity Protection: enabled

Crashed Thread: 4 com.apple.NSEventThread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information: abort() called *** error for object 0x608000229840: Invalid pointer dequeued from free list

Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff56866e76 mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff56866390 mach_msg + 60 2 com.apple.framework.IOKit 0x00007fff318242c7 io_connect_method + 369 3 com.apple.framework.IOKit 0x00007fff3182412e IOConnectCallMethod + 244 4 com.apple.framework.IOKit 0x00007fff31825227 IOConnectCallStructMethod + 38 5 com.apple.IOAccelerator 0x00007fff48e98949 IOAccelContextSubmitDataBuffersExt2 + 248 6 libGPUSupportMercury.dylib 0x00007fff477b852e gpusSubmitDataBuffers + 156 7 com.apple.GeForceGLDriver 0x00007fff299f3aee 0x7fff296df000 + 3230446 8 com.apple.GeForceGLDriver 0x00007fff299f3f1a gldPresentFramebufferData + 503 9 GLEngine 0x00007fff39351221 glSwap_Exec + 97 10 com.apple.opengl 0x00007fff39333093 CGLFlushDrawable + 59 11 com.apple.AppKit 0x00007fff2c9774d4 -[NSOpenGLContext flushBuffer] + 27 12 libglfw.3.dylib 0x000000010621e7b3 swapBuffersNSGL + 35 13 libglfw.3.dylib 0x000000010620df10 glfwSwapBuffers + 176 14 com.vcvrack.rack 0x0000000106032963 rack::renderGui() + 195 15 com.vcvrack.rack 0x000000010603351f rack::guiRun() + 1087 16 com.vcvrack.rack 0x000000010603b5aa main + 698 17 com.vcvrack.rack 0x000000010601d3e4 start + 52

Thread 1: 0 libsystem_pthread.dylib 0x00007fff569a9c40 start_wqthread + 0 1 ??? 0x0000000000040002 0 + 262146

Thread 2: 0 libsystem_pthread.dylib 0x00007fff569a9c40 start_wqthread + 0 1 ??? 0x0000000000001603 0 + 5635

Thread 3:: OGL Profiler 0 libsystem_kernel.dylib 0x00007fff56866e76 mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff56866390 mach_msg + 60

Aepelzen commented 6 years ago

Can you please try again? I just cleaned up some of the gui related stuff (old remnants from my template that shouldn't do anything, but who knows).

I was also wondering if this might be related to my panel graphics. Could you try replacing Burst.svg with an empty panel and see if that changes something?

metaphorz commented 6 years ago

Inkscape is down. Do you have a blank panel to send me? I just tried rebuilding and similar issues with Burst -p

On Dec 11, 2017, at 1:23 PM, Aepelzen notifications@github.com wrote:

Can you please try again? I just cleaned up some of the gui related stuff (old remnants from my template that shouldn't do anything, but who knows).

I was also wondering if this might be related to my panel graphics. Could you try replacing Burst.svg with an empty panel and see if that changes something?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Aepelzen/AepelzensModules/issues/4#issuecomment-350829680, or mute the thread https://github.com/notifications/unsubscribe-auth/ADW0jw3V3E4W0Xqr7KV03Rie0LME-vwyks5s_YE3gaJpZM4Q91Wv.

metaphorz commented 6 years ago

I just build a brand new Aepelzen's on Mac OSX (High Sierra). Burst continues to crash Rack. The other modules work fine.

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information: abort() called *** error for object 0x60000022b920: Invalid pointer dequeued from free list

Thread 0 Crashed:: Dispatch queue: NSPersistentUI Work 0 libsystem_kernel.dylib 0x00007fff6cf0dfce pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff6d04b150 pthread_kill + 333 2 libsystem_c.dylib 0x00007fff6ce6a30a abort + 127 3 libsystem_malloc.dylib 0x00007fff6cf78dbf nanozone_error + 502 4 libsystem_malloc.dylib 0x00007fff6cf6cdac _nano_malloc_check_clear + 410 5 libsystem_malloc.dylib 0x00007fff6cf6cbf1 nano_malloc + 35 6 libsystem_malloc.dylib 0x00007fff6cf66201 malloc_zone_malloc + 103 7 libsystem_malloc.dylib 0x00007fff6cf6550b malloc + 24 8 com.apple.CoreFoundation 0x00007fff456dff5c -[__NSArrayM insertObject:atIndex:] + 284 9 com.apple.Foundation 0x00007fff47855a1d addValueToTopContainerE + 167 10 com.apple.Foundation 0x00007fff47854412 _encodeObject + 711 11 com.apple.Foundation 0x00007fff47855c65 -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] + 439 12 com.apple.Foundation 0x00007fff478545f5 _encodeObject + 1194 13 com.apple.AppKit 0x00007fff4388859a -[NSPersistentUIArchiver encodeObject:forKey:] + 68 14 com.apple.AppKit 0x00007fff437d7b47 -[NSPersistentUIBucket encodeInvalidPersistentStateWithBackgroundQueue:completionHandler:] + 249 15 com.apple.AppKit 0x00007fff437d4bc8 40-[NSPersistentUIManager flushAllChanges]_block_invoke + 892 16 com.apple.AppKit 0x00007fff437d98fc _NSPersistentUIDispatchQueueSync_block_invoke + 28 17 libdispatch.dylib 0x00007fff6cd84e88 _dispatch_client_callout + 8 18 libdispatch.dylib 0x00007fff6cd9831d _dispatch_queue_barrier_sync_invoke_and_complete + 60 19 com.apple.AppKit 0x00007fff437d40e7 -[NSPersistentUIManager flushAllChanges] + 647 20 com.apple.AppKit 0x00007fff435a795c __45-[NSPersistentUIFlushScheduler scheduleTimer]_blockinvoke + 38 21 com.apple.AppKit 0x00007fff43677ca6 NSMainRunLoopPerformBlock_block_invoke + 25 22 com.apple.CoreFoundation 0x00007fff4575792c CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 23 com.apple.CoreFoundation 0x00007fff4573a8a3 CFRunLoopDoBlocks + 275 24 com.apple.CoreFoundation 0x00007fff4573a668 CFRunLoopRun + 3128 25 com.apple.CoreFoundation 0x00007fff45739797 CFRunLoopRunSpecific + 487 26 com.apple.HIToolbox 0x00007fff44a4e866 RunCurrentEventLoopInMode + 286 27 com.apple.HIToolbox 0x00007fff44a4e4df ReceiveNextEventCommon + 366 28 com.apple.HIToolbox 0x00007fff44a4e354 _BlockUntilNextEventMatchingListInModeWithFilter + 64 29 com.apple.AppKit 0x00007fff42d4ba23 _DPSNextEvent + 2085 30 com.apple.AppKit 0x00007fff434e0e6c -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044 31 libglfw.3.dylib 0x000000010d9b0199 _glfwPlatformPollEvents + 89 32 libglfw.3.dylib 0x000000010d9a8eae glfwPollEvents + 46 33 com.vcvrack.rack 0x000000010d7cf185 rack::guiRun() + 165 34 com.vcvrack.rack 0x000000010d7d75aa main + 698 35 com.vcvrack.rack 0x000000010d7b93e4 start + 52

Thread 1: 0 libsystem_kernel.dylib 0x00007fff6cf0e6da __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff6d04806a _pthread_wqthread + 1035 2 libsystem_pthread.dylib 0x00007fff6d047c4d start_wqthread + 13

Thread 2:: Dispatch queue: NSPersistentUI I/O 0 libsystem_kernel.dylib 0x00007fff6cf0ed3a getattrlistbulk + 10 1 com.apple.CoreServicesInternal 0x00007fff58f6da5b ftsattr_read + 1291 2 com.apple.CoreServicesInternal 0x00007fff58f6d4bc _GetDirectoryURLs(_CFURLEnumerator*) + 1508 3 com.apple.CoreServicesInternal 0x00007fff58f6ae68 _URLEnumeratorGetNextURL + 171 4 com.apple.AppKit 0x00007fff436bef15 -[NSPersistentUIFileManager tryCreatingPersistentStateDirectoryForURL:] + 487 5 com.apple.AppKit 0x00007fff436bd53a -[NSPersistentUIFileManager _refreshStateDirectoryIfNecessary] + 83 6 com.apple.AppKit 0x00007fff436bf3ac ___NSPersistentUIDispatchQueueAsync_block_invoke + 28 7 libdispatch.dylib 0x00007fff6cd8c6cd _dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x00007fff6cd84e88 _dispatch_client_callout + 8 9 libdispatch.dylib 0x00007fff6cd99356 _dispatch_queue_serial_drain + 635 10 libdispatch.dylib 0x00007fff6cd8c239 _dispatch_queue_invoke + 373 11 libdispatch.dylib 0x00007fff6cd9a042 _dispatch_root_queue_drain_deferred_wlh + 332 12 libdispatch.dylib 0x00007fff6cd9de1b _dispatch_workloop_worker_thread + 880 13 libsystem_pthread.dylib 0x00007fff6d048033 _pthread_wqthread + 980 14 libsystem_pthread.dylib 0x00007fff6d047c4d start_wqthread + 13

Thread 3: 0 libsystem_kernel.dylib 0x00007fff6cf0e6da __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff6d04806a _pthread_wqthread + 1035 2 libsystem_pthread.dylib 0x00007fff6d047c4d start_wqthread + 13

Thread 4:: com.apple.NSEventThread 0 libsystem_kernel.dylib 0x00007fff6cf04e76 mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff6cf04390 mach_msg + 60 2 com.apple.CoreFoundation 0x00007fff4573add5 CFRunLoopServiceMachPort + 341 3 com.apple.CoreFoundation 0x00007fff4573a127 CFRunLoopRun + 1783 4 com.apple.CoreFoundation 0x00007fff45739797 CFRunLoopRunSpecific + 487 5 com.apple.AppKit 0x00007fff42e892d1 _NSEventThread + 184 6 libsystem_pthread.dylib 0x00007fff6d0486c1 _pthread_body + 340 7 libsystem_pthread.dylib 0x00007fff6d04856d _pthread_start + 377 8 libsystem_pthread.dylib 0x00007fff6d047c5d thread_start + 13

Thread 5:: com.apple.audio.IOThread.client 0 libsystem_kernel.dylib 0x00007fff6cf04e76 mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff6cf04390 mach_msg + 60 2 com.apple.audio.CoreAudio 0x00007fff451a5bea HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned int, unsigned int, mach_msg_header_t*, bool, unsigned int) + 124 3 com.apple.audio.CoreAudio 0x00007fff451a5b5d HALB_MachPort::

rossco255 commented 6 years ago

I'm also having the same problem. Loading Burst crashes Rack

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fffa212ad42 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fffa2218457 pthread_kill + 90 2 libsystem_c.dylib 0x00007fffa2090420 abort + 129 3 libsystem_malloc.dylib 0x00007fffa218fd98 nanozone_error + 525 4 libsystem_malloc.dylib 0x00007fffa2185588 _nano_malloc_check_clear + 427 5 libsystem_malloc.dylib 0x00007fffa21853bf nano_malloc + 35 6 libsystem_malloc.dylib 0x00007fffa217e282 malloc_zone_malloc + 107 7 libsystem_malloc.dylib 0x00007fffa217d200 malloc + 24 8 com.apple.CoreFoundation 0x00007fff8c2b28d7 __CFRunLoopRun + 311 9 com.apple.CoreFoundation 0x00007fff8c2b2544 CFRunLoopRunSpecific + 420 10 com.apple.HIToolbox 0x00007fff8b811ebc RunCurrentEventLoopInMode + 240 11 com.apple.HIToolbox 0x00007fff8b811bf9 ReceiveNextEventCommon + 184 12 com.apple.HIToolbox 0x00007fff8b811b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71 13 com.apple.AppKit 0x00007fff89da8a54 _DPSNextEvent + 1120 14 com.apple.AppKit 0x00007fff8a5247ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796 15 libglfw.3.dylib 0x000000010544d199 _glfwPlatformPollEvents + 89 16 libglfw.3.dylib 0x0000000105445eae glfwPollEvents + 46 17 com.vcvrack.rack 0x000000010526c255 rack::guiRun() + 165 18 com.vcvrack.rack 0x000000010527467a main + 698 19 com.vcvrack.rack 0x00000001052564b4 start + 52

Thread 1: 0 libsystem_kernel.dylib 0x00007fffa212b44e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffa2215621 _pthread_wqthread + 1426 2 libsystem_pthread.dylib 0x00007fffa221507d start_wqthread + 13

Thread 2: 0 libsystem_kernel.dylib 0x00007fffa212b44e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffa221548e _pthread_wqthread + 1023 2 libsystem_pthread.dylib 0x00007fffa221507d start_wqthread + 13

Thread 3: 0 libsystem_kernel.dylib 0x00007fffa212b44e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffa2215621 _pthread_wqthread + 1426 2 libsystem_pthread.dylib 0x00007fffa221507d start_wqthread + 13

Thread 4: 0 libsystem_kernel.dylib 0x00007fffa212b44e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffa2215621 _pthread_wqthread + 1426 2 libsystem_pthread.dylib 0x00007fffa221507d start_wqthread + 13

Thread 5:: com.apple.NSEventThread 0 libsystem_kernel.dylib 0x00007fffa212334a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fffa2122797 mach_msg + 55 2 com.apple.CoreFoundation 0x00007fff8c2b3874 CFRunLoopServiceMachPort + 212 3 com.apple.CoreFoundation 0x00007fff8c2b2cf1 CFRunLoopRun + 1361 4 com.apple.CoreFoundation 0x00007fff8c2b2544 CFRunLoopRunSpecific + 420 5 com.apple.AppKit 0x00007fff89ef5f02 _NSEventThread + 205 6 libsystem_pthread.dylib 0x00007fffa221593b _pthread_body + 180 7 libsystem_pthread.dylib 0x00007fffa2215887 _pthread_start + 286 8 libsystem_pthread.dylib 0x00007fffa221508d thread_start + 13

Thread 6:: com.apple.audio.IOThread.client 0 libsystem_kernel.dylib 0x00007fffa212334a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fffa2122797 mach_msg + 55 2 com.apple.audio.CoreAudio 0x00007fff8be1b935 HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned int, unsigned int, mach_msg_header_t, bool, unsigned int) + 127 3 com.apple.audio.CoreAudio 0x00007fff8be1b8a6 HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 42 4 com.apple.audio.CoreAudio 0x00007fff8be188d0 HALC_ProxyIOContext::IOWorkLoop() + 1196 5 com.apple.audio.CoreAudio 0x00007fff8be18264 HALC_ProxyIOContext::IOThreadEntry(void) + 128 6 com.apple.audio.CoreAudio 0x00007fff8be17fa3 HALB_IOThread::Entry(void*) + 75 7 libsystem_pthread.dylib 0x00007fffa221593b _pthread_body + 180 8 libsystem_pthread.dylib 0x00007fffa2215887 _pthread_start + 286 9 libsystem_pthread.dylib 0x00007fffa221508d thread_start + 13

Thread 7: 0 libsystem_kernel.dylib 0x00007fffa212af46 semwait_signal + 10 1 libsystem_c.dylib 0x00007fffa20b1b72 nanosleep + 199 2 libc++.1.dylib 0x00007fffa0bda65b std::1::this_thread::sleep_for(std::1::chrono::duration<long long, std::1::ratio<1l, 1000000000l> > const&) + 80 3 com.vcvrack.rack 0x000000010529224b AudioInterface::step() + 107 4 com.vcvrack.rack 0x000000010525701e rack::engineRun() + 366 5 com.vcvrack.rack 0x0000000105257dcd void std::1::thread_proxy<std::__1::tuple<void ()()> >(void*) + 93 6 libsystem_pthread.dylib 0x00007fffa221593b _pthread_body + 180 7 libsystem_pthread.dylib 0x00007fffa2215887 _pthread_start + 286 8 libsystem_pthread.dylib 0x00007fffa221508d thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff5a9a9208 rdx: 0x0000000000000000 rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007fff5a9a9230 rsp: 0x00007fff5a9a9208 r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000008000000 r11: 0x0000000000000206 r12: 0x0000000000000001 r13: 0x000060000003c460 r14: 0x00007fffaaf763c0 r15: 0x0000000105a08000 rip: 0x00007fffa212ad42 rfl: 0x0000000000000206 cr2: 0x00007fffaaf58128

Logical CPU: 0 Error Code: 0x02000148 Trap Number: 133

vitonzhangtt commented 6 years ago

My app also print "Invalid pointer dequeued from free list".

Aepelzen commented 6 years ago

Since the crash happens in rack::guiRun() or rather glfw I suspect that there is some problem with the panel. Could somebody please try it without a panel? Just delete or rename res/Burst.svg. That will obviously break the graphics but it should be enough to check if it fixes the crashing. Thanks.

AScustomWorks commented 6 years ago

Just tested, still crashing the app. I loaded only Burst, without the svg panel and closed the app, it crashes on closing the app. And after that, every time you try to open the app it crashes again until autosave is deleted:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.vcvrack.rack                0x000000010c91ffae nvgluDeleteFramebuffer(NVGLUframebuffer*) + 14
1   com.vcvrack.rack                0x000000010c9786b9 rack::FramebufferWidget::draw(NVGcontext*) + 569
2   com.vcvrack.rack                0x000000010c97d360 rack::Widget::draw(NVGcontext*) + 96
3   com.vcvrack.rack                0x000000010c942691 virtual thunk to rack::ModuleWidget::draw(NVGcontext*) + 81
4   com.vcvrack.rack                0x000000010c97d360 rack::Widget::draw(NVGcontext*) + 96
5   com.vcvrack.rack                0x000000010c97d360 rack::Widget::draw(NVGcontext*) + 96
6   com.vcvrack.rack                0x000000010c97d360 rack::Widget::draw(NVGcontext*) + 96
7   com.vcvrack.rack                0x000000010c97d360 rack::Widget::draw(NVGcontext*) + 96
8   com.vcvrack.rack                0x000000010c97d360 rack::Widget::draw(NVGcontext*) + 96
9   com.vcvrack.rack                0x000000010c97b871 virtual thunk to rack::ScrollWidget::draw(NVGcontext*) + 81
10  com.vcvrack.rack                0x000000010c97d360 rack::Widget::draw(NVGcontext*) + 96
11  com.vcvrack.rack                0x000000010c92f9ec rack::renderGui() + 124
12  com.vcvrack.rack                0x000000010c9305ef rack::guiRun() + 1087
13  com.vcvrack.rack                0x000000010c93867a main + 698
14  com.vcvrack.rack                0x000000010c91a4b4 start + 52
Aepelzen commented 6 years ago

Thanks for testing. I don't understand what's going on but at least this gives me some more information.

However, I can not reproduce this since it seems that only MacOS is affected so this probably won't be fixed in the near future. I will post here again if I can think of smth. new to try.

Aepelzen commented 6 years ago

Fixed