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 488718 - session_crashed.xml has a unique identifier that prevents restoring
session_crashed.xml has a unique identifier that prevents restoring
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Profile
2.20.x
Other Linux
: Normal critical
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 492616 493019 496260 496483 496637 496638 497050 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-20 19:30 UTC by Jean-François Fortin Tam
Modified: 2007-11-15 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
epiphany-HEAD-session_segfault.patch (1.18 KB, patch)
2007-10-23 18:33 UTC, Leonardo Boshell
committed Details | Review

Description Jean-François Fortin Tam 2007-10-20 19:30:47 UTC
Today, I did a clean install of ubuntu, keeping my /home partition. Before doing that, I did a killall epiphany to "save" my tabs and be able to restore them later.

When I tried to start it, Epiphany then asked me if I wanted to restore the tabs. Ok. However, epiphany crashed right after starting to show itself.

The problem is as follows. Session_crashed.xml has a line like this:
  <window x="0" y="25" width="1272" height="973" role="epiphany-window-37ccebd5">

The role=something argument is the problem. What I did was create a dummy session, crash it, then copy a new line over:

  <window x="0" y="25" width="1255" height="933" active-tab="0" role="epiphany-window-2ad65ef1">

As if Epiphany was checking for some hash based on the system-installed binaries or something. I have no idea why this thing happens. If it is done by design, there *needs* to be a dialog asking the user what to do, instead of just crashing without explaining what is going on. Marking as critical because of the data loss issue.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2007-10-22 18:28:10 UTC
ephy-session.c:

@@ write_ephy_window:

        role = gtk_window_get_role (GTK_WINDOW (window));
        if (role != NULL)
        {
                ret = xmlTextWriterWriteAttribute (writer,
                                                   (const xmlChar *)"role",
                                                   (const xmlChar *)role);

That's the role of the window, no idea why it crashed because here I can't reproduce it. Don't you have the trace?
Comment 2 Jean-François Fortin Tam 2007-10-22 18:45:40 UTC
nothing is outputted on my terminal, and ubuntu doesn't provide debugging packages for epiphany, and apport did not show up, so I can't really provide a trace myself.

Did you try filling random garbage in that role parameter in your session crashed file?
Comment 3 Leonardo Boshell 2007-10-23 18:32:58 UTC
I confirm this problem. It is related to the new active-tab attribute, which is new in epiphany 2.20.

The steps to reproduce in my case were:

Have epiphany 2.18.3 running, in the meantime upgrade to epiphany 2.20.1. At that point I kill'ed epiphany, and when I restarted it, after choosing to restore the previous session, it segfaulted.

This is caused by a wrong assumption in ephy-session.c, where a NULL pointer is dereferenced. I'll attach a patch to fix this shortly.
Comment 4 Leonardo Boshell 2007-10-23 18:33:30 UTC
Created attachment 97746 [details] [review]
epiphany-HEAD-session_segfault.patch
Comment 5 Christian Persch 2007-10-23 18:49:57 UTC
Commit to trunk and gnome-2-20 please. Thanks for the patch!
Comment 6 Cosimo Cecchi 2007-10-23 23:35:42 UTC
Thanks, committed. Closing as FIXED.

------------------------------------------------------------------------
r7554 | cosimoc | 2007-10-24 01:33:37 +0200 (mer, 24 ott 2007) | 4 lines

Adds a check for NULL pointer in ephy-session.c, fixing wrong behaviour when
restoring Epiphany in some cases.
Fix for bug #488718, patch by Leonardo Boshell.
Comment 7 Reinout van Schouwen 2007-11-02 11:35:24 UTC
*** Bug 492616 has been marked as a duplicate of this bug. ***
Comment 8 Reinout van Schouwen 2007-11-05 00:22:53 UTC
*** Bug 493019 has been marked as a duplicate of this bug. ***
Comment 9 Reinout van Schouwen 2007-11-12 21:07:57 UTC
*** Bug 496260 has been marked as a duplicate of this bug. ***
Comment 10 Reinout van Schouwen 2007-11-13 17:44:56 UTC
*** Bug 496483 has been marked as a duplicate of this bug. ***
Comment 11 Diego Escalante Urrelo (not reading bugmail) 2007-11-14 07:37:00 UTC
*** Bug 496637 has been marked as a duplicate of this bug. ***
Comment 12 Diego Escalante Urrelo (not reading bugmail) 2007-11-14 07:37:11 UTC
*** Bug 496638 has been marked as a duplicate of this bug. ***
Comment 13 Reinout van Schouwen 2007-11-15 13:56:13 UTC
*** Bug 497050 has been marked as a duplicate of this bug. ***