bugGNU TeXmacs - Bugs: bug #35960, TeXmacs crashes when deleting an...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #35960: TeXmacs crashes when deleting an empty <document> tag

Submitted by:  Francois Poulain <fpoulain>
Submitted on:  Fri 23 Mar 2012 09:52:20 AM UTC  
 
Category: EditorPriority: 5 - Normal
Item Group: ErrorStatus: Works For Me
Privacy: PublicAssigned to: Joris van der Hoeven <vdhoeven>
Originator Name: Open/Closed: Closed
Release: Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

Fri 29 Nov 2013 10:23:12 AM UTC, comment #5:

I agree. It seems that it was possible in the past. Ok to close the bug.

Francois Poulain <fpoulain>
Project Member
Fri 29 Nov 2013 10:08:37 AM UTC, comment #4:

I don't manage to reproduce the bug as you described it. In principle, the editor should not allow you create empty document tags, except via direct Scheme hacks.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Fri 29 Nov 2013 09:07:21 AM UTC, comment #3:

I can reproduce it, but it is now difficult to get an "empty" document tag the way described (I mean '(document)). So I suppose the situation to be now not easily reproducible with standard manipulations.

Francois Poulain <fpoulain>
Project Member
Fri 29 Nov 2013 08:33:45 AM UTC, comment #2:

I cannot reproduce this bug in revision 7942.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Wed 12 Sep 2012 08:57:11 AM UTC, comment #1:

This happened by deleting with the "backspace" key. Anyway, if we delete the empty <document> tag via the "suppr" key, another crash occurs.

The problem is in src/Edit/Replace/edit_select.cpp, here :
--
path q1= copy (p); q1 << path (i1, end (t[i1]));
path q2= copy (p); q2 << path (i2, start (t[i2]));
--
However, I don't know how to avoid it.

Francois Poulain <fpoulain>
Project Member
Fri 23 Mar 2012 09:52:20 AM UTC, original submission:

Step to reproduce:

  • open the joined document;
  • put the cursor on <macro and right click on "view hidden part";
  • delete the content of the <document> tag;
  • delete the document tag;

Observed behavior:

  • TeXmacs crashes;
  • in src/Edit/Modify/edit_delete.cpp, line 127, the procedure subtree (et, p * l2) segfault because the path of the subtree does not exist;
  • => p * l2 is badly calculated.

Here is a patch to robustify subtree(), avoiding a crash; I pushed it on the svn. Anyway the method edit_text_rep::remove_text remains buggy.

Francois Poulain <fpoulain>
Project Member

 

Attached Files
file #25451:  subtree.diff added by fpoulain (629B - text/x-patch)
file #25452:  bug_33874.tm added by fpoulain (344B - text/texmacs)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by vdhoeven (Posted a comment)
  • -unavailable- added by mdbenito (Updated the item)
  • -unavailable- added by fpoulain (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 29 Nov 2013 08:33:45 AM UTCvdhoevenStatusIn Progress=>Works For Me
      Open/ClosedOpen=>Closed
    Mon 01 Oct 2012 07:31:01 PM UTCmdbenitoAssigned toNone=>vdhoeven
    Fri 23 Mar 2012 09:52:20 AM UTCfpoulainAttached File-=>Added subtree.diff, #25451
      Attached File-=>Added bug_33874.tm, #25452

    Back to the top


    Powered by Savane 3.1-cleanup