Design window multi-character typing bug (was multi-screen)

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderators: Oberlus, Oberlus

Message
Author
User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Design window multi-character typing bug (was multi-screen)

#1 Post by MatGB » Sun May 04, 2014 8:12 pm

How about this for a weird one. Because the case on my laptop is fading, I've set it up as a desktop and plugged in an old spare monitor. Old monitor is more square than the laptop screen so I've set FO to run on that screen with my browser &c on the laptop screen. This is rather good.

However, whenever I'm typing to, say, name a ship design, I get multiple inputs per keypress, so I get stuff like TTroooopperrs. It's not for EVERY keypress, but for enough to be annoying, and also for the delete/backspace key.

If I drag the game window back to the primary window, the problem stops, but this is, well, sub optimal. Windows 7, most up to date binaries. Any ideas why it would do this?

Edit: as discussed down thread, it's not related to using multiple screens and is affecting more users.
Last edited by MatGB on Tue Jun 10, 2014 3:18 pm, edited 1 time in total.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Multi-screen typing bug

#2 Post by Geoff the Medio » Sun May 04, 2014 8:57 pm

Don't know why it would happen only on a particular screen... Some weird issue with video drivers affecting frame rate somehow...? I fairly recently added repeat keypress generation to support multiple character entry / backspacking while holding the key. Presumably something's related to that? Do you notice any difference when single clicking up/down buttons in the GUI with the mouse, where holding the mouse button down would cause multiple increments, such as spinners for number entry, like when specifying number of systems in galaxy setup?

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi-screen typing bug

#3 Post by MatGB » Mon May 05, 2014 5:04 pm

Just had the bug repeat on me (annoyingly, it's not consistently there, and I can't figure out what's different between sessions when it's there and not), and yes, in the objects search I tried a property value and clicking up increments it in multiples on some clicks and singles on others with no consistency of approach, but moving the window the the main screen stops that from happening, moving it back it starts again.

I hadn't actually noticed you'd done that in the changelog, perhaps it's a bit too sensitive?
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Multi-screen typing bug

#4 Post by Geoff the Medio » Mon May 05, 2014 5:20 pm

MatGB wrote:...yes, in the objects search I tried a property value and clicking up increments it in multiples on some clicks and singles on others with no consistency of approach, but moving the window the the main screen stops that from happening, moving it back it starts again.
If you turn on the FPS display in the video tab of options, do you see any difference when moving back and forth between the screens?
I hadn't actually noticed you'd done that in the changelog, perhaps it's a bit too sensitive?
It uses almost the same code and timing as the automatic incrementing of spinner controls while holding down the mouse button... That you have issues only on one screen suggests some weird rendering problems that might be affecting the timing. It wouldn't be too difficult to add options to control the repeat rate and initial repeat delay time, though.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi-screen typing bug

#5 Post by MatGB » Mon May 05, 2014 6:22 pm

Geoff the Medio wrote:If you turn on the FPS display in the video tab of options, do you see any difference when moving back and forth between the screens?
Not really, it varies between 0 and 5 on both screens and doesn't seem to specifically change when I move the window around or do something in either of them.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Multi-screen typing bug

#6 Post by Geoff the Medio » Mon May 05, 2014 6:26 pm

MatGB wrote:Not really, it varies between 0 and 5...
Uh... well, maybe your problem is that it's having such a hard time rendering that it's occasionally showing 0 FPS, and that's really messing up the keyboard event timing? Have you disabled galaxy gas and starfields, or otherwise fiddled with options to improve that rendering speed? It's not an accurate FPS calculation (though I have no idea why) but that's still quite low.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi-screen typing bug

#7 Post by MatGB » Mon May 05, 2014 6:39 pm

Both gas and starfield are disabled, although I never notice a difference between having them on and off when I play.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

jenschou
Space Krill
Posts: 9
Joined: Sat May 03, 2014 6:53 pm

Re: Multi-screen typing bug

#8 Post by jenschou » Mon May 05, 2014 8:47 pm

Hi!

I've had this same bug in one game. Playing FO 7064, on Win7. Nothing special with monitors, in my mind it was due to lag. I was playing a rather big game, something like 300 systems, and mid or high planets, and was late in the game. Everything was starting to go slow, and then even typing design names went slow... That is the only typing I do. Most of the letters in a name would get right, but one would get doubled, then backspacing it always removed both the doubles. Had to manipulate the typing to get correct spelling...

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi-screen typing bug

