bugGNU TeXmacs - Bugs: bug #50271, windows version: triggering weird...


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

bug #50271: windows version: triggering weird linebreaks, very narrow pages and/or crashes

Submitted by:  Philippe Joyez <pjoyez>
Submitted on:  Thu 09 Feb 2017 10:53:02 PM UTC  
Category:  Windows port Priority:  5 - Normal
Item Group:  Error Status:  Need Info
Privacy:  Public Assigned to:  Joris van der Hoeven <vdhoeven>
Originator Name:  Open/Closed:  Open
Release:  Release:  None
Fixed Release:  None Fixed Release: 

( Jump to the original submission)

Sat 19 Oct 2019 02:04:35 AM UTC, comment #7: 

Is this problem still present?

If it is, then it would help to cut down the LaTeX file to a miminal one that still raises this problem.  I tried to open it on my Mac laptop and it works fine here...

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Sat 24 Jun 2017 09:15:33 AM UTC, comment #6: 

The locale is english.

I attach a screen catpure of the texmacs window after evaluating (tree-import (system->url "manuscript.tex") "latex") in the Debug->Execute->Evalate scheme expression... widget. The screen corruption does not actually appear until the display needs to be refreshed, for instance when you type a character.

Last time I was investigating this with gdb I had the feeling that the problem could be occurring in a call to Guile c code that would corrupt data structures in memory in some way, and resulting in an uncontroled change in some critical environment variable. However, I could not go further because I had not built Guile with debugging symbols and did not know which critical environment variable to watch. Joris can you suggest critical environment variables that could change the display that way?

Philippe Joyez <pjoyez>
Project Member
Thu 22 Jun 2017 09:10:38 PM UTC, comment #5: 

Could it be that this is a variant of the old bug concerning conversions between numbers and strings: if the locale is set to French, then some conversion routines may use the decimal comma instead of the decimal dot, thereby potentially confusing TeXmacs and setting some numerical constants to zero.
Please try with an English locale.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Sat 18 Feb 2017 05:19:46 PM UTC, comment #4: 

I've found an old TeXmacs installed and tested it... Well v1.07.17 (for windows of course) did not suffer the same problem...

v1.07.17 was circa svn 5500, and 1.99.1 (tested buggy) was 8100. Who'se willing to bissect?

Philippe Joyez <pjoyez>
Project Member
Sat 11 Feb 2017 12:28:15 PM UTC, comment #3: 

The change observed in format of the display of the scheme session mentioned in the previous post reminds me a (windows) bug I had introduced by a change in System/Language/text_language.cpp in r10099 and "fixed" in r10556 (see comment added in 10556). The "fix" resulted from a pragmatic revert rather than an understanding of the problem, and most likely the bug was just prevented to appear rather than fixed.

Note that the change in the display appears even if we do not attempt to display the imported tree itself. for instance

(define toto (tree-import (system->url "myfile.tex") "latex"))

is sufficient to screw up the display.

I've checked that the bug is present since at least 1.99.1

Philippe Joyez <pjoyez>
Project Member
Sat 11 Feb 2017 10:30:44 AM UTC, comment #2: 

Indeed edit_env_rep::update_font is called sevaral times with the environement variable "font-size" (FONT_SIZE in c++) being found zero.

But now I'm convinced this is not a latex import problem at all. Actually if in a scheme session I evaluate

(tree-import (system->url "myfile.tex") "latex")

it completes the import but the result is displayed with only one word per line, and from this point on TeXmacs is very fragile and will soon crash. For instance it's not possible to do tree->stree on the result. However saving the file containing the scheme session with its result at this point sometimes goes through. Then, after closing texmacs and re-opening that file, you find out the latex import went perfectly well (as in linux).

Thus, AFAICT, the problem seems related to the display, with probably some data structure getting corrupted at some point. It just happens that importing such latex file triggers the problem.

Philippe Joyez <pjoyez>
Project Member
Thu 09 Feb 2017 11:02:25 PM UTC, comment #1: 

if that needed, an example of problematic latex file can be found in https://arxiv.org/e-print/1702.02145

Philippe Joyez <pjoyez>
Project Member
Thu 09 Feb 2017 10:53:02 PM UTC, original submission:  

This occurs for the official 1.99.5 as well as my own build using Msys2/MinGW. The same latex file opens fine in linux.

Using gdb I could trace this to an arithmetic error occuring in
script_boxes.cpp when evaluating

SI miny2= (fn->y2 - fn->yshift) * script (fn->size, 1) / fn->size;
(line 189 and 327)

So it looks like the font has zero size...

I don't know yet which font, nor why, but I guess this should be prevented/catched before hand.

Philippe Joyez <pjoyez>
Project Member


Attached Files
file #41037:  Capture2.PNG added by pjoyez (38KiB - image/png)


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 pjoyez (Submitted the item)

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

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-19 vdhoeven Assigned toNone => vdhoeven
    2019-10-19 vdhoeven StatusConfirmed => Need Info
    2017-06-24 pjoyez Attached File- => Added Capture2.PNG, #41037
    2017-02-11 pjoyez StatusNone => Confirmed
        Summarywindows version crashes when loading some latex files => windows version: triggering weird linebreaks, very narrow pages and/or crashes

    Back to the top

    Powered by Savane 3.5