SFML community forums

Help => Window => Topic started by: BlueCobold on September 02, 2015, 03:02:12 pm

Title: [Ubuntu] Resizing a window hangs up app and system
Post by: BlueCobold on September 02, 2015, 03:02:12 pm
Hey. My game uses resizeable windows and they can be resized properly on Windows and OS X, but when trying to resize them on Ubuntu, everything goes very bad. I pick the window-border, move the mouse a little and the window size changes, *but* a blink later it switches right back to the previous size and even worse, when releasing the mouse-button, the window *keeps* resizing with every mouse move (and switching back and forth) all the time. That results in the app basically hanging up and my system too. Rendering is getting totally messy overall and becoming unresponsive until I kill the app via CTRL+C in the terminal it was launched from. The more I move the mouse, the worse the overall system performance gets.
Any ideas?
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: eXpl0it3r on September 10, 2015, 12:47:11 am
Are you testing things still in a VM or is it a native system?
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: BlueCobold on September 10, 2015, 10:42:59 am
VM, but I got same behavior reported from others on native systems.
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: eXpl0it3r on September 10, 2015, 11:23:23 am
What Ubuntu version, what window manager and which SFML version?
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: BlueCobold on September 21, 2015, 02:00:22 pm
Ubuntu 14.04
Window Manager Compiz (CURRENT_DESKTOP/SESSION -> Unity 3D)
SFML 2.3.2
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: Tank on September 21, 2015, 02:20:06 pm
Please provide a minimal example that reproduces the problem.
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: BlueCobold on September 21, 2015, 02:36:54 pm
The SFML-sample is a minimal example.
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: binary1248 on September 21, 2015, 03:21:26 pm
Build both SFML and your application in debug and see if anything shows up on the console. If nothing shows up, you can try using a system profiler to see where the system spends most of its time while running your application.
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: BlueCobold on September 21, 2015, 03:28:53 pm
Can't debug, because it messes up my entire system. I will build in debug and monitor the console and error log when I have the time and report back,
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: Jesper Juhl on September 21, 2015, 03:30:42 pm
Can't debug, because it messes up my entire system.
That sounds like a problem you might want to fix first. Development qithout being able to use a debugger is going to be a pain in the neck going forward.
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: BlueCobold on September 21, 2015, 04:32:41 pm
I can use a debugger in general, but I can't debug this specific bug, because the bug causes my system to get messed up. See the original report in the first comment in this topic.
Title: Re: [Ubuntu] Resizing a window hangs up app and system
Post by: binary1248 on September 23, 2015, 04:36:08 am
Build the application in debug with profiling (gprof) enabled. Let it run a bit, do stuff to your system, then close/kill it. The profiling data should still be saved AFAIK. You can then use gprof to process it and see where most of the time (if any) is spent inside your application and SFML.

If it gets really bad, you can always just SSH into your machine from another and run something like oprofile from the command line while the application is running. Just like gprof, you can process the collected data in peace after you kill the application once you think enough samples have been collected.