Cannot Build Roads/Set Flags to end a Road in RC

Bug #1637916 reported by Michael
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

I installed the RC from version 19 an tried a game on the map "Eiskriege". For getting into the game I did not choose any enemy. B ut as I tried to lay out some roads for the buildings to be attached to (later on) I was not able to put a flag to end the road.
So, I clicked at the flag of the headquarter, then clicked on the "road" symbol - the mini-windows jumped to another place on the screen, and then I had to click the road symbol once again. Just then was I able to lay out a road. But when I wanted to put an end to it, I was not able to, because everytime I clicked on the "flag"-symbol the mini-window jumped away to another place, but the flag was not set.
Happened in fullscreen and windowed mode.
I also expierenced exactly the same problem with one of the nightly builds I found somewhere on your website.
System:
Some Intel Xeon machine with 4 cores and HT, 8 GB RAM, Windows 7 x86-64;

Revision history for this message
GunChleoc (gunchleoc) wrote :

This might be related to whether you're in road building mode or not. We will need a bit more information to fully understand what is happening:

1. Go to Options -> Game. Is "Start building a road after placing a flag" (the first checkbox) on or off?

2. Can you make some screenshots (Ctrl+F11, files saved as described on https://wl.widelands.org/wiki/Technical%20FAQ/#where-are-my-maps-and-savegames-stored) and attach them to this bug?

There might also have been no free space to build a road where you wanted it, because buildings, trees or unwalkable terrain are in the way.

Revision history for this message
kaputtnik (franku) wrote :

A savegame would be helpfull too :-) Just beneath the textbox you find the link "Add attachement or patch" wher you could upload a file here.

Revision history for this message
Michael (wbjc) wrote :

Well! The box you mentioned is set "enabled". As I wanted to create a screenshot I was suddenly able to set one flag:
I started a new game, wanted to build a road starting at the headquarter and ending somewhere else. I set the course, and the I could not set the flag.
I tried the other way around and set the flag, and then began to build the road, which worked. Then I wanted to put flags but that was not possible. At this point I pressed "Alt + Print" and created the screenshot attached (Screenshot_01.png).
After I pressed the keys, I was able to set the flag, but only one! I suspected the "Alt"-key, and so it was: To put the second flag, I had to press "Alt" once more.
If the flag in the Options-Menue isn't set, I can not put any flag into an existing road at all! I can only build roads between to existing flags.
I can only put these flags on a place where otherwise a building could be built. If I go to a place where only a flag can be set, I can not put one, even by pressing "Alt". That is true with any setting in the Options-Menue!

Revision history for this message
Michael (wbjc) wrote :

This is the screenshot for the second flag I put.

Revision history for this message
Michael (wbjc) wrote :

This is the savegame where I tried the mentioned things.

Revision history for this message
GunChleoc (gunchleoc) wrote :

If you hit the space bar / enable the "Show Building Spaces" button, you will see symbols on the map about where you can build what. Are you sure that you haven't tried placing a flag where there is no flag symbol? The jumping away usually happens if there is no way to build a road to the point where you are clicking.

In case you are new to Widelands, have you played the first tutorial?

Revision history for this message
kaputtnik (franku) wrote :

> Are you sure that you haven't tried placing a flag where there is no flag symbol?

If placing a flag isn't possible during building a road the corresponding menu shows only 'Cancel Road' or 'Build road', so there is no possibility to place a flag.

The first screenshot shows trying to place a flag between two flags and the menu says it could be done, so a flag is possible there. I also made the same road and could place a flag there.

Overall i couldn't reproduce this on Linux build19.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I tried reproducing this both in Linux and Windows, and everything's fine. I can build a road to or from the headquarters and add a flag to the middle of the road.

What is really weird is that the ALT key makes any difference whatsoever, because we only check for the Ctrl key when flag/road building. The only place the ALT key is used at all is when filtering messages in the message menu, and in the editor to select an alternative tool.

Revision history for this message
Michael (wbjc) wrote :