#9 Post by MatGB » Mon May 05, 2014 10:25 pm

Ah yeah, um, for the first time, when moving the window back to the main screen I got the bug continuing, so it's not a secondary window issue afterall, it's just that it's showing up for me more on the other window.

I am, however, not seeing a huge amount of lag in many other aspects of the game, nowhere near as bad as I used to complain about massively before the recent recoding, so while lag could be part of it given that production window and similar appear to be workign without major issue and this has been happening to me even very early in games I think there's more to it.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Multi-screen typing bug

#10 Post by Geoff the Medio » Tue May 06, 2014 7:07 am

"Lag", or UI hangs, can have several causes. If you're just setting up a galaxy and not in a game, or just typing text and not actually clicking to confirm a new design or or issue a fleet move order, the recent changes to effects processing are irrelevant. Getting 0-5 FPS consistently is probably a rendering issue, and seemingly is related to UI response timing quirks.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi-screen typing bug

#11 Post by MatGB » Tue May 13, 2014 9:41 am

Here's a weird one related to this-using the ship design window I get repeat keypresses often, even in early game where lag isn't otherwise noticeable (but FPS is and always has been low for me, I don't know what it's supposed to be but… actually, I ought to use Winter Leaf's laptop at some point for a game, it's far better specced than mine).

But if I use the 'rename' option I have yet to notice a single repeat keypress unless I hold the key down deliberately. So it looks like it's a design window specific issue. Possibly?
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Multi-screen typing bug

#12 Post by mem359 » Tue Jun 10, 2014 2:26 pm

I had started up a different thread describing similar symptoms, but slightly different circumstances.
viewtopic.php?f=28&t=8876&p=69656
Geoff pointed out this thread.

For my situation:
- Only happens for the "design name" field, not the "description". (Maybe related to the live updating of the name at the top of the window?)
- Consistently happens sometime between turns 150-160. (Before then, no problem.) I normally play 150 systems (with everything else on medium), but it just happened with a 120 system game.
- Started happening for me a few (weekly) builds ago, but I don't remember exactly which one. (Beginning of May might be right.)
- Using a laptop, but not multiple screens

I had the "limit FPS" video option turned on, but I didn't realize that it doesn't do anything.
(EDIT: Just saw Geoff's comment. I had picked a number that only limited FPS a little bit, so I didn't notice. If I pick a number like "10", then I can see FPS drop down to 16.)

I'm surprised that lag would be an issue for the ship design screen, as it looks much simpler than something like the normal galaxy window. I've been deleting obsolete "finished designs", so there are not a huge number of ship types to scroll through. And the double letter behavior seems to be independent of tech advances, so it's not like a new hull type is causing problems.
Last edited by mem359 on Tue Jun 10, 2014 2:45 pm, edited 2 times in total.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Multi-screen typing bug

#13 Post by Geoff the Medio » Tue Jun 10, 2014 2:29 pm

mem359 wrote:I had the "limit FPS" video option turned on, but I didn't realize that it doesn't do anything.
FPS limit does do something, which is to limit the FPS. It just doesn't do what it appears to, which is limit to the specified FPS. It limits to some other FPS, which is not the number specified. A larger specified number will, I think, cause a larger actual FPS limit, though.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Multi-screen typing bug

#14 Post by MatGB » Tue Jun 10, 2014 3:16 pm

I'm going to change the name of this thread, because it's also happening if I'm sat with just the laptop on the sofa and similar, appears it came into SVN at roughly the same time I started using multiple screens by coincidence and I didn't do enough testing.

It is now happening fairly consistently for me in the later stages of games, can't give a specific turn number or trigger for it.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Design window multi-character typing bug (was multi-scre

#15 Post by Geoff the Medio » Tue Jun 10, 2014 8:15 pm

Latest SVN lets the delay time and interval for keypress and mouse button auto-repeat be adjusted. Currently requires a restart to take effect. This should hopefully let this type of issue be avoided, by setting the repeat delay higher. If not, then setting the delays to 0 should disable it entirely. If that doesn't work... I dunno.

Post Reply