Open LuisFRosas opened 7 years ago
Thanks for reporting this, @LuisFRosas. I will need some more info in order to debug this:
Thanks!
I have this issue as well :( It happens when I try to close the settings when it's opened on the first pane.
I get this all the time just switching tabs
For me, it seems it is more particular switching to package changelog tabs
What was the tool to create the gif?
I seem to trigger this bug when I switch to a tab that does not have selected text. (Not sure this is related, but also both tabs are unsaved files).
This fails everytime ---> So workflow would be open atom, Ctrl + N, Ctrl + N, Ctrl + PageUp
Do we have any update on this issue?
I try/caught this on my box and it's no longer crashing
What was the tool to create the gif?
kazam + gifify
Sorry all for the radio silence. I have a new full-time job with a startup and I'm swamped, plus I'm a new dad, so things are crazy on my end. Moreover, I don't get the crash so it's hard to test and fix from here. I'll try to work on this during the weekend and will report back then. Sorry again.
Any news ?
open-files-pane-view.js
~line 454 Change
if (entry) {
entry.element.classList.toggle('modified', modified);
}
to
if (entry && entry.element) {
entry.element.classList.toggle('modified', modified);
}
and again ~ 470
this.activeEntry = entry.element;
entry.element.classList.add('selected');
}```
@oriolmirosa Any updates on this issue? I get this error every day. It is very annoying
I can reproduce this creating two files without saving them. Switching between both unnamed files raises this error.
Error:
Uncaught TypeError: Cannot read property 'classList' of null
/home/pherring/.atom/packages/open-files/lib/open-files-pane-view.js:472
Hide Stack Trace
TypeError: Cannot read property 'classList' of null
at OpenFilesPaneView.setActiveEntry (/home/pherring/.atom/packages/open-files/lib/open-files-pane-view.js:472:19)
at /home/pherring/.atom/packages/open-files/lib/open-files-pane-view.js:413:19
at Function.simpleDispatch (/usr/share/atom/resources/app/static/<embedded>:11:1212922)
at Emitter.emit (/usr/share/atom/resources/app/static/<embedded>:11:1214363)
at Pane.setActiveItem (/usr/share/atom/resources/app/static/<embedded>:11:455685)
at Pane.activateItem (/usr/share/atom/resources/app/static/<embedded>:11:457933)
at TabBarView.onClick (/usr/share/atom/resources/app/static/<embedded>:11:1164009)
The error was thrown from the open-files package. This issue has already been reported.
What I did:
$ diff /home/pherring/.atom/packages/open-files/lib/open-files-pane-view.js{.old,} -u
--- /home/pherring/.atom/packages/open-files/lib/open-files-pane-view.js.old 2020-01-22 20:05:46.838623575 +0000
+++ /home/pherring/.atom/packages/open-files/lib/open-files-pane-view.js 2020-01-22 20:08:42.760613046 +0000
@@ -450,7 +450,7 @@
updateModifiedState(item, modified) {
let entry = this.entryForItem(item);
- if (entry) {
+ if (entry && entry.element) {
entry.element.classList.toggle('modified', modified);
}
}
@@ -467,7 +467,7 @@
if (item) {
let entry = this.entryForItem(item);
this.activeEntry ? this.activeEntry.classList.remove('selected') : undefined;
- if (entry) {
+ if (entry && entry.element) {
this.activeEntry = entry.element;
entry.element.classList.add('selected');
}
While I can't confirm it's fixed the problem (it should) I've not had the error for a while...
Made that PR.
Think this should work like the code posted here.
It happened to me I think when I split right to view the same file twice, maybe again and moved it back into the same left pane so I was viewing it 3 times in total.
I also saw some other fixes in the network/insights area for this project. I think it mentioned title
code, and possibly more.
If this project is not being actively maintained, any recommendations for a fork?
If this project is not being actively maintained, any recommendations for a fork?
https://github.blog/2022-06-08-sunsetting-atom/
When we introduced Atom in 2011, we set out to give developers a text editor that was deeply customizable but also easy to use—one that made it possible for more people to build software. While that goal of growing the software creator community remains, we’ve decided to retire Atom in order to further our commitment to bringing fast and reliable software development to the cloud via Microsoft Visual Studio Code and GitHub Codespaces.
This package is still relevant with the new project and forked text editor/IDE Pulsar here: https://pulsar-edit.dev/about.html
It is even how I am using the package now.
[Enter steps to reproduce:]
Atom: 1.18.0 x64 Electron: 1.3.15 OS: Unknown Windows version Thrown From: open-files package 0.8.2
Stack Trace
Uncaught TypeError: Cannot read property 'classList' of null
Commands
Non-Core Packages