Ubuntu windowed compatibility

Ubuntu windowed compatibility

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
varikonniemi
Posts: 450
Joined: 03 Jul 2011, 11:54

Ubuntu windowed compatibility

Post by varikonniemi »

Is there planned ubuntu unity windowed mode compatibility for spring?

What i mean is that currently when playing in windowed mode, and maximizing the screen, it does not hide the titlebar, window decorations and use the system titlebar.

This would be a really nice feature to have.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Ubuntu windowed compatibility

Post by hoijui »

it would be really strange if this needs special support from the applciation itsself, or say.. total fail architecture of unity.
varikonniemi
Posts: 450
Joined: 03 Jul 2011, 11:54

Re: Ubuntu windowed compatibility

Post by varikonniemi »

It is possible it is an Ubuntu bug.

I can trick it to go into proper maximized mode by repeatedly clicking on the maximize button. However immediately after it goes into proper maximized mode, spring crashes. It does only render one frame before crashing.

Here is console output if it helps:

Code: Select all

[f=0000000]  -> Version: 85.0
[f=0000000]  -> Connection established (given id 0)
[f=0000000] Player Player finished loading and is now ingame
[f=0000000] Error: Segmentation fault (SIGSEGV) in spring 85.0
[f=0000000] Error: Stacktrace:
[f=0000000] Error:   <0> /lib/x86_64-linux-gnu/libc.so.6(+0x36420) [0x7f02e4bf3420]
[f=0000000] Error:   <1> /usr/lib/nvidia-current-updates/libnvidia-glcore.so.280.13(+0x1075eee) [0x7f02e3798eee]
[f=0000000] Error:   <2> /usr/lib/nvidia-current-updates/libnvidia-glcore.so.280.13(+0x105b684) [0x7f02e377e684]
[f=0000000] Error:   <3> /usr/lib/nvidia-current-updates/libnvidia-glcore.so.280.13(+0xe995af) [0x7f02e35bc5af]
[f=0000000] Error:   <4> /usr/lib/nvidia-current-updates/libnvidia-glcore.so.280.13(+0xe99a46) [0x7f02e35bca46]
[f=0000000] Error:   <5> /usr/lib/nvidia-current-updates/libnvidia-glcore.so.280.13(+0xe99ebf) [0x7f02e35bcebf]
[f=0000000] Error:   <6> spring() [0x619218]
[f=0000000] Error:   <7> spring() [0xa50d20]
[f=0000000] Error:   <8> spring() [0xa5f360]
[f=0000000] Error:   <9> spring() [0xa50f4d]
Segmentation fault
varikonniemi
Posts: 450
Joined: 03 Jul 2011, 11:54

Re: Ubuntu windowed compatibility

Post by varikonniemi »

Ok i installed gnome-shell and hiding the titlebar seems to be working perfectly (using the hiding plugin). So i think we can say this is an issue with ubuntu 11.10:s unity, not spring.
varikonniemi
Posts: 450
Joined: 03 Jul 2011, 11:54

Re: Ubuntu windowed compatibility

Post by varikonniemi »

