Window-width GSetting has a very high value on first run

Bug #1547949 reported by Zisu Andrei on 2016-02-20
312
This bug affects 57 people
Affects Status Importance Assigned to Milestone
Mail
Confirmed
High
Unassigned

Bug Description

Had both geary and pantheon-mail installed at the same time. pantheon-mail was also built directly from source. Not sure what caused this issue, but when I first ran pantheon-mail the width of the window was huge and the GUI sluggish. Went through the code to see what caused it. This is what I get:

matzipan@matzipan-thinkpad:~$ gsettings get org.pantheon.mail window-height
805
matzipan@matzipan-thinkpad:~$ gsettings get org.pantheon.mail window-width
7461

If I try and do a set on window-width, next time I start pantheon-mail, it still has the same width.

Related branches

Zisu Andrei (matzipan) wrote :

If I monitor the gsetting, the value seems to be ever increasing:

matzipan@matzipan-thinkpad:~$ gsettings set org.pantheon.mail window-width 500
matzipan@matzipan-thinkpad:~$ gsettings monitor org.pantheon.mail window-width
window-width: 18788
window-width: 18864
window-width: 18938
window-width: 19011
...

And window-width seems to continuously increase.

Mike Seese (seesemichaelj) wrote :

I see the same thing:
mike@mike-server:~$ gsettings get org.pantheon.mail window-width
14282

I am unsure about the increasing width although.

Zisu Andrei (matzipan) wrote :

Could not reproduce on a fresh VM install of Freya.

Fabian Thoma (fabianthoma) wrote :

Can confirm this is a problem with pantheon-mail 1.0.0+r1977+pkg7~daily~ubuntu0.4.1 from the daily PPA.
Changing the size back to a sane amount does not help at all and the setting gets reset whenever I try to start Mail.
This also makes the Xserver crash, due to the huge window size, so this basically breaks Mail from any usage.

Changed in pantheon-mail:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → loki-beta1
Daniel Fore (danrabbit) wrote :

I've seen this problem before, but I'm not sure how to reproduce it. My guess is that it is one of the panes that is causing the issue. Can anyone else confirm that it seems like the message list is the widest pane? I bet it's something to do with the custom cell renderer there

Zisu Andrei (matzipan) wrote :

I can confirm X server crashing, too.

I've been trying to get to the bottom of this, but I can't figure out how to get debug logging to work, even with --debug on, because the application is detaching from the terminal. Also, I can't seem to be able to get gdb to find the correct sources.

Zisu Andrei (matzipan) wrote :

Yes, the message list is the width.

Zisu Andrei (matzipan) wrote :

*widest.

jeez. I need to stop using this like messenger.

Mike Seese (seesemichaelj) wrote :

Since Dan saw this before in Geary and this resurfaced when we went Geary->Pantheon Mail, perhaps its something to do with initialization? Mail asked me for new credentials as if it forgot/lost my data (probably because its a new name and new location for data). Just thinking out loud here.

Zisu Andrei (matzipan) wrote :

It might very well be a geary problem. Found this just now: https://bugs.archlinux.org/task/46832

Daniel Fore (danrabbit) on 2016-02-22
Changed in pantheon-mail:
status: Confirmed → In Progress
assignee: nobody → Daniel Fore (danrabbit)

Hey Daniel,

If you need any help, just give me a shout. I was looking into it but kinda
ran out of ideas as to what it might be. Looked into the conversation
component as well.

It just came to mind that maybe there's some layout issue within the .ui
file?

On Mon, 22 Feb 2016, 21:05 Daniel Fore <email address hidden> wrote:

