bugGNU TeXmacs - Bugs: bug #62655, Wrong use of graphics editor...

 
 

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

bug #62655: Wrong use of graphics editor corrupts interactive.scm

Submitter:  Jeroen Wouters <jeronim>
Submitted:  Mon 20 Jun 2022 03:56:46 PM UTC
 
Category:  Graphics editor Priority:  5 - Normal
Item Group:  Error Status:  In Progress
Privacy:  Public Assigned to:  jeronim
Originator Name:  Open/Closed:  Open
Release:  None Release:  2.1.2
Fixed Release:  None Fixed Release: 
Keywords: 

Sat 06 Aug 2022 09:03:29 PM UTC, comment #2: 

Attaching a second patch to prevent dialogues from returning #<eof> objects to `learn-interactive`.

(file #53541)

Jeroen Wouters <jeronim>
Project Member
Fri 05 Aug 2022 10:29:32 AM UTC, comment #1: 

I'm attaching a patch to perform error checking when loading files such as interactive.scm.

If an error is detected, an empty list is returned. This has as side effect that the history stored in interactive.scm is wiped when it is corrupted, as a clean history will be saved upon the next shutdown. Although information is lost, I think this is preferable to the current situation where users are stuck with a non-functional TeXmacs.

This is only part of a complete fix. Additionally dialogue windows such as this one in the graphics editor shouldn't return #<eof> values, and the routine for saving should filter those out (and whatever else could cause errors on loading), in case they do still arrive there. I intend to update the patch accordingly later.

Jeroen Wouters <jeronim>
Project Member
Mon 20 Jun 2022 03:56:46 PM UTC, original submission:  

The following steps cause a crash in TeXmacs and corrupt $TEXMACS_HOME_PATH/system/interactive.scm, which thereafter prevents TeXmacs from starting.

1) Insert a drawing
2) Select the line tool
3) Click the icon to set the line's dash style
4) Under "Unit", click "Other"
5) Leave at least one of the two fields open and click OK

The terminal shows this error:

Backtrace:
In unknown file:
   ?: 0* [#<procedure #f ()>]
   ?: 1* [graphics-set-dash-style-unit* "1pt" #<eof>]
In /home/jeroen/texmacs/master/share/TeXmacs/progs/graphics/graphics-main.scm:
 944: 2  [#<procedure #f (var val)> "gr-dash-style-unit" {(tuple "1pt" #<eof>)}]
In /home/jeroen/texmacs/master/share/TeXmacs/progs/graphics/graphics-utils.scm:
   ...
 359: 3  [path-insert-with (0 0 6) "gr-dash-style-unit" {(tuple "1pt" #<eof>)}]

/home/jeroen/texmacs/master/share/TeXmacs/progs/graphics/graphics-utils.scm:359:14: In procedure path-insert-with in expression (path-insert-with p var ...):
/home/jeroen/texmacs/master/share/TeXmacs/progs/graphics/graphics-utils.scm:359:14: Wrong type argument in position 3: (tuple "1pt" #<eof>)

After closing TeXmacs, it will no longer start, since interactive.scm is corrupted by the lines

 (graphics-set-dash-style-unit*
   (("0" . "1pt") ("1" . #<eof>)))

Removing these lines fixes the problem.

This bug is related to bug #58812.

Jeroen Wouters <jeronim>
Project Member

 

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

Attached Files
file #53541:  bug-62655-p2.diff added by jeronim (745B - text/x-patch)
file #53511:  bug-62655-p1.diff added by jeronim (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jeronim (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-08-06 jeronim Attached File- Added bug-62655-p2.diff, #53541
    2022-08-05 jeronim StatusNone In Progress
        Assigned toNone jeronim
    2022-08-05 jeronim Attached File- Added bug-62655-p1.diff, #53511

    Back to the top


    Powered by Savane 3.9