Home / GitHub Page

Returning from External Editor results in blank screen

#1

When I click on the external editor button (or use shortcut keys) my editor opens fine, but when I try to return to Joplin I just see a white screen. There’s seems no way of getting Joplin to display anything so I end up Force Quitting and then reopening it. The note will have been updated fine from the changes I made in the external editor, but it is no good if it ends up with a blank screen for Joplin each time.

I’ve tried using three different external editors but it is the same problem for all three. I have also tried using the system default and also setting up the path on Joplin’s options, but still the same problem.

Hope someone get help. My reason for needing an external editor is that when I am writing I like to have a full, uncluttered screen and Joplin does quite give me that total blank full screen look.

0 Likes

#2

Does it do it every single time, or randomly? Is it always on the same note?

Also what OS are you using?

0 Likes

#3

Maybe a bit more info that could help narrowing down the problem:

I could not reproduce this behavior consistently with git master on macOS. At least not every time. It seems to be a timing issue or a race condition. It can happen after clicking to unwatch the file. But mostly nothing happens, but when I then open general options, change a value, click Apply and then Cancel -> Boom - White Screen.
Only one out of 10 times I got a white screen right after clicking the unwatch button.

This is what I get in the console when the white screen happens:

[68121:0329/213333.842995:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7ff64c851a00]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[68121:0329/213333.843060:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7ff64c851a00]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
0 Likes

#4

I’m on a Mac running Mojave.

It happens every time. I think there may have been the odd time when it didn’t, but I think that was when I didn’t actually edit the file in the external editor. If I even add a full stop and then exit/save out of the other editor then I end up at a blank Joplin.

I tried with three different editors (Mweb, FocusWriter, and Focused) and get same result with each.

Hope that helps Laurent. TBH I’m only using the external editors for the full screen mode. Maybe at some point a full screen editor feature could be added to Joplin. It is already an amazing app, but for me that would make it my go to app not just for notes, but for all my writing.

0 Likes

#5

It happens with all notes.

Steps to reproduce:

  • edit note in external editor
  • save note, close editor
  • click on Watching... (to stop external editing)

Forrce quit is the only way to fix the white screen of death.

(1.0.142 on macOS 10.14.4)

0 Likes

#6

I think it might be an issue with either chokidar or fsevents, which don’t work properly with latest Electron. The problem is that when the bug happens it kills the debug window so it’s not possible to see any error message, and that makes me think it’s a lower level crash, somewhere in the native code.

Do any of you know how to get a stacktrace from the Joplin processes when the crash happens? I think it would help understand what is happening. Or maybe the macOS console would have some info?

0 Likes

#7

The only thing I could think of right now is using Sample process, or maybe creating a spindump.

The issue is that you can’t really create a stacktrace automatically when it happens, because it’s no crash. It’s just

0 Likes

#8

fsevents seems to have issues with Node, so it’s possible the Node process is actually crashing, while the Chrome one stays open. That would explain why there’s a blank window that doesn’t do anything. So I guess if we could somehow listen to this Node process and, if it does crash, print a stracktrace we could get some info.

0 Likes

#9

Just wanted to add to this that I’m experiencing the same issue, using Typora as my external editor on macOS. It’s pretty much the only problem I’m having with Joplin, so if there’s any way I can help solve it, I’d be delighted to. Thanks!

0 Likes

#10

Unfortunately there’s no information anywhere how to create coredumps on Mojave. (There’s not even any useful info on the Apple dev forums - there hardly is.) All the information is for previous versions of macOS and don’t work on Mojave. My /cores directory is empty after the process crashed. But there was a .crash file available, although I’m pretty sure you’ve seen that already. If not, here’s the part that pertains to the crashing thread:

(scroll in the area below)

Process:               Electron Helper [46524]
Path:                  /Users/USER/*/Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/Electron Helper
Identifier:            com.github.Electron.helper
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        Electron [46522]
Responsible:           Electron Helper [46524]
User ID:               501

Date/Time:             2019-04-11 20:22:07.263 -0400
OS Version:            Mac OS X 10.14.4 (18E226)
Report Version:        12
Bridge OS Version:     3.4 (16P4507)
Anonymous UUID:        REMOVED

Sleep/Wake UUID:       REMOVED

Time Awake Since Boot: 320000 seconds
Time Since Wake:       1100 seconds

System Integrity Protection: disabled

Crashed Thread:        0  CrRendererMain  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000000003e8
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [46524]

VM Regions Near 0x3e8:
--> 
    __TEXT                 000000010d44e000-000000010d44f000 [    4K] r-x/rwx SM=COW  /Users/USER/*/Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/Electron Helper