Sad to see this is still the case with ubuntu 12.04 unity :(

Code: Select all

[f=0000363] Video mode set to 1855x1148/32bit (windowed)
[f=0000363] Statistics for RectangleOptimizer: 0%
[f=0000378] Video mode set to 1920x1200/32bit (windowed)
[f=0000378] Statistics for RectangleOptimizer: 0%
[f=0000390] Error: Segmentation fault (SIGSEGV) in spring 88.0 (OMP)
[f=0000390] Error: Stacktrace:
[f=0000390] Warning: [Watchdog] Hang detection triggered for Spring 88.0 (OMP).
[f=0000390] Warning:   (in thread: main)
[f=0000390] Error: Stacktrace (main):
[f=0000390] Error:   (Note: This stacktrace is not 100% accurate! It just gives an impression.)
^C[f=0000390] caught SIGINT, aborting
[f=0000390] caught SIGINT, aborting
^CSegmentation fault (core dumped)
What caught my eye is that when maximizing, spring tries to set 1920*1200, even though there should be some 15 pixels missing from the vertical resolution (the top bar in ubuntu). Could this be the problem?
Last edited by varikonniemi on 31 May 2012, 12:27, edited 3 times in total.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Ubuntu windowed compatibility

Post by SinbadEV »

I don't know what I'm talking about but wasn't there a "bug" a while ago where windows SDL got the outer size (size of the window) while linux got the inner-size (size of the canvas) when checking window dimensions? Perhaps related to the
varikonniemi wrote:What caught my eye is that when maximizing, spring tries to set 1920*1200, even though there should be some 15 pixels missing from the vertical resolution (the top bar in ubuntu). Could this be the problem?
varikonniemi
Posts: 450
Joined: 03 Jul 2011, 11:54

Re: Ubuntu windowed compatibility

Post by varikonniemi »

Some new and unexpected behaviour found when trying with the launcher set to auto hide (full horizontal resolution).

This is the first time i see the correct resolution being set, but then it is immediately abandoned. 1176px is the correct vertical resolution when the window is toggled fullscreen (no titlebar).

At startup:

Code: Select all

[f=0000000] Video mode set to 1920x1176/32bit (windowed)
[f=0000000] Video mode set to 1920x1148/32bit (windowed)
But every now and then an extra mode change happens at startup:

Code: Select all

[f=0000000] Video mode set to 1920x1176/32bit (windowed) 
[f=0000000] Video mode set to 1918x1147/32bit (windowed) 
[f=0000000] Video mode set to 1920x1148/32bit (windowed)
Then ingame:

Code: Select all

[f=0000000]  -> Version: 88.0 (OMP)
[f=0000000]  -> Connection established (given id 0)
[f=0000000] Player UnnamedPlayer finished loading and is now ingame
[f=0000000] GameID: 563fc74ff1269b6e04abc4861cdf4421
[f=0000218] Video mode set to 1910x1200/32bit (windowed)
[f=0000218] Statistics for RectangleOptimizer: 0%
[f=0000266] Video mode set to 1920x1148/32bit (windowed)
[f=0000266] Statistics for RectangleOptimizer: 0%
[f=0000300] Error: Segmentation fault (SIGSEGV) in spring 88.0 (OMP)
[f=0000300] Error: Stacktrace:
[f=0000300] Error:   <0> /lib/x86_64-linux-gnu/libc.so.6(+0x364c0) [0x7f3a677454c0]
[f=0000300] Error:   <1> /usr/lib/nvidia-current-updates/libGL.so.1(+0x9af17) [0x7f3a6a965f17]
[f=0000300] Statistics for RectangleOptimizer: 0%
[f=0000300] Path cache hits 0 0%
[f=0000300] Path cache hits 0 0%
[f=0000300] Statistics for local connection:
Received: 1413 bytes
Sent: 3664 bytes

Segmentation fault (core dumped)
Ho and behold now the top bar and titlebar is taken into account while toggling maximize!

On top of that the stacktrace now tells where the crash happens and spring does close by it self (does not need ctrl-c) and no hang detection is triggered.

edit: i have now tested this on another (older) machine running the same OS and gfx driver, and i did not manage to get it crash. So the crashing problem is specific to the setup, the failure to maximize in correct way is true for all setups.
varikonniemi
Posts: 450
Joined: 03 Jul 2011, 11:54

Re: Ubuntu windowed compatibility

Post by varikonniemi »

I am pleased to announce this has been accepted as a bug in ubuntu and/or unity. No priority has though been set, so lets just wait and see what comes out of this.

edit:

as of 12.10 alpha2 this issue is not yet corrected, but the error has changed slightly.

Code: Select all

[f=0000000] GameID: 0148f54fbaad9ce704abc4861cdf4421
[f=0000011] Skirmish AI "Enemy" (ID:0, Short-Name:"RAI", Version:"0.601") took over control of team 1
[f=0000048] Wind Range: 0.5 - 2. Max Windmill altitude bonus is: 58%
[f=0000130] Video mode set to 1920x1200/32bit (windowed)
[f=0000130] Statistics for RectangleOptimizer: 0%
[f=0000333] Error: Bus error (SIGBUS) in spring 88.0 (OMP)
[f=0000333] Error: Stacktrace:
[f=0000333] Warning: [Watchdog] Hang detection triggered for Spring 88.0 (OMP).
[f=0000333] Warning:   (in thread: main)
[f=0000333] Error: Stacktrace (main):
[f=0000333] Error:   (Note: This stacktrace is not 100% accurate! It just gives an impression.)
varikonniemi
Posts: 450
Joined: 03 Jul 2011, 11:54

Re: Ubuntu windowed compatibility

Post by varikonniemi »

Here we are, spring is at version 91 and ubuntu at 12.10, and this bug is still present.

I would encourage all launchpad users to go click "this bug affects me" so that the report gets more points and the unity/compiz devs would bother doing something about it. https://bugs.launchpad.net/ubuntu/+sour ... ug/1006358
Post Reply

Return to “Linux”

cron