No, I'm not new to Widelands, I played the version before for 1000 hours (literally) and years before I played "Die Siedler" for ages!
I am quite sure, about where I want to put the flag, but it is not possible - and I also checked with the space bar-trick! :-)
To be quite honest, the "workflow" I got used to and happens automatically when I want to create or build something does not work at all. I would be glad if I was the one who uses it in a wrong way.
Is there a possibility to create a small movie oder gif to show you what's happening when and how?
I tried to compile it on my Linux notebook, but unfortunately I wasn't able to:
"./compile.sh: 119 ./compile.sh: cmake: not found" - even though cmake is there...

Revision history for this message
GunChleoc (gunchleoc) wrote :

You should be able to record the game with OBS Studio https://obsproject.com/ - best use the lowest resolution, so it won't get too big. Then compress it and attach it to this bug.

I am really stumped right now, so a movie might help :)

I'm away from my Linux machine right now, so I can't help with the CMake problem at all - we'd need more info about you distro and CMake version I guess.

Revision history for this message
Michael (wbjc) wrote :

I discovered something else - please take a look at the video! I started the game, in the screen where I can specify the other players the cursor lagged, as if the framerate was about 10 fps or so.
When the game is started and I want to build a road, you can see the small window jumping around. You might also see, that the cursor ist jumping around unpredictably.
I also noticed that pressing "Alt" is not the wonderweapon - but clicking on another area other than the wanted button in the first place enables the desired function.

My Linux machine is a Linux Mint 18 with Plasma.

Revision history for this message
Michael (wbjc) wrote :

It seems to me, as if the cursor is at a different place than it is shown in the first place. In the beginning of the video people are sent out - that happened earlier, too! Only when I click on a different place the cursor seems to be "recalibrated"?!?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I'm on Ubuntu myself, which is very similar to Mint.

I have never seen the window jumping around like that - I'm wondering whether this is driver-related somehow. We migrated to SDL2 and reworked the graphics system since Build 18.

Revision history for this message
kaputtnik (franku) wrote :

Never seen this 'jumping' also.

Maybe this something with the mouse(driver)? Micheal, could you test it with another mouse?

What graphics card is used?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I did some testing in a Linux Mint VM:

* Click on where you want the road to end
* Click again -> Window opens, mouse is on the button
* Move the mouse slightly -> mouse jumps away from the window to the road end.

I cannot reproduce this with Windows on the same machine, so this seems to be Linux Mint related somehow.

Revision history for this message
Michael (wbjc) wrote :

I could test it with another mouse - but I installed it on a machine at home and on two at work - all of them Windows 7, and two with an Intel CPU and nVidia GPU and one with both from AMD. The Intel machines were one 5 year old workstation, and one brand new laptop, the AMD machine is a usual PC.
Perhaps I can try it on a Windows 10 machine tomorrow (the former AMD machine - I "upgraded")...
But I suppose this is not mouse or driver related (which could be wrong) - but version 18 worked fine an all machines I ever tried.
I also realised, that when scrolling around it is unpredictable where I will land. Seems to the same problem?

Revision history for this message
Michael (wbjc) wrote :

PS: The nVidia-cards are Quadro-cards, can't remember the PC-card, but the laptop-card is one M1000M, newest driver.. The AMD card is a Radeon HD 5770, newest non-beta-driver.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I guess #16 is the same problem.

And since we did a lot of work on the graphics engine, yes, it can be a buggy driver, even on the same machine. We are using graphics features now that we didn't use before. I'll ping SirVer for this bug, since he knows the graphics stuff a lot better than I do - he's busy at the moment though.

Changed in widelands:
assignee: nobody → SirVer (sirver)
Revision history for this message
Michael (wbjc) wrote :

No hurry! I will try to test on two oder three Windows 10 machines, but I can not promise or tell the time when I could be done with it.
If there's testing to do I'll try to help! Just tell me.

Revision history for this message
Michael (wbjc) wrote :

I tried one Windows 10 AMD-Machine (some 8 core Vishera CPU and the Radeon HD 5770) - there it seems to work fine. So it's either Windows 7 or the nVidia driver.
I need to add, that I'm not quite sure if I tested the mentioned AMD machine on Windows 7 though?!
I think I tested a nightly build some months ago...

Revision history for this message
Michael (wbjc) wrote :

Tested the final version - the bug seems to be slightly different now. Doubleclick to set a flag does not work, but one short move of the cursor between the clicks seems to work now.
But, when I click first to set a flag somewhere, and then move the mouse a slightest bit, the cursor jumps from the action-windows to the place where it originally was.
It's not perfect, yet.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Are you sure that there is a different? The only change is the version number, so we haven't done anything with the graphics code.

I've added a milestone so that we won't forget this bug.

Changed in widelands:
milestone: none → build20-rc1
Revision history for this message
Michael (wbjc) wrote :

Well - to be honest I'm not sure if I tried the thing with the slight mouse-movement in the RC. So, I might just not have realised the behaviour.
I am sure, that with the RC I actively had to click somewhere else on the windows so that afterwards I was able to hit the needed button - yet I'm not sure, if the mouse jumped back to the place where it was before, though.

Revision history for this message
SirVer (sirver) wrote : Re: [Bug 1637916] Re: Cannot Build Roads/Set Flags to end a Road in RC

I changed the behavior of this in the zoom branch. Can you try a nightly version after build 19?

> Am 15.11.2016 um 15:44 schrieb Michael <email address hidden>:
>
> Well - to be honest I'm not sure if I tried the thing with the slight mouse-movement in the RC. So, I might just not have realised the behaviour.
> I am sure, that with the RC I actively had to click somewhere else on the windows so that afterwards I was able to hit the needed button - yet I'm not sure, if the mouse jumped back to the place where it was before, though.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1637916
>
> Title:
> Cannot Build Roads/Set Flags to end a Road in RC
>
> Status in widelands:
> New
>
> Bug description:
> I installed the RC from version 19 an tried a game on the map "Eiskriege". For getting into the game I did not choose any enemy. B ut as I tried to lay out some roads for the buildings to be attached to (later on) I was not able to put a flag to end the road.
> So, I clicked at the flag of the headquarter, then clicked on the "road" symbol - the mini-windows jumped to another place on the screen, and then I had to click the road symbol once again. Just then was I able to lay out a road. But when I wanted to put an end to it, I was not able to, because everytime I clicked on the "flag"-symbol the mini-window jumped away to another place, but the flag was not set.
> Happened in fullscreen and windowed mode.
> I also expierenced exactly the same problem with one of the nightly builds I found somewhere on your website.
> System:
> Some Intel Xeon machine with 4 cores and HT, 8 GB RAM, Windows 7 x86-64;
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/widelands/+bug/1637916/+subscriptions

Revision history for this message
Michael (wbjc) wrote :

I tried this version:
https://widelands.8-schuss.de/Widelands-bzr8177-nomusic-win64.exe
Did you mean that version? There the behaviour was quite the same.
Didn't find another source other than that site, following this site:
https://wl.widelands.org/wiki/BuildingWidelandsUnderWindows/

Revision history for this message
SirVer (sirver) wrote :

That is exactly what I meant. Thanks!

Revision history for this message
Michael (wbjc) wrote :

Is there any news? Tried the lates nb and the problem seems to persist.

Revision history for this message
SirVer (sirver) wrote :

Unfortunately not, it seems nobody was able to reproduce your error.

In your video, it is clearly visible that the mouse cursor jumps to the new button, but when you click or slightly move the mouse, the mouse is still recorded at its old place. This is like we are warping the mouse, draw our next frame and then something warps the mouse back to the position before we drew. As long as we cannot reproduce this error on another system it will be probably hard to fix.

I doubt that it has to do with the graphics driver, I believe something is messing with the mouse. Did you try using another mouse and unplugging the one that makes issue? Is this a fancy mouse that comes with its own driver (e.g. a Razor gaming mouse or something)?

Revision history for this message
Michael (wbjc) wrote :