Thread 0 Crashed:: CrRendererMain  Dispatch queue: com.apple.main-thread
0   com.github.Electron.framework 	0x00000001121ea3a0 0x10d451000 + 81367968
1   fse.node                      	0x0000000118800f8b fse::FSEvents::~FSEvents() + 93 (fsevents.cc:65)
2   fse.node                      	0x000000011880101e fse::FSEvents::~FSEvents() + 14 (fsevents.cc:62)
3   com.github.Electron.framework 	0x000000010e831c11 0x10d451000 + 20843537
4   com.github.Electron.framework 	0x000000010e831fca 0x10d451000 + 20844490
5   com.github.Electron.framework 	0x000000010ec922a3 0x10d451000 + 25432739
6   com.github.Electron.framework 	0x000000010ec90341 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) + 1585
7   com.github.Electron.framework 	0x000000010ec992a1 0x10d451000 + 25461409
8   com.github.Electron.framework 	0x000000010e85929f 0x10d451000 + 21004959
9   com.github.Electron.framework 	0x000000010f2031ab 0x10d451000 + 31138219
10  com.github.Electron.framework 	0x000000010f264572 0x10d451000 + 31536498
11  com.github.Electron.framework 	0x000000010f2031ab 0x10d451000 + 31138219
12  com.github.Electron.framework 	0x000000010f21d5ff 0x10d451000 + 31245823
13  com.github.Electron.framework 	0x000000010f21dab8 0x10d451000 + 31247032
14  com.github.Electron.framework 	0x000000010f2c205a 0x10d451000 + 31920218
15  com.github.Electron.framework 	0x000000010f2c531a 0x10d451000 + 31933210
16  com.github.Electron.framework 	0x000000010f2c197f 0x10d451000 + 31918463
17  com.apple.CoreFoundation      	0x00007fff46c185e3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18  com.apple.CoreFoundation      	0x00007fff46c18589 __CFRunLoopDoSource0 + 108
19  com.apple.CoreFoundation      	0x00007fff46bfbf3b __CFRunLoopDoSources0 + 195
20  com.apple.CoreFoundation      	0x00007fff46bfb505 __CFRunLoopRun + 1189
21  com.apple.CoreFoundation      	0x00007fff46bfae0e CFRunLoopRunSpecific + 455
22  com.apple.Foundation          	0x00007fff48e51a9f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 280
23  com.github.Electron.framework 	0x000000010f2c255d 0x10d451000 + 31921501
24  com.github.Electron.framework 	0x000000010f2c149e 0x10d451000 + 31917214
25  com.github.Electron.framework 	0x000000010f23f465 0x10d451000 + 31384677
26  com.github.Electron.framework 	0x00000001121104f6 0x10d451000 + 80475382
27  com.github.Electron.framework 	0x000000010f0b5f29 0x10d451000 + 29773609
28  com.github.Electron.framework 	0x00000001104a9aad 0x10d451000 + 50694829
29  com.github.Electron.framework 	0x000000010f0b5154 0x10d451000 + 29770068
30  com.github.Electron.framework 	0x000000010d453f14 AtomMain + 84
31  com.github.Electron.helper    	0x000000010d44ef10 0x10d44e000 + 3856
32  libdyld.dylib                 	0x00007fff730743d5 start + 1
0 Likes

#11

Also noticed that if I don’t quit Typora, just close the window, it works fine and Joplin reflects any changes I made. I can click the ‘Watching’ button again and it seems to return to normal. As soon as I then quit Typora, even if no note is open, then Jopling goes to the white screen.

0 Likes

#12

Thanks for the crash dump @tessus, it would indeed confirm it’s something to do with fsevent as this is the last call before getting to the Electron framework. I’ll file a bug report with them if possible and see if it helps. Hopefully a future version of either Electron or fsevent will fix this.

0 Likes

#13

Great, please let me know the link to the issue when you have created one. I might be able to help them by collecting a core dump. (That is, if they tell me how to do that on Mojave.)

0 Likes

#14

While we’re at it, I think Electron and react-native should be updated. I believe I read that certain things were fixed that could help with a few problems that occured after the last migration of both components.

0 Likes