FLTK logo

Re: [fltk.coredev] Rare crash on repeat_timeout on macOS

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 ]

Re: Rare crash on repeat_timeout on macOS Gonzalo Garramuno Dec 08, 2021  
 

> El 8 dic. 2021, a las 04:40, Manolo <manolo.gouy@gmail.com> escribió:
> 
> The doc of Fl::repeat_timeout() states :
> "You may only call this method inside a timeout callback of the same timer or at least a closely related timer, otherwise the timing accuracy can't be improved and the behavior is undefined."
> 
> In your code, the timeout callback function is mrv::static_timeout(), which calls at some point ImageView::timeout() which does Fl::repeat_timeout().
> 
> The question is what happens between the beginnings of mrv::static_timeout() and of ImageView::timeout() ?

Nothing.  Static timeout calls view->timeout() on the Imageview class.

> If the event loop runs in between, then another timeout event can be triggered, and chaos arises.
> ¿ Do you call Fl::wait(), Fl::flush(), Fl::check() within mrv::static_timeout()  or functions it calls ?
> If yes, that would be in contradiction to the correct use of Fl::repeat_timeout().
> 

No.

—
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/8856BFD1-8C93-46CA-9AB5-A5ABF8BD0977%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'.