After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753927 - display-config crashes in read_current_config
display-config crashes in read_current_config
Status: RESOLVED FIXED
Product: gnome-flashback
Classification: Other
Component: display-config
unspecified
Other Linux
: Normal critical
: ---
Assigned To: GNOME Flashback Maintainers
GNOME Flashback Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-21 12:35 UTC by Balló György
Modified: 2015-12-14 04:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
My ~/.config/monitors.xml file (4.84 KB, application/xml)
2015-08-21 21:20 UTC, Balló György
Details
My ~/.config/monitors.xml file (513 bytes, application/xml)
2015-08-21 21:39 UTC, Balló György
Details
Test (3.31 KB, text/plain)
2015-08-22 12:24 UTC, Alberts Muktupāvels
Details
gnome-flashback log (2.80 KB, text/plain)
2015-08-22 14:24 UTC, Balló György
Details
gnome-flashback log 2 with metacity (938 bytes, text/plain)
2015-08-22 16:24 UTC, Balló György
Details
mutter log (4.10 KB, text/plain)
2015-08-22 17:22 UTC, Balló György
Details

Description Balló György 2015-08-21 12:35:59 UTC
I could always reproduce the same problem reported by a Fedora user:
https://mail.gnome.org/archives/gnome-flashback-list/2015-August/msg00021.html

I can't reproduce this problem when I replace the window manager with mutter. I'm using the current git master version of metacity and gnome-flashback on Arch Linux.

Here is the backtrace:

  • #0 read_current_config
    at flashback-monitor-manager.c line 1296
  • #1 flashback_monitor_manager_read_current_config
    at flashback-monitor-manager.c line 1956
  • #2 flashback_monitor_manager_constructed
    at flashback-monitor-manager.c line 1393
  • #3 ??
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_object_new_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_object_new
    from /usr/lib/libgobject-2.0.so.0
  • #6 flashback_monitor_manager_new
    at flashback-monitor-manager.c line 1538
  • #7 flashback_display_config_init
    at flashback-display-config.c line 989
  • #8 g_type_create_instance
    from /usr/lib/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_object_newv
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_object_new
    from /usr/lib/libgobject-2.0.so.0
  • #12 flashback_display_config_new
    at flashback-display-config.c line 1004
  • #13 settings_changed
    at flashback-application.c line 133
  • #14 flashback_application_init
    at flashback-application.c line 192
  • #15 g_type_create_instance
    from /usr/lib/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_object_newv
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_object_new
    from /usr/lib/libgobject-2.0.so.0
  • #19 flashback_application_new
    at flashback-application.c line 215
  • #20 main
    at flashback-main.c line 117

Comment 1 Alberts Muktupāvels 2015-08-21 12:42:36 UTC
Steps to reproduce? Or it simply crashes on startup?
Comment 2 Balló György 2015-08-21 12:45:19 UTC
Simply crashes immediately after login, and every time when I try to run it manually.
Comment 3 Alberts Muktupāvels 2015-08-21 12:55:40 UTC
It does not crash for me... :(

Have you changed display settings? Do you have multiple monitors? Or maybe do you use laptop? Try to provide any info that might be useful so I can reproduce problem.
Comment 4 Balló György 2015-08-21 13:11:51 UTC
> Have you changed display settings?

No, I can reproduce it with default settings.

> Do you have multiple monitors? Or maybe do you use laptop?

I'm using laptop, and I don't have multiple monitors.

> Try to provide any info that might be useful so I can reproduce problem.

I can't reproduce this problem when I run GNOME Flashback in VirtualBox, so it's probably hardware-specific (maybe only laptop users are affected).
Comment 5 Alberts Muktupāvels 2015-08-21 20:21:22 UTC
I built GNOME Flashback on my laptop, but it does not crash...

What video card do you have? Also could you upload your ~/.config/monitors.xml file?
Comment 6 Balló György 2015-08-21 21:20:21 UTC
Created attachment 309843 [details]
My ~/.config/monitors.xml file

> What video card do you have?

I have an Intel Sandybridge Mobile video controller.

> Also could you upload your ~/.config/monitors.xml file?

File attached. I can reproduce the problem even if this file is missing.
Comment 7 Alberts Muktupāvels 2015-08-21 21:27:49 UTC
Is that file from your laptop? There is 7 configuration sections while I have only one... That file is created by gnome-flashback, right? Do you get similar/same file when you delete and use GNOME session?
Comment 8 Balló György 2015-08-21 21:30:44 UTC
> Is that file from your laptop?

Yes.

> That file is created by gnome-flashback, right?

No, this is an old file.

> Do you get similar/same file when you delete and use GNOME session?

No, GNOME does not create this file again, when I rename it.
Comment 9 Balló György 2015-08-21 21:39:53 UTC
Created attachment 309845 [details]
My ~/.config/monitors.xml file

Okay, here is a new one created by GNOME. I had to apply settings in GNOME Control Center.
Comment 10 Alberts Muktupāvels 2015-08-22 12:24:13 UTC
Created attachment 309861 [details]
Test

Please apply this patch and post output of gnome-flashback after it crash.
Comment 11 Balló György 2015-08-22 14:24:58 UTC
Created attachment 309862 [details]
gnome-flashback log

Here is the output with metacity and mutter.
Comment 12 Alberts Muktupāvels 2015-08-22 14:47:25 UTC
Can you add:
g_warning ("manager->n_outputs - %d", manager->n_outputs);
before
g_warning ("manager->n_modes - %d", manager->n_modes);

and change
if (output->connection != RR_Disconnected)
to
if (output->connection != RR_Disconnected && output->nmode != 0)

And then post output? I am only interested in GNOME Flashback with metacity.
Comment 13 Balló György 2015-08-22 16:24:07 UTC
Created attachment 309867 [details]
gnome-flashback log 2 with metacity

Now I didn't get any crashes, so it looks like it fixes the problem.
Comment 14 Alberts Muktupāvels 2015-08-22 16:36:03 UTC
Thanks!

Can you add similar debug lines in meta_monitor_manager_xrandr_read_current:
https://git.gnome.org/browse/mutter/tree/src/backends/x11/meta-monitor-manager-xrandr.c#n650

And post output when you run mutter --replace. That part is same in gnome-flashback so I would expect same output, but it definitely is not since mutter does not crash. Maybe mutter simply does not use X11 backend?
Comment 15 Balló György 2015-08-22 17:22:05 UTC
Created attachment 309870 [details]
mutter log

Mutter gives a bit different output. Maybe metacity/gnome-flashback does not read the config correctly? E.g. when I launch gnome-control-center, or replace metacity with mutter, I get the same output from gnome-flashback.
Comment 16 Alberts Muktupāvels 2015-08-22 17:42:28 UTC
Metacity has nothing to do with this. If we speak about display-config then GNOME Flashback == Mutter.

This is not related to configuration reading from saved file. It gets monitor data from X11/XRandR. The problem is that same code gives different results... Both have 5 outputs, but modes are different 1 vs. 12.

Most likely mutter is doing something else before it reads configuration that causes to get correct data.

What do you get when you run xrandr from terminal:
2) With gnome-flashback when it reports only 1 mode.
3) With mutter.

Does it list all modes in both cases?
Comment 17 Balló György 2015-08-22 17:54:36 UTC
Yes, I get all modes when run xrandr. And as soon as I run the xrandr command, all modes are listed on the output of gnome-flashback too.
Comment 18 Alberts Muktupāvels 2015-08-23 09:31:09 UTC
Please add this
g_warning ("output->connection - %d", (int) output->connection);
before
if (output->connection != RR_Disconnected)
Comment 19 Alberts Muktupāvels 2015-08-23 11:13:38 UTC
Pushed to master. We will ignore outputs without any mode - that fixes crash. I have no time to try to find why mutter gets all modes, but we don' t.
Comment 20 Balló György 2015-08-23 11:32:32 UTC
Okay, it's fine for me. I don't see any regressions, because when I open gnome-control-center, it lists all modes.
Comment 21 Alberts Muktupāvels 2015-11-29 19:52:44 UTC
I reverted my patch and added patches from mutter. Can you please test that I have not re-introduced this bug?
Comment 22 Balló György 2015-12-14 04:01:28 UTC
I tested the current git master now, and it works fine.