FLTK logo

[fltk.coredev] Mac crash on timeout

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Mac crash on timeout Gonzalo Garramuno Jan 03, 2021  
 
I am getting crashes on a timeout on Mac OS Big Sur on the second run of a movie that was removed and loaded again.  The same code and behavior works fine on Linux.


repeat_timeout 0.0104167

AddressSanitizer:DEADLYSIGNAL
=================================================================
==2150==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7fff204e2af6 bp 0x7ffeec2ad880 sp 0x7ffeec2ad880 T0)
==2150==The signal is caused by a READ memory access.
==2150==Hint: address points to the zero page.
    #0 0x7fff204e2af6 in _CFGetNonObjCTypeID+0xa (CoreFoundation:x86_64h+0x14baf6)
    #1 0x7fff20455141 in CFRunLoopTimerSetNextFireDate+0x39 (CoreFoundation:x86_64h+0xbe141)
    #2 0x10479f8bb in Fl_Cocoa_Screen_Driver::repeat_timeout(double, void (*)(void*), void*)+0x5b (mrv-dbg:x86_64+0x100e538bb)
    #3 0x1042d7c83 in mrv::ImageView::timeout() mrvImageView.cpp:3797
    #4 0x10430d4b8 in mrv::ImageView::handle_timeout() mrvImageView.cpp:8082
    #5 0x1042aab9d in mrv::static_timeout(mrv::ImageView*) mrvImageView.cpp:1675
    #6 0x10479f7d4 in do_timer(__CFRunLoopTimer*, void*)+0x34 (mrv-dbg:x86_64+0x100e537d4)
    #7 0x7fff204318fc in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__+0x13 (CoreFoundation:x86_64h+0x9a8fc)
    #8 0x7fff204313d7 in __CFRunLoopDoTimer+0x399 (CoreFoundation:x86_64h+0x9a3d7)
    #9 0x7fff20430f31 in __CFRunLoopDoTimers+0x132 (CoreFoundation:x86_64h+0x99f31)
    #10 0x7fff2041756e in __CFRunLoopRun+0x7d7 (CoreFoundation:x86_64h+0x8056e)
    #11 0x7fff204166bd in CFRunLoopRunSpecific+0x232 (CoreFoundation:x86_64h+0x7f6bd)
    #12 0x7fff28682fcf in RunCurrentEventLoopInMode+0x123 (HIToolbox:x86_64+0x30fcf)
    #13 0x7fff28682c21 in ReceiveNextEventCommon+0x11a (HIToolbox:x86_64+0x30c21)
    #14 0x7fff28682aee in _BlockUntilNextEventMatchingListInModeWithFilter+0x3f (HIToolbox:x86_64+0x30aee)
    #15 0x7fff22c2ff84 in _DPSNextEvent+0x372 (AppKit:x86_64+0x3ef84)
    #16 0x7fff22c2e74a in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]+0x555 (AppKit:x86_64+0x3d74a)
    #17 0x1047a2955 in Fl_Cocoa_Screen_Driver::wait(double)+0x245 (mrv-dbg:x86_64+0x100e56955)
    #18 0x10472514c in Fl::run()+0x1c (mrv-dbg:x86_64+0x100dd914c)
    #19 0x1047010b4 in main main.cpp:523
    #20 0x7fff2033b630 in start+0x0 (libdyld.dylib:x86_64+0x15630)

==2150==Register values:
rax = 0x9e49b50ccf28004e  rbx = 0x00000001042aab60  rcx = 0x79c5804a578a830b  rdx = 0x0000000000000000  
rdi = 0x0000000000000000  rsi = 0x00000000850431b4  rbp = 0x00007ffeec2ad880  rsp = 0x00007ffeec2ad880  
 r8 = 0x0000035ad9784647   r9 = 0x00000000029e4b17  r10 = 0x000000010f03be00  r11 = 0x00000000ffffff00  
r12 = 0x0000000000000000  r13 = 0x00001fffdd855d2c  r14 = 0x000061a00002ee80  r15 = 0x00007ffeec2aeaa0  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (CoreFoundation:x86_64h+0x14baf6) in _CFGetNonObjCTypeID+0xa
==2150==ABORTING

    #3 0x1042d7c83 in mrv::ImageView::timeout() mrvImageView.cpp:3797

Is the following line which works fine untill the crash:

    std::cerr << "repeat_timeout " << delay << std::endl;:
    Fl::repeat_timeout( delay, (Fl_Timeout_Handler)static_timeout, this );

And static_timeout function is:
	void static_timeout( mrv::ImageView* v )
        {
		v->handle_timeout();   // this function does a lot of things 
        }

Any ideas what I could try to narrow the problem down?  The problem seems to be in the ObjC code but not sure how to debug that code.

—
Gonzalo Garramuno
ggarra13@gmail.com




-- 
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/5948AE51-B6B6-4924-839E-D41B70E00D35%40gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.