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 575307 - Runs without a window when restoring session fails
Runs without a window when restoring session fails
Status: RESOLVED OBSOLETE
Product: gedit
Classification: Applications
Component: general
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 575252 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-03-14 00:38 UTC by Vincent Untz
Modified: 2016-11-26 19:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Patch (560 bytes, patch)
2009-03-14 00:38 UTC, Vincent Untz
committed Details | Review

Description Vincent Untz 2009-03-14 00:38:17 UTC
For some reason, the session state loading code in gedit ignores the first group in the state file. Not quite sure why it does that, but the result is that with my patch in bug 552387, gedit doesn't work really well when loading a session.

Attached patch helps a lot :-)

There's also a bug where if gedit cannot restore any window from the state file, then it's running but without a window. It should probably either just quit or open an empty window in that case.
Comment 1 Vincent Untz 2009-03-14 00:38:35 UTC
Created attachment 130618 [details] [review]
Patch
Comment 2 Paolo Borelli 2009-03-14 12:51:16 UTC
patch looks good to me, not sure what that fixme was about, it was directly from danw's oroginal patch to use eggsmclient. Using g_str_has_prefix is surely a more robust approach.

Just a small codestyle nitpick: I'd prefer 

if (has_prefix)
   parse_window

instead of using "continue".


About the other bug you mention, we should probably make parse_window return a boolean and make gedit_session_load return false if parsing fails. I think (but we need to check) that if session load fails, a new window is opened.


I'd be ok to have this patch be committed before 2.26.0 if the release team decides so.
Comment 3 Paolo Borelli 2009-03-15 14:13:27 UTC
I got approval on #release-team by andre and fredp so I committed the patch (with the coding style nitpicks fixed) since it is obviously correct.

I am retitling the bug to track the other issue reported... that one requires biggrer code changes and testing so it'll have to wait after code freeze is over and when gnome-session patch is committed.
Comment 4 André Klapper 2012-08-01 12:30:00 UTC
Similar to bug 575252?
Comment 5 Ignacio Casal Quinteiro (nacho) 2012-08-01 21:00:08 UTC
*** Bug 575252 has been marked as a duplicate of this bug. ***
Comment 6 Kevin Hagner 2016-11-26 19:53:40 UTC
Thanks for taking the time to report this.
However, you are using a version that is too old and not supported anymore by GNOME developers. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes by GNOME developers for the version that you use. In Gedit 3.22, I successfully tested to open a file through an SSH connexion, closing it, and still be able to use the application without any freeze.

By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME.

Please feel free to reopen this bug report if the problem still occurs with a recent version of GNOME, or feel free to report this bug in the bug tracking system of your Linux distribution if your distribution still supports the version that you are using.