So, I tried another mouse and the error keeps coming up. The mice aren't fancy at all, my alltime-mouse is a Microsoft IntelliMouse with 4 Buttons and a wheel, some 6-7 years old, and the test-mouse was a 2 button 1 wheel generic 5€ mouse.
I think you got the problem right, from the look of things. The graphics drivers are original nVidia Quadro drivers and not from the machine vendor.

I tried it on my workstation (which I mentioned before) connecting via UltraVNC (just came to my mind) and it worked quite fine!
So, to sum it up:
I had two machines, both Win 7, both nVidia Quadro GPUs, and both with the very same problem, on all versions I've tested. But when I take one of these machines and conntect to it from the other via VNC, then the problem is gone.

What can I test for you?

Revision history for this message
SirVer (sirver) wrote :

I really cannot see how the graphics driver should be at fault here. It sounds to me like this bug:
http://sdl.libsdl.narkive.com/vzgsL2Qx/bug-sdl-warpmouse-does-not-change-mousestate - problem is just, this bug is fixed since 12 years and should not affect SDL2 (which we are using).

Please test the following combinations:

1) Turn fullscreen on, then restart Widelands (which should now start in fullscreen)
2) Disable/Enable "Grab input" in Widelands options.

Revision history for this message
Michael (wbjc) wrote :

I'm not really getting it now, experienced something weird:
I tried in windowed mode, and the jumping and all was the same. Switched to fullscreen, and it worked, but only after restartign the game. Without restarting the game the problem persisted!

Then I went back to windowed-mode and it still worked - even restarting the game did not "restart" the problem. Likewise in windowed and fullscreen! I did not change any other option, only the resolution and windowed mode.
Only after restarting the whole machine the problem reoccurred!? Startled...

Revision history for this message
Michael (wbjc) wrote :

Installed it on my little Lenovo ThinkPad with Windows 7 and a Intel onboard GPU and it works like a charm from the beginning! I'm realy thinking it's a driver-problem?!
Perhaps I can test it on another Windows 7 machine with an old AMD GPU this week - I keep you updated!

Revision history for this message
SirVer (sirver) wrote :

I cannot fathom how the graphics driver should impact this logic in the mouse handling.....

Have you also tried playing with the "Grab input" setting?

Revision history for this message
Michael (wbjc) wrote :

Where can I set "Grab input" - I only can find "Fange Maus (im Fenstermodus)".
But then also the cursor jumps around. The behaviour is exactly the same - no matter if this checkbox is set or not.

I cannot fathom the influence of the graphics driver, as I'm not a real programmer (except for a few scripts and so on).

Revision history for this message
Michael (wbjc) wrote :

I assume there's no news?
Can I help out with some (specific) testing?

Revision history for this message
GunChleoc (gunchleoc) wrote :

I confirmed the bug in #15, using a Linux Mint VM with a touchpad - Windows 7 doesn't have any problems on the same machine. I should still check if there is any change from Mint 17 to Mint 18.

Changed in widelands:
status: New → Confirmed
Revision history for this message
SirVer (sirver) wrote :

Unassigning myself - I cannot be of use here without being able to repro the bug, sorry.

Changed in widelands:
assignee: SirVer (sirver) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

I can reproduce this on Linux Mint 18 too. My VM is really slow, so fixing this will probably take a few weeks, if I can find it. Any ideas where to start looking?

Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
Revision history for this message
Michael (wbjc) wrote :

Hey there, I tried the nightly build (Widelands-bzr8262-nomusic-win64.exe) today and I could NOT (!) reproduce the jumping behaviour.

So, whatever you did, it works now?!

Revision history for this message
Michael (wbjc) wrote :

I experienced one problem, though, when I was scrolling around on the map - the movement seemed to be "accelerated" an I moved along faster than I was moving the cursor. Happened only once, and I could not reproduce it. I got rid of it, when I restarted the machine. Did not test, if a restart of only the game would have helped because I could not reproduce it.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I can't reproduce this on Ubuntu 18.04 - are you still getting this?

Revision history for this message
Michael (wbjc) wrote :

Didn't encounter this problem anymore.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for testing again!

Setting this to fixed.

Changed in widelands:
status: Confirmed → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.