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

 
 
Show feedback again

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: In Progress
Privacy: PublicAssigned to: Joris van der Hoeven <vdhoeven>
Originator Name: Open/Closed: Open
Release: Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

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 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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    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
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup