abe33 / abe33/atom-color-highlight
Uncaught TypeError: Cannot read property 'tokenAtBufferColumn' of undefined
- Linguagem predominante
- CoffeeScript
- Estrelas
- 80
- Forks
- 8
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Happens when quickly doing loads of undo and redo.
---
**Atom Version**: 0.184.0
**System**: linux 3.18.6-1-ARCH
**Thrown From**: [atom-color-highlight](https://github.com/abe33/atom-color-highlight) package, v3.0.8
### Stack Trace
Uncaught TypeError: Cannot read property 'tokenAtBufferColumn' of undefined
```
At /usr/share/atom/resources/app/src/tokenized-buffer.js:559
TypeError: Cannot read property 'tokenAtBufferColumn' of undefined
at TokenizedBuffer.module.exports.TokenizedBuffer.tokenForPosition (/usr/share/atom/resources/app/src/tokenized-buffer.js:559:38)
at TokenizedBuffer.module.exports.TokenizedBuffer.scopeDescriptorForPosition (/usr/share/atom/resources/app/src/tokenized-buffer.js:552:22)
at DisplayBuffer.module.exports.DisplayBuffer.scopeDescriptorForBufferPosition (/usr/share/atom/resources/app/src/display-buffer.js:1042:35)
at color-marker.module.exports.MarkerMixin.getScope (/home/muchweb/.atom/packages/atom-color-highlight/lib/marker-mixin.coffee:59:42)
at color-marker.module.exports.MarkerMixin.hiddenDueToComment (/home/muchweb/.atom/packages/atom-color-highlight/lib/marker-mixin.coffee:67:14)
at color-marker.module.exports.MarkerMixin.isHidden (/home/muchweb/.atom/packages/atom-color-highlight/lib/marker-mixin.coffee:53:6)
at color-marker.module.exports.MarkerMixin.show (/home/muchweb/.atom/packages/atom-color-highlight/lib/marker-mixin.coffee:18:33)
at atom-color-highlight.AtomColorHighlightElement.updateSelections (/home/muchweb/.atom/packages/atom-color-highlight/lib/atom-color-highlight-element.coffee:82:10)
at /home/muchweb/.atom/packages/atom-color-highlight/lib/atom-color-highlight-element.coffee:59:8
```
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
The error occurs in the marker-mixin.coffee file at line 59, where getScope calls scopeDescriptorForBufferPosition. The issue likely involves a missing or undefined tokenized buffer when undo/redo operations are rapid. Start by examining the marker-mixin.coffee file to understand the flow and add null checks for the tokenized buffer. Run the package tests to verify the fix.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Domínio
- desktop-dev
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100