FLTK logo

Re: [fltk/fltk] Intermittent crash from Fl_Simple_Terminal dtor on Windows (#89)

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.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Intermittent crash from Fl_Simple_Terminal dtor on Windows (#89) erco77 Sep 17, 2020  
 

I've been unable to reproduce the crashes myself with 1.4.x on linux (I know Albrecht did).
I tried about 8 times could not replicate, wasn't sure how many times it took. My attempts:

  1. Open unittests
  2. Choose "simple terminal"
  3. Wait a bit
  4. Click the 'X' to close the window or hit ESC

Also tried selecting other tabs after (3).

That said, I created a branch 'issue89' in my fork with a suggested patch that does an early exit if the entire buffer is being deleted, using a new protected method empty_display() to clear the internals. I didn't super-carefully check every variable to see how the internals are managed.. it is a beast.. but perhaps this is a good general direction to go.

Also attaching a test program that cycles a single Fl_Text_Display through different buffer() values:

  • a "large" text buffer (contains lots of aaa's..)
  • a "small" text buffer (contains a few bbb's..)
  • an "empty" text buffer (contains "")
  • a null text buffer, e.g. buffer(0)

Each press of the "Cycle" button above the editor cycles through this list. Ran through valgrind, etc.
Wanted to make sure switching buffers worked correctly with these mods.
cycle_text_buffers.zip


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

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'.