codelite icon indicating copy to clipboard operation
codelite copied to clipboard

[Bug]: SDL2 stops working after awhile.

Open shadoww1028 opened this issue 1 year ago • 0 comments

What happened?

Linux Mint AMD AMD GPU

There has been then bug where when after running GDB to debug a SDL2 application my window manger stops working correctly or I get blank SDL2 windows. I finally narrowed down to Codelite its self. I originally thought it was compiz but after trying on KDE and seeing the same bug I was just amazed.

When it does NOT happen:

If XFCE is doing the window composition aka no 3d this bug does not happen. I like wobbly windows to much.
If running GDB under clion this bug does NOT happen.
Also does not happen under nvim, this was hard to test...
If running LLDB debugger under codelite it also does NOT happen.
If just running GDB from the command line it doe NOT happen.

It seems like Codelite is interfering with SDL2 somehow when initializing the window when debugging under GDB. How to reproduce (one of the most annoying bugs to reproduce)

  1. It will not happen right away, you have to keep rerunning the debugger for about 20 minutes. (just hit f5 over and over) This would be same as developing something for a few days.
  2. The source code: https://lazyfoo.net/tutorials/SDL/07_te ... /index.php
  3. Just keep running and eventually a blank window will appear or no window. and when you try to debug it again it will work for awhile then after a few more debugs it will not but once you hit this first occurrence it seems to be easier to reproduce.

This is a very annoying bug because it crashed KDE and Compiz will eventually become non functioning but handles it better than KDE.

Codelike 14+ also on 17 the latest.

Version

Other

Operating system

Linux

Steps to reproduce

1.  It will not happen right away, you have to keep rerunning the debugger for about 20 minutes. (just hit f5 over and over) This            would be same as developing something for a few days.
  2.  The source code: [https://lazyfoo.net/tutorials/SDL/07_te ... /index.php](https://lazyfoo.net/tutorials/SDL/07_texture_loading_and_rendering/index.php)
 3.   Just keep running and eventually a blank window will appear or no window. and when you try to debug it again it will work for awhile then after a few more debugs it will not but once you hit this first occurrence it seems to be easier to reproduce.

Relevant log output

Blank window.
If break on exception you do get an exception that is of no help.

shadoww1028 avatar Jan 21 '24 23:01 shadoww1028