abe33 / abe33/atom-pigments

Uncaught TypeError: Cannot read property 'id' of undefined

未關閉
#441 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
CoffeeScript
星號
518
分支
70
PR 合併指標
30 天內沒有已合併 PR

描述

[Enter steps to reproduce:]

1. ...
2. ...

**Atom**: 1.44.0 x64
**Electron**: 4.2.7
**OS**: Mac OS X 10.15.3
**Thrown From**: [pigments](https://github.com/abe33/atom-pigments) package 0.40.2

### Stack Trace

Uncaught TypeError: Cannot read property 'id' of undefined

```
At /Applications/Atom.app/Contents/Resources/app/static/:11

TypeError: Cannot read property 'id' of undefined
at extraRenderedScreenLines.forEach (/Applications/Atom.app/Contents/Resources/app/static/:11:76051)
at Map.forEach ()
at TextEditorComponent.renderLineTiles (/Applications/Atom.app/Contents/Resources/app/static/:11:75983)
at TextEditorComponent.renderContent (/Applications/Atom.app/Contents/Resources/app/static/:11:74509)
at TextEditorComponent.renderScrollContainer (/Applications/Atom.app/Contents/Resources/app/static/:11:73969)
at TextEditorComponent.render (/Applications/Atom.app/Contents/Resources/app/static/:11:72748)
at Object.updateSync (/Applications/Atom.app/Contents/Resources/app/static/:14:132897)
at TextEditorComponent.updateSyncBeforeMeasuringContent (/Applications/Atom.app/Contents/Resources/app/static/:11:70606)
at TextEditorComponent.screenPositionForPixelPosition (/Applications/Atom.app/Contents/Resources/app/static/:11:107777)
at HTMLElement.screenPositionForPixelPosition (/app.asar/src/text-editor-element.js:257:32)
at HTMLElement.ColorBufferElement.screenPositionForMouseEvent (/packages/pigments/lib/color-buffer-element.coffee:429:22)
at HTMLElement.ColorBufferElement.colorMarkerForMouseEvent (/packages/pigments/lib/color-buffer-element.coffee:415:17)
at Object.colorMarkerForMouseEvent (/packages/pigments/lib/pigments.coffee:221:25)
at Object.shouldDisplayContextMenu (/packages/pigments/lib/pigments.coffee:215:5)
at /packages/pigments/lib/pigments.coffee:111:36)
at ContextMenuManager.cloneItemForEvent (/Applications/Atom.app/Contents/Resources/app/static/:11:400477)
at ContextMenuManager.templateForEvent (/Applications/Atom.app/Contents/Resources/app/static/:11:399302)
at ContextMenuManager.showForEvent (/Applications/Atom.app/Contents/Resources/app/static/:11:400800)
at WindowEventHandler.handleDocumentContextmenu (/Applications/Atom.app/Contents/Resources/app/static/:11:287073)
```

### Commands

```
```

### Non-Core Packages

```
atom-beautify 0.33.4
autoclose-html 0.23.0
autocomplete 0.47.0
autocomplete-java 1.2.7
autocomplete-paths 2.12.2
autocomplete-xml 0.11.0
bracket-colorizer 1.4.0
color-picker 2.3.0
emmet 2.4.3
file-icons 2.1.33
highlight-selected 0.16.0
Hydrogen 2.10.3
japanese-menu 1.14.0
merge-conflicts 1.4.5
pigments 0.40.2
tabs-to-spaces 1.0.5
tag 0.5.0
```

貢獻指南

開啟貢獻指南

研究方向

The error originates in the pigments package, specifically in color-buffer-element.coffee and pigments.coffee. Start by examining the stack trace: the error occurs when accessing 'id' of undefined in a loop over extraRenderedScreenLines. Look at the colorMarkerForMouseEvent and shouldDisplayContextMenu functions. The issue likely involves a missing or undefined marker object when the context menu is triggered. Check the relevant CoffeeScript files in the lib directory to understand the data flow and identify where the undefined value is passed.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
coffeescript, javascript
領域
desktop-dev, tooling
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。