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

 
 

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

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

Submitter:  Francois Poulain <fpoulain>
Submitted:  Fri 23 Mar 2012 09:52:20 AM UTC
   
 
Category:  Editor Priority:  5 - Normal
Item Group:  Error Status:  Works For Me
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release: 
Fixed Release:  None Fixed 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>
Group 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>
Group administrator
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>
Group 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>
Group administrator
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>
Group 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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by mdbenito (Updated the item)
  • -email is unavailable- added by fpoulain (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-29 vdhoeven StatusIn Progress Works For Me
        Open/ClosedOpen Closed
    2012-10-01 mdbenito Assigned toNone vdhoeven
    2012-03-23 fpoulain Attached File- Added subtree.diff, #25451
        Attached File- Added bug_33874.tm, #25452

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code