Far Manager crashes Terminal after commit e7d3dc5d #9252

Closed
opened 2026-01-31 01:49:46 +00:00 by claunia · 6 comments
Owner

Originally created by @igorkuzuro on GitHub (Jun 24, 2020).

Environment

Windows build number: Microsoft Windows NT 10.0.20150.0
Windows Terminal Dev build from sources
Far Manager v3.0 build 5625 x64 (2020-06-24) https://farmanager.com

Steps to reproduce

Start new tab for Far Manager or just start far.exe in existing tab from command prompt

Expected behavior

Expected working Far Manger

Actual behavior

Terminal crashed. In debug configuration raised exception in "vector" include file in
function void _Verify_offset(const difference_type _Off) const at line 113
"cannot seek vector iterator after end"

Call stack:
...
problem at
src\renderer\dx\CustomTextLayout.cpp at line 867:
const auto postOriginX = std::accumulate(_glyphAdvances.begin() + run.glyphStart,
_glyphAdvances.begin() + run.glyphStart + run.glyphCount,
mutableOrigin.x);

_glyphAdvances.size(): 0x000000000000001f
run.glyphStart: 0x00000001
run.glyphCount: 0x0000ffff

Same problem in wsl2 (Ubuntu or CentOS not matter) with Midnight Commander... start ok (in user's home directory) but Terminal crashes when trying cd to /home directory with mouse double click under .. or with cd .. in command line.

Originally created by @igorkuzuro on GitHub (Jun 24, 2020). # Environment Windows build number: Microsoft Windows NT 10.0.20150.0 Windows Terminal Dev build from sources Far Manager v3.0 build 5625 x64 (2020-06-24) https://farmanager.com # Steps to reproduce Start new tab for Far Manager or just start far.exe in existing tab from command prompt # Expected behavior Expected working Far Manger # Actual behavior Terminal crashed. In debug configuration raised exception in "vector" include file in function void _Verify_offset(const difference_type _Off) const at line 113 **"cannot seek vector iterator after end"** Call stack: ... problem at src\renderer\dx\CustomTextLayout.cpp at line 867: const auto postOriginX = std::accumulate(_glyphAdvances.begin() + run.glyphStart, _glyphAdvances.begin() + run.glyphStart + run.glyphCount, mutableOrigin.x); _glyphAdvances.size(): 0x000000000000001f run.glyphStart: 0x00000001 run.glyphCount: 0x0000ffff Same problem in wsl2 (Ubuntu or CentOS not matter) with Midnight Commander... start ok (in user's home directory) but Terminal crashes when trying cd to /home directory with mouse double click under .. or with cd .. in command line.
claunia added the Needs-TriageResolution-Fix-CommittedNeeds-Tag-Fix labels 2026-01-31 01:49:46 +00:00
Author
Owner

@DHowett commented on GitHub (Jun 24, 2020):

I think this shares a root cause with #6488. I'm preparing a revert, as I can repro this crash.

@DHowett commented on GitHub (Jun 24, 2020): I think this shares a root cause with #6488. I'm preparing a revert, as I can repro this crash.
Author
Owner

@DHowett commented on GitHub (Jun 24, 2020):

You know, actually, I misread this totally. Thanks for doing the digging.

/cc @miniksa

@DHowett commented on GitHub (Jun 24, 2020): You know, actually, I misread this totally. Thanks for doing the digging. /cc @miniksa
Author
Owner

@miniksa commented on GitHub (Jun 24, 2020):

Nnnnnnnnnnnnnn ok looking.

@miniksa commented on GitHub (Jun 24, 2020): Nnnnnnnnnnnnnn ok looking.
Author
Owner

@DHowett commented on GitHub (Jun 24, 2020):

So, this crash stops reproducing when #6206 is reverted -- it's probably still lurking, but I'm going to roll this bug and #6488 into another workitem, "reintroduce simple text detection but without the crash or the other problem" :P

@DHowett commented on GitHub (Jun 24, 2020): So, this crash stops reproducing when #6206 is reverted -- it's probably still lurking, but I'm going to roll this bug and #6488 into another workitem, "reintroduce simple text detection but without the crash or the other problem" :P
Author
Owner

@miniksa commented on GitHub (Jun 24, 2020):

When looking in the runs, one of the runs is 0xfffe glyphs long which is why there's an index out of range.

Removing the _CorrectBoxDrawing step prevents the crash. So it must be the one responsible for the 0xfffe glyph length calculation. It's probable that it was banking of having some data from one of the analysis/shaping/correction steps that is being skipped when a "simple" run is detected.

I'll dig deeper.

This also correlates well with the reported issue that there is some aliasing problems with glyphs when box drawing is involved (combined with the "simple" run detection.)

@miniksa commented on GitHub (Jun 24, 2020): When looking in the runs, one of the runs is 0xfffe glyphs long which is why there's an index out of range. Removing the `_CorrectBoxDrawing` step prevents the crash. So it must be the one responsible for the 0xfffe glyph length calculation. It's probable that it was banking of having some data from one of the analysis/shaping/correction steps that is being skipped when a "simple" run is detected. I'll dig deeper. This also correlates well with the reported issue that there is some aliasing problems with glyphs when box drawing is involved (combined with the "simple" run detection.)
Author
Owner

@ghost commented on GitHub (Jun 30, 2020):

:tada:This issue was addressed in #6665, which has now been successfully released as Windows Terminal Preview v1.1.1812.0.🎉

Handy links:

@ghost commented on GitHub (Jun 30, 2020): :tada:This issue was addressed in #6665, which has now been successfully released as `Windows Terminal Preview v1.1.1812.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.1.1812.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9252