Key/Mouse problems while debugging dosbox-debug is active

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Key/Mouse problems while debugging dosbox-debug is active

Postby llm » 2018-6-12 @ 15:44

i've got a fresh/clean (debug - not release)VS2010 x86 build of dosbox-svn, SDL 1.2.15 and debug-/heavy-debug-option active, core=normal

when i try to debug the DOS_Execute function and try to step in VS2010 with F10,F11 F5 and others the keys do not work
and the mouse hangs sometimes, is dosbox-debug too harsh catching key/mouse-events or something?
option to disable this behavior?
llm
Newbie
 
Posts: 42
Joined: 2009-1-18 @ 16:57

Re: Key/Mouse problems while debugging dosbox-debug is active

Postby Qbix » 2018-6-12 @ 16:45

Yeah, common problem, no known solution.
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10748
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Key/Mouse problems while debugging dosbox-debug is active

Postby llm » 2018-6-12 @ 19:06

more details, discussion or a bug report available?
llm
Newbie
 
Posts: 42
Joined: 2009-1-18 @ 16:57

Re: Key/Mouse problems while debugging dosbox-debug is active

Postby rainwarrior » 2018-7-13 @ 23:10

It happens to me too in VS2017, basically with any breakpoint my system drops to about 1/3 fps and most keypresses / clicks / mouse movement will be dropped. Kinda just have to rapidly tap SHIFT+F5 until it manages to resume. (Actually did a little bit of debugging like this, but it was extremely frustrating and afterwards I switched to "printf debugging" instead.)

Seems to happen in GDB to with MinGW/MSYS to a lesser extent, but after the initial "slideshow" moment after hitting a breakpoint if I switch some windows around it seems to recover and I can step normally in GDB, so at least that's usable.

Has this been a problem for a long time? Does it affect other platforms or only windows?
User avatar
rainwarrior
Newbie
 
Posts: 5
Joined: 2018-7-13 @ 02:21
Location: Canada

Re: Key/Mouse problems while debugging dosbox-debug is active

Postby Jamiras » 2019-1-23 @ 23:27

For what its worth, it appears to be caused by the DirectInput code in the SDL library. Commenting out these lines fixes the issue (but causes other issues since the inputs aren't being processed):

Code: Select all
   /* Initialize DirectInput */
   if ( DX5_DInputInit(this) < 0 ) {
      return(-1);
   }

Related discussion that seems to support my observation: https://stackoverflow.com/questions/178 ... -debugging

I don't know if it's fixed in a newer version of SDL, or if there's a non-breaking change/configuration that could be applied to work around the issue.
Jamiras
Newbie
 
Posts: 1
Joined: 2019-1-23 @ 23:17

Re: Key/Mouse problems while debugging dosbox-debug is active

Postby ripsaw8080 » 2019-1-24 @ 01:04

In that case, perhaps setting SDL_VIDEODRIVER=WINDIB in environment variables before executing DOSBox can help.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4314
Joined: 2006-4-25 @ 23:24

Re: Key/Mouse problems while debugging dosbox-debug is active

Postby kjliew » 2019-1-24 @ 06:05

Setting SDL_VIDEODRIVER=windib works for gdb for debugging DOSBox as long as it is not interfering with the feature you plan to debug on. I have been exclusively using gdb for debugging for years. My VS experience has been fading and I think the last version I used was VS2003 and thereafter never bothered for any new version of VS anymore. DOSBox was the reason back then that made me look into GCC seriously, a path that I have never looked back since then, even after Microsoft has eventually released Visual Studio for free.
kjliew
Member
 
Posts: 331
Joined: 2004-1-08 @ 03:03


Return to DOSBox Development

Who is online

Users browsing this forum: BLEXBot [Bot] and 0 guests