> ** Changed in: pantheon-mail
> Status: Confirmed => In Progress
>
> ** Changed in: pantheon-mail
> Assignee: (unassigned) => Daniel Fore (danrabbit)
>
> ** Branch linked: lp:~elementary-apps/pantheon-mail/re-layout
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1547949
>
> Title:
> Window-width GSetting has a very high value on first run
>
> Status in Mail:
> In Progress
>
> Bug description:
> Had both geary and pantheon-mail installed at the same time. pantheon-
> mail was also built directly from source. Not sure what caused this
> issue, but when I first ran pantheon-mail the width of the window was
> huge and the GUI sluggish. Went through the code to see what caused
> it. This is what I get:
>
> matzipan@matzipan-thinkpad:~$ gsettings get org.pantheon.mail
> window-height
> 805
> matzipan@matzipan-thinkpad:~$ gsettings get org.pantheon.mail
> window-width
> 7461
>
> If I try and do a set on window-width, next time I start pantheon-
> mail, it still has the same width.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pantheon-mail/+bug/1547949/+subscriptions
>

Daniel Fore (danrabbit) wrote :

Hey Zisu, if you could compile the attached branch and let me know if you still experience the issue with that branch, that would be great :)

Zisu Andrei (matzipan) wrote :

I issued "gsettings set org.pantheon.mail window-width 500" and then ran pantheon-mail built from your branch and X crashed yet again.

Daniel Fore (danrabbit) wrote :

Hey Zisu, you need to reset not only the window width but also the pane handle position. Otherwise the window will just resize to acommodate the pane :p I would recommend opening up dconf and resetting all of the keys to default

Zisu Andrei (matzipan) wrote :

Will test tomorrow.

On Mon, 22 Feb 2016, 23:30 Daniel Fore <email address hidden> wrote:

> Hey Zisu, you need to reset not only the window width but also the pane
> handle position. Otherwise the window will just resize to acommodate the
> pane :p I would recommend opening up dconf and resetting all of the keys
> to default
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1547949
>
> Title:
> Window-width GSetting has a very high value on first run
>
> Status in Mail:
> In Progress
>
> Bug description:
> Had both geary and pantheon-mail installed at the same time. pantheon-
> mail was also built directly from source. Not sure what caused this
> issue, but when I first ran pantheon-mail the width of the window was
> huge and the GUI sluggish. Went through the code to see what caused
> it. This is what I get:
>
> matzipan@matzipan-thinkpad:~$ gsettings get org.pantheon.mail
> window-height
> 805
> matzipan@matzipan-thinkpad:~$ gsettings get org.pantheon.mail
> window-width
> 7461
>
> If I try and do a set on window-width, next time I start pantheon-
> mail, it still has the same width.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pantheon-mail/+bug/1547949/+subscriptions
>

Zisu Andrei (matzipan) wrote :

Oh wow, you're right. Messages pane position is 33523.

It works like a charm.

There seems to be an odd side effect where the left bar (the one containing the folders) is not resizeable if the conversation pane has the minimum width.

Daniel Fore (danrabbit) on 2016-02-23
Changed in pantheon-mail:
status: In Progress → Fix Committed
milestone: loki-beta1 → loki-alpha1
Andre Jonas (nipsky) wrote :

Hi, I still have this exact problem, using r1997 on ArchLinux, MATE. Is there anything I can do?

Zisu Andrei (matzipan) wrote :

Have you tried resetting the gsettings fields to defaults?

Andre Jonas (nipsky) wrote :

You mean like gsettings set org.pantheon.mail window-width 500? I did that, but after starting Mail, that value goes back to an extremely high width (32282 for me).

Zisu Andrei (matzipan) wrote :

You need to reset the pane-positions as well. I belive "messages-pane-position" is the one. Read Daniel's message #14.

Andre Jonas (nipsky) wrote :

Thanks, that did the trick! :)

Daniel Fore (danrabbit) on 2016-03-14
Changed in pantheon-mail:
status: Fix Committed → Confirmed
assignee: Daniel Fore (danrabbit) → nobody
milestone: loki-alpha1 → loki-beta1
importance: Critical → High
Zisu Andrei (matzipan) on 2016-03-31
Changed in pantheon-mail:
status: Confirmed → Fix Released
status: Fix Released → Fix Committed
Daniel Fore (danrabbit) on 2016-04-02
Changed in pantheon-mail:
milestone: loki-beta1 → loki-alpha1
Kirill Romanov (djaler1) wrote :

Bug is still exist

pantheon-mail 0.10.0

gsettings get org.pantheon.mail window-width
4861

Changed in pantheon-mail:
status: Fix Committed → Confirmed
Zisu Andrei (matzipan) wrote :

Hey Djaler,

Bug has been fixed in the development version of Mail. The version you are using is older.

Changed in pantheon-mail:
status: Confirmed → Fix Committed
Kirill Romanov (djaler1) wrote :

But i have a development build.

Changed in pantheon-mail:
status: Fix Committed → Confirmed
Zisu Andrei (matzipan) wrote :

Hey Djaler,

Please allow somebody else to mark the bug as confirmed after they have cross-checked your report.

I am afraid your setup is non-standard, or at least I can tell you you're not running pure Loki, which makes me believe you're not running the Loki version of Mail either.

How can I tell? In your wingpanel indicator area, you have a Dropbox icon, which uses the GtkStatusIcon API, which we have dropped in Loki.

Additionally, if you have development experience, you can try and backport the changes to the Freya version. I'm afraid I won't be able to help in the near future.

Changed in pantheon-mail:
status: Confirmed → Fix Committed
Kirill Romanov (djaler1) wrote :

No, i use a Loki, cause i'm in a translators team. Wingpanel? I find build of indacator-application with support of GtkStatusIcon API.

Yuly Nesterov (inpr1se) wrote :

I confirm this bug.

Changed in pantheon-mail:
status: Fix Committed → Confirmed
Cody Garver (codygarver) on 2016-06-12
Changed in pantheon-mail:
milestone: loki-alpha1 → loki-rc1
Kirill Romanov (djaler1) on 2016-06-15
Changed in pantheon-mail:
status: Confirmed → In Progress
assignee: nobody → Djaler (djaler1)
Daniel Fore (danrabbit) on 2016-06-16
Changed in pantheon-mail:
status: In Progress → Fix Committed
Pedro Ávila (pedroavila95) wrote :

Hi, as Daniel said on message #14, resetting all keys on dconf worked fine for me.

I'm using elementary 0.4 Loki Beta
Kernel release: 4.4.0-31-generic

$ dconf reset -f /org/pantheon/mail/

Thank You!

Cody Garver (codygarver) on 2016-08-13
Changed in pantheon-mail:
milestone: loki-beta2 → 1.0
status: Fix Committed → Fix Released
Changed in pantheon-mail:
assignee: Kirill Romanov (djaler1) → nobody
milestone: 1.0 → none
status: Fix Released → Confirmed
Ralph Plawetzki (purejava) wrote :

I suspect that there is a problem in main-window.vala.

Could anyone how still has this problem please post the output of the following command?
$ dconf dump /org/pantheon/mail/

@purejava

here is the result of running that command while the bug is manifesting itself.

"dconf dump /org/pantheon/mail/
[/]
window-maximize=false
messages-pane-position=1242
folder-list-pane-position-horizontal=198
window-height=244
window-width=1906
"

Window width continually grows as I move the mouse with the window in the foreground. I'm able to reset the size to normal and regain my ability to use the application if I run the following command- dconf reset -f /org/pantheon/mail/.

I'm on pantheon 1.0.2. I believe it was recently patched so the bug is obviously still present. I wasn't doing anything special before the bug started happening again. Had chromium and terminal open and went to open mail and the window width started growing out of control once more.

Ralph Plawetzki (purejava) wrote :

Thanks Brendan for this detailed description what happened on your machine.

This is very helpful!

I could reproduce the issue every single time in the following way after resetting:
(Resolution:1366X768, dock will be always visible)
Version: elementary OS 0.4 Loki
Mail Version: Mail 1.0.2
System is up-to-date when I'm writing this.

Step 1: Reset mail with dconf reset -f /org/pantheon/mail/

Step 2: Open mail and here is the dump
messages-pane-position=416
folder-list-pane-position-horizontal=149
window-width=1059

Step 3: Maximize mail
window-maximize=true
messages-pane-position=631
folder-list-pane-position-horizontal=149
window-height=690
window-width=1366

Step 4: Decrease the size of message pane position(In other words, increase the second section width by the slider present)more than the size of the resolution
window-maximize=true
messages-pane-position=1078
folder-list-pane-position-horizontal=149
window-height=690
window-width=1571
Now if you notice the width increased more than the resolution.

Step 5: Restore mail
window-maximize=false
messages-pane-position=1065
folder-list-pane-position-horizontal=149
window-height=610
window-width=1707

Step 6: Close and open mail again
Ever increasing!
window-maximize=false
messages-pane-position=1136
folder-list-pane-position-horizontal=149
window-height=610
window-width=1806
(Sometimes, you don't need to do this step, after the step 5, it's ever-increasing)

Ralph Plawetzki (purejava) wrote :

Yeah, good catch!
This video illustrates the problem.
It's tested with Mail form trunk, I just added two lines of code that print the window-width value to show if it increases or not.
    public override bool configure_event(Gdk.EventConfigure event) {

        // Writing the window_* variables triggers a dconf database update.
        // Only write if the value has changed.
        stderr.printf("event_width = %d\n",event.width);
        stderr.printf(" window_width = %d\n",window_width);
        if(window_width != event.width)
            window_width = event.width;

What is done in the video:
- open Mail two times to show that window-width stays the same
- move Mail to the right of the screen and move the slider to the right and over the end of the screen
- open Mail again two times: window-width magically increases

Ralph Plawetzki (purejava) wrote :

Looking at the code shows that this is caused by lines 98-103 in main-toolbar.vala:

        // FIXME: This doesn't play nice with changing window decoration layout
        GearyApplication.instance.config.bind (Configuration.MESSAGES_PANE_POSITION_KEY, this, "left-pane-width", SettingsBindFlags.GET);
        bind_property ("left-pane-width", folder_header, "width-request", BindingFlags.SYNC_CREATE, (binding, source_value, ref target_value) => {
            target_value = left_pane_width - 43;
            return true;
        });

This code fragment insures that the search toolbar and reply and so forth buttons stay centered at the slider.
This needs to be fixed.

Mark Fulop (mrkflp) wrote :

I'm still having this issue with Mail 1.0.3 on Loki. The window width keeps incrementing after I open Mail.

Karan Sharma (karan1458) wrote :

This issue has came back with recent update in mail.

OS : Loki
Mail : 1.0.4

Zisu Andrei (matzipan) wrote :

Hello,

If you're seeing this in Loki, can you please open a new bug report?

The bug is present.

OS: Elementary OS Loki Updated at 07 Dec 2016
Pantheon-Mail Version: 1.0.4+r2194+pkg13~ubuntu16.04.1

Evgenii Frolov (frol-onn) wrote :

Bug is here!
Loki new install.
4 of March 2017

Frank Drebin (frank.drebin) wrote :

same here

Frank Drebin (frank.drebin) wrote :

The increasing window_width seems to correlate with the "popup" of the scrollbars. At every mouse hoover the window gets a bit wider, constantly increasing while the "hourglass" rotates...
Maybe someone has a new idea now?

Vikram Seshadri (blaidddrwg) wrote :

There also seem to be some emails for a particular format that trigger this - probably because they need the window to be of a minimum width to display their content ? In any case, there was one email that would persistently crash pantheon-mail with this error, so I got around this by first resizing the windows to give the MAXIMUM area possible for displaying the mail content, and then by clicking on that email. Once it displayed (and I'm not sure it will continue to do it if the email chain grows longer), then I archived the email so that it was no longer in my active list, and I couldn't accidentally navigate to it.

I also encountered this error a couple of times when I tried to resize the main mail window.

Robert Salazar (rober141091) wrote :

At the OS install, worked fine. Crashed with time, reinstalled the program and at the first run, it seems that is growing the width of the window.

Garry (garry-pettet) wrote :

Still an issue on Elementary Loki (updated). Seems to be triggered by trying to display an email with lots of inline images. Not sure if the window was growing to accommodate their width??

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers