TiddlyDesktop icon indicating copy to clipboard operation
TiddlyDesktop copied to clipboard

TiddlyDesktop is crashing on macOS Big Sur 11.2 on next start if exited in fullscreen mode.

Open hbayindir opened this issue 4 years ago • 34 comments

TiddlyDesktop is repeatedly crashing on M1 powered MacBook computers if Microsoft Teams is running at the same time.. While I'm not knowledgeable about underpinnings of the TiddlyDesktop and Electron applications, I can do testing and guided poking on the system.

I've attached a typical crash report. It's here.

Crashes happen while working on a Wiki file, and while trying to reopen the software again.

Steps to Reproduce

  1. Open Microsoft Teams
  2. Open Tiddly Wiki
  3. Try to open a Wiki file and edit it.
  4. The crash will find you. Repeatedly.

hbayindir avatar Feb 09 '21 17:02 hbayindir

I am happy that finally someone else has the same problem, and I'm even happier that you found the pattern. Indeed, it crashed this morning ten minutes into a Teams meeting. I have a 2019 core i7, and the problem appeared after the first Big Sur security update. I am able to reopen TiddlyDesktop in most cases, though.

istvank avatar Feb 10 '21 11:02 istvank

Thanks for the feedback. I'll update the title of the bug. I've also found out that sometimes the helper is using too much CPU (%100 or more).

Maybe some of the underlying parts of the code needs updating. Since I've moved from Zim to Tiddly to be able to work on Mac unhampered, this is a very important problem for me.

hbayindir avatar Feb 10 '21 15:02 hbayindir

I'm also having constant crashing immediately after open or shortly thereafter some use. I do not use Teams. I regularly use TiddlyDesktop many times each week, and believe I first noticed the instability after I upgraded my mac to Big Sur from Catalina. Since then, TiddlyDesktop kept crashing shortly after open.

I tried 1) uninstalling, and then 2) cleared out the following files:

rm -rf ~/Library/Caches/TiddlyDesktop
rm -rf ~/Library/Saved\ Application\ State/com.tiddlywiki.savedState/
rm -rf ~/Library/Application\ Support/TiddlyDesktop/
rm -rf ~/Library/Preferences/com.tiddlywiki.plist

After 3) reinstallation, it still continues to crash, and is largely unusable in this state.


my specs:

  • macOS Big Sur 11.2.1 (20D74)
  • MBP 2019 i7
  • TW 5.1.23
  • TiddlyDesktop 0.0.14
  • backup location: local disk
  • TiddlyWiki file location: iCloud Drive folder

qabulin avatar Feb 19 '21 02:02 qabulin

Thanks @hbayindir @istvank @qabulin

As a first step towards addressing this I've made a first prerelease of v0.0.15 of TiddlyDesktop which just includes an update to the newest version of nwjs (v0.51.1), and no other functional changes:

https://github.com/Jermolene/TiddlyDesktop/releases/tag/v0.0.15-prerelease.1

I'd be grateful if you're able to test it.

Jermolene avatar Feb 19 '21 18:02 Jermolene

Thanks @hbayindir @istvank @qabulin

As a first step towards addressing this I've made a first prerelease of v0.0.15 of TiddlyDesktop which just includes an update to the newest version of nwjs (v0.51.1), and no other functional changes:

https://github.com/Jermolene/TiddlyDesktop/releases/tag/v0.0.15-prerelease.1

I'd be grateful if you're able to test it.

Thanks @Jermolene for the new version. Since I hold all my office notes in Tiddly, and would be migrating a lot of information into it, I'd be testing it very extensively and reporting my feedback here.

I've downloaded it already and would be installing it now.

hbayindir avatar Feb 19 '21 19:02 hbayindir

I've just tried, and it crashes more reliably now. This is how it happens:

  1. Tiddly Wiki (wiki selection screen) opens fine.
  2. When I open my Wiki file, it crashes on the spot (see the attached crash log).
  3. Moreover, when I delete the following files, I can open my Wiki file once, however when I quit Tiddly, it's not possible to reopen it again (i.e. GOTO 1)
rm -rf ~/Library/Caches/TiddlyDesktop
rm -rf ~/Library/Saved\ Application\ State/com.tiddlywiki.savedState/
rm -rf ~/Library/Application\ Support/TiddlyDesktop/
rm -rf ~/Library/Preferences/com.tiddlywiki.plist

I think this situation points to something, which is not written to disk as Tiddly intended to write. As a result, Tiddly blows up in a rather spectacular fashion when it tries to read these.

Crash Log

hbayindir avatar Feb 19 '21 20:02 hbayindir

Thanks for the report @hbayindir that's very helpful. Do you get the same crash for all wikis, including a freshly downloaded https://tiddlywiki.com/empty.html?

It looks like we're still some way from an M1 build of nwjs: https://github.com/nwjs/nw.js/issues/7620

Jermolene avatar Feb 19 '21 21:02 Jermolene

Thanks for the report @hbayindir that's very helpful. Do you get the same crash for all wikis, including a freshly downloaded https://tiddlywiki.com/empty.html?

You're very welcome. Unfortunately yes. Exactly the same fashion. I've tested the empty wiki. Opening for the first time works, saving works, but when you exit TiddlyDesktop, you cannot return to the wiki again. It crashes in the same, spectacular fashion. The crash log is here.

Moreover, I've tested the latest version and my "Office Wiki" on an Intel Mac (Big Sur), and it works absolutely fine. So neither TiddlyDesktop, nor the file has a problem it seems. It's about the stored state on the disk probably.

Is it possible to get debug logging from either TiddlyDesktop or nw.js? I might try to dig into it if I have free time.

Thanks for your time and quick reply again.

hbayindir avatar Feb 19 '21 22:02 hbayindir

Same problem here with 0.0.14 but it crashes by itself, no need to have m$ teams :) (On Apple M1 and Big Sur 11.2).

nderambure avatar Feb 20 '21 01:02 nderambure

Same problem here without Microsoft Teams. My specs are similar to qabulin, but with a MBP 2018 i7. Started after upgrading to Big Sur.

mrmattson avatar Feb 22 '21 04:02 mrmattson

Same problem here without Microsoft Teams. My specs are similar to qabulin, but with a MBP 2018 i7. Started after upgrading to Big Sur.

@mrmattson, can you please clean the following files and retry using TiddlyWiki? If it's still crashing, I'd like to update the title of the bug accordingly. I don't want to upgrade it twice, back to back.

rm -rf ~/Library/Caches/TiddlyDesktop
rm -rf ~/Library/Saved\ Application\ State/com.tiddlywiki.savedState/
rm -rf ~/Library/Application\ Support/TiddlyDesktop/
rm -rf ~/Library/Preferences/com.tiddlywiki.plist

hbayindir avatar Feb 23 '21 07:02 hbayindir

Thanks @hbayindir @istvank @qabulin

As a first step towards addressing this I've made a first prerelease of v0.0.15 of TiddlyDesktop which just includes an update to the newest version of nwjs (v0.51.1), and no other functional changes:

https://github.com/Jermolene/TiddlyDesktop/releases/tag/v0.0.15-prerelease.1

I'd be grateful if you're able to test it.

So far, I've had some success with this today. I've been successfully running v0.0.15 all day without any crashes.

This is what I did:

  1. Removed TiddlyDesktop app.
  2. Cleared out save data, cache, etc:
rm -rf ~/Library/Caches/TiddlyDesktop
rm -rf ~/Library/Saved\ Application\ State/com.tiddlywiki.savedState/
rm -rf ~/Library/Application\ Support/TiddlyDesktop/
rm -rf ~/Library/Preferences/com.tiddlywiki.plist
  1. Download and installed the v0.0.15 prerelease.
  2. Fired up TiddlyDesktop and changed nothing. I kept everything default, out of the box.
  3. I selected [Create new wiki] and an "Empty TiddlyWiki file (Prerelease)" to test.
  4. I used this for about an hour so, creating fresh Tiddlers, carrying on with my work as normal as I could. (I opened my existing TiddlyWiki as read-only via Safari whenever I needed to reference old notes). I tried stopping starting, force quitting, shutting down and starting back up... no crashes.
  5. Later, I began customizing by updating settings to my preferred backup location on my local machine.
  6. Then I selected [Add wiki file], choosing my normal existing TiddlyWiki file I've been using almost daily for years up until now, which sits in an iCloud Drive folder.
  7. I used my normal wiki for the rest of the day, copying over earlier notes, creating other new notes, editing existing Tiddlers, opening tons of things, normal stuff. Tried stopping, starting, quitting various ways, shutting down and starting back up... no crashes (so far).

I'll post back if I have any issues.

(Note: I also edited my earlier provided specs to include my file locations, in case that is ever pertinent.)

qabulin avatar Feb 23 '21 12:02 qabulin

I can confirm the method used by @qabulin is working for me too. Still on M1 with many apps running, no crash in the day.

nderambure avatar Feb 24 '21 00:02 nderambure

@Jermolene, thanks for taking the time to make that prerelease! Things are looking good right now for me, as I've had no crashes or other noticeable stability issues after replacing TiddlyDesktop with your prerelease and using the steps I posted earlier. I hope others are also doing well! ^_^

qabulin avatar Feb 25 '21 06:02 qabulin

Thanks for the prerelease! I confirm I had no crashes while working with it during the day, but I MIGHT have some issues after returning from standby. Yesterday after lunch break and standby of my Mac, Tiddly was gone, same this morning, and in both cases I do not remember closing it (I rarely do, in fact). I will continue looking into it. I do not find any crash reports in Library/Application Support (as I did with the previous version MS Teams crash).

istvank avatar Feb 25 '21 08:02 istvank

@Jermolene, thanks for taking the time to make that prerelease! Things are looking good right now for me, as I've had no crashes or other noticeable stability issues after replacing TiddlyDesktop with your prerelease and using the steps I posted earlier. I hope others are also doing well! ^_^

Did you ever exit and re-open TiddlyDesktop? Mine was started to crash after closing and returning to it.

If yours work without problems, I need to look into mine again.

hbayindir avatar Feb 25 '21 08:02 hbayindir

@Jermolene, thanks for taking the time to make that prerelease! Things are looking good right now for me, as I've had no crashes or other noticeable stability issues after replacing TiddlyDesktop with your prerelease and using the steps I posted earlier. I hope others are also doing well! ^_^

Did you ever exit and re-open TiddlyDesktop? Mine was started to crash after closing and returning to it.

If yours work without problems, I need to look into mine again.

@hbayindir I believe so. Please note my steps above: https://github.com/Jermolene/TiddlyDesktop/issues/224#issuecomment-784174127

Note Step 9:

[...] Tried stopping, starting, quitting various ways, shutting down and starting back up... no crashes (so far).

Let me know if you have something else in mind for stopping, starting, or quitting/exiting TiddlyDesktop that I can try.

Otherwise, after following those steps I posted above, I've been using TiddlyDesktop consistently and daily, with no crashing or other unstable behaviors. It's working just fine for me now. :^)

qabulin avatar Feb 26 '21 05:02 qabulin

@qabulin, thanks for your reply. I've found out why your instructions doesn't help me after the first exit. You're using an intel Mac, mine is an M1. Intel Macs do not crash with latest TiddlyDesktop, you're correct.

My TiddlyDesktop is reliably crashing after exiting, reopening the app and the wiki. Pressing open on my wiki consistently crashes TiddlyDesktop after first exit.

Moreover, I've narrowed the problem. The problematic files are in ~/Library/Application Support/Tiddly Desktop. I'll try to further narrow the problem to the file(s) causing the problem. Hope it helps both TiddlyDesktop and nwjs.

Cheers!

hbayindir avatar Feb 28 '21 14:02 hbayindir

Thx for your digging @hbayindir, I'm also on M1 (MacBook Pro), but I can't reproduce your steps, TiddlyDesktop is working fine since the complete wipe and install of 15th version. Please let me know if I can bring more information from my setup.

nderambure avatar Feb 28 '21 22:02 nderambure

Thx for your digging @hbayindir, I'm also on M1 (MacBook Pro), but I can't reproduce your steps, TiddlyDesktop is working fine since the complete wipe and install of 15th version. Please let me know if I can bring more information from my setup.

You're welcome. I'm just trying to do my best.

That's strange. The behavior I see is as follows:

  • After clearing the folder, everything works without any problems.
  • When I exit TiddlyDesktop, I cannot re-open any wikis anymore.

Some more observations:

  • Newly created wikis open for the first time regardless of state.
    • They cannot be opened after exiting TiddlyDesktop

Can you please post a directory listing of your ~/Library/Application Support/TiddlyDesktop folder after exiting the application? and ls -l will do. You can redact usernames or other sensitive stuff. I just want to see which files remain behind.

hbayindir avatar Mar 01 '21 10:03 hbayindir

@hbayindir Following up for completeness of data. I accomplished the steps you asked:

rm -rf ~/Library/Caches/TiddlyDesktop
rm -rf ~/Library/Saved\ Application\ State/com.tiddlywiki.savedState/
rm -rf ~/Library/Application\ Support/TiddlyDesktop/
rm -rf ~/Library/Preferences/com.tiddlywiki.plist

I've had no crashing since doing that 3 days ago. Again, I'm running:

  • macOS Big Sur 11.2.2
  • MBP 2018 i7
  • TW 5.1.23
  • TiddlyDesktop 0.0.14
  • TiddlyWiki file location: Dropbox folder

mrmattson avatar Mar 01 '21 12:03 mrmattson

@hbayindir Spoke too soon. TiddlyDesktop crashed on me this morning mid-editing a tiddler. I'd just restarted my computer, so I had almost no other applications open. I'd also just opened the TiddlyDesktop app; it had not been running all night. Since 2 days ago I've been opening and closing TiddlyDesktop and making edits to a tiddlywiki file. I'm able to reopen and continue working on TiddlyDesktop now, but I'm no longer crash-free since rm -rf those directories.

mrmattson avatar Mar 03 '21 12:03 mrmattson

Hi @mrmattson, thanks for the information.

It seems that the problem is rooted in how nwjs is handling browser state and profile data it holds at the background, under ~/Library/Application Support/TiddlyDesktop/Default folder. When I remove it, I'm able to open my wikis again. However, there's something flaky inside because after removing it three or four times (I was trying to capture a screen recording about current state), it stopped crashing, strange. I'll try to dig deeper when I have time.

TL;DR: There's a problem about how data is handled under ~/Library/Application Support/TiddlyDesktop/Default directory. Something in that folder is causing the crash.

hbayindir avatar Mar 06 '21 11:03 hbayindir

I've probably found the bug. It happens when you exit TiddlyDesktop while a wiki is in fullscreen mode and living on its own dedicated desktop. If you have a windowed Wiki, exiting and restarting doesn't kill anything.

How to Reproduce

Prerequisites: TiddlyDesktop 0.15 prerelease, an M1 powered Mac, macOS Big Sur.

  1. First clean problematic files: rm -rvf ~/Library/Application Support/TiddlyDesktop/Default.
  2. Open TiddlyDesktop.
  3. Add your Wiki file.
  4. Open your Just added Wiki.
  5. Switch to fullscreen (via green button).
  6. Exit TiddlyDesktop with cmd+q.
  7. Re-open TiddlyDesktop.
  8. Try to re-open your Wiki.
  9. Bingo. Window disappears, you're greeted with a nice crash log.

Expected Behavior

  1. First clean problematic files: rm -rvf ~/Library/Application Support/TiddlyDesktop/Default.
  2. Open TiddlyDesktop.
  3. Add your Wiki file.
  4. Open your Wiki.
  5. Switch to fullscreen (via green button).
  6. Exit TiddlyDesktop with cmd+q.
  7. Re-open TiddlyDesktop.
  8. Try to re-open your Wiki.
  9. Your Wiki shall restore. In fullscreen or windowed mode. Doesn't matter.

Temporary Workaround

Do not exit from TiddlyDesktop while one or more of your wikis are in fullscreen mode.

hbayindir avatar Mar 06 '21 21:03 hbayindir

Thanks @hbayindir @istvank @qabulin As a first step towards addressing this I've made a first prerelease of v0.0.15 of TiddlyDesktop which just includes an update to the newest version of nwjs (v0.51.1), and no other functional changes: https://github.com/Jermolene/TiddlyDesktop/releases/tag/v0.0.15-prerelease.1 I'd be grateful if you're able to test it.

So far, I've had some success with this today. I've been successfully running v0.0.15 all day without any crashes.

This is what I did:

  1. Removed TiddlyDesktop app.
  2. Cleared out save data, cache, etc:
rm -rf ~/Library/Caches/TiddlyDesktop
rm -rf ~/Library/Saved\ Application\ State/com.tiddlywiki.savedState/
rm -rf ~/Library/Application\ Support/TiddlyDesktop/
rm -rf ~/Library/Preferences/com.tiddlywiki.plist
  1. Download and installed the v0.0.15 prerelease.
  2. Fired up TiddlyDesktop and changed nothing. I kept everything default, out of the box.
  3. I selected [Create new wiki] and an "Empty TiddlyWiki file (Prerelease)" to test.
  4. I used this for about an hour so, creating fresh Tiddlers, carrying on with my work as normal as I could. (I opened my existing TiddlyWiki as read-only via Safari whenever I needed to reference old notes). I tried stopping starting, force quitting, shutting down and starting back up... no crashes.
  5. Later, I began customizing by updating settings to my preferred backup location on my local machine.
  6. Then I selected [Add wiki file], choosing my normal existing TiddlyWiki file I've been using almost daily for years up until now, which sits in an iCloud Drive folder.
  7. I used my normal wiki for the rest of the day, copying over earlier notes, creating other new notes, editing existing Tiddlers, opening tons of things, normal stuff. Tried stopping, starting, quitting various ways, shutting down and starting back up... no crashes (so far).

I'll post back if I have any issues.

(Note: I also edited my earlier provided specs to include my file locations, in case that is ever pertinent.)

work fine for me! thanks!

buptsse avatar Apr 30 '21 15:04 buptsse

I'm on

  • Big Sur 11.2.3
  • 2017 MBP i5
  • TiddlyDesktop 0.0.14
  • TiddlyWiki 5.1.23
  • frequently have two 4K monitors attached as well as laptop monitor

I never full-screen TiddlyDesktop. I have been wondering why it seems to disappear periodically, and just found it had segfaulted.

com.apple.xpc.launchd[1] (application.com.tiddlywiki.3648420.3648423[53363]): Service exited due to SIGSEGV | sent by exc handler[53363]

I am not seeing crash reports in Console.app, only that line. Happened 2x today 6 hours apart and have noticed this other days. I think it's happening while TiddlyDesktop is idle (but not necessarily the machine, this has definitely happened while I'm using other apps), have not had it happen during active use of TiddlyDesktop.

Please advise whether this is the right issue, happy to help any way I can. I have now started by running the pre-release version.

replaid avatar Jun 01 '21 15:06 replaid

Oh no. I'm crashing too, but I think I have a workaround. I'm unsure if I tested out the fullscreen properly before, but everything else has been perfectly stable until just now. Today, I decided to try fullscreen exit and restart after @replaid posted.

steps to reproduce:

  1. open TiddlyDesktop
  2. open a TiddlyWiki
  3. go fullscreen with that TiddlyWiki window
  4. Cmd+Q close
  5. open TiddlyDesktop app again
  6. try to open the previous TiddlyWiki again, and everything (TiddlyDesktop & TiddlyWiki) silently close

I captured a stack trace by running the contents of the application directly from Finder (stack trace details expandable below) and repeating the steps above. Diagnostics report is below that.

click to reveal terminal stack trace...
% /Applications/TiddlyDesktop.app/Contents/MacOS/nwjs ; exit;
Received signal 11 SEGV_MAPERR 000000000030
 [0x00010afba6d9]
 [0x00010aef1393]
 [0x00010afba5f1]
 [0x7fff2038dd7d]
 [0x7fbf4d606dc0]
 [0x00010e9440e6]
 [0x00010eb276f1]
 [0x7fff2043721d]
 [0x7fff204d2c7c]
 [0x7fff204d2bfa]
 [0x7fff2040829e]
 [0x7fff211732c8]
 [0x7fff23764657]
 [0x7fff23146e28]
 [0x7fff235b69c7]
 [0x7fff23148540]
 [0x7fff2371a565]
 [0x00010e8158d0]
 [0x00010eb20892]
 [0x00010eb30ede]
 [0x00010e915646]
 [0x00010e914da5]
 [0x00010e3ba833]
 [0x000109120267]
 [0x0001091230b5]
 [0x00010912370b]
 [0x00010914e9c8]
 [0x00010914e845]
 [0x00010e3ea8fd]
 [0x000108da0dc3]
 [0x000108bd8765]
 [0x00010c123435]
 [0x00010af64b66]
 [0x00010af7b586]
 [0x00010af7b27a]
 [0x00010afd22a3]
 [0x00010afcab92]
 [0x00010afd1c6f]
 [0x7fff20441a8c]
 [0x7fff204419f4]
 [0x7fff20441774]
 [0x7fff2044019c]
 [0x7fff2043f75c]
 [0x7fff28661203]
 [0x7fff28660f65]
 [0x7fff28660d03]
 [0x7fff22c3bb32]
 [0x7fff22c3a305]
 [0x00010b5d6cb0]
 [0x00010afcab92]
 [0x00010b5d6be9]
 [0x7fff22c2c679]
 [0x00010afd2d5c]
 [0x00010afd1793]
 [0x00010af7be2b]
 [0x00010af4333d]
 [0x00010b1ee223]
 [0x000108830635]
 [0x000108832482]
 [0x00010882d860]
 [0x00010ad0cb12]
 [0x00010ad0c723]
 [0x00010ad0ab89]
 [0x00010ad0b3fc]
 [0x0001070bb787]
 [0x000101d1795f]
 [0x7fff20363f3d]
[end of stack trace]
[0602/075314.990303:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffeedeea000, 0x2000): (os/kern) invalid address (1)
[0602/075315.151011:WARNING:crash_report_exception_handler.cc(240)] UniversalExceptionRaise: (os/kern) failure (5)
zsh: segmentation fault  /Applications/TiddlyDesktop.app/Contents/MacOS/nwjs
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...       5 completed.

[Process completed]
click to reveal diagnostics report...
Date/Time:        2021-06-02 08:25:17.956 +0900
End time:         2021-06-02 08:25:33.219 +0900
OS Version:       macOS 11.3.1 (Build 20E241)
Architecture:     x86_64h
Report Version:   32
Incident Identifier: 2DF855F0-FD93-4735-A37F-5227E9A02FF8

Data Source:      Microstackshots
Shared Cache:     94BDF3EE-CD67-34B0-91E1-19D61487C096 slid base address 0x7fff2003a000, slide 0x3a000

Command:          nwjs Helper (Renderer)
Path:             /Applications/TiddlyDesktop.app/Contents/Frameworks/nwjs Framework.framework/Versions/88.0.4324.150/Helpers/nwjs Helper (Renderer).app/Contents/MacOS/nwjs Helper (Renderer)
Identifier:       io.nwjs.nwjs.helper.renderer
Version:          88.0.4324.150 (4324.150)
PID:              71132

Event:            wakeups
Action taken:     none
Wakeups:          45001 wakeups over the last 15 seconds (2948 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds
Wakeups limit:    45000
Limit duration:   300s
Wakeups caused:   45001
Wakeups duration: 15s
Duration:         15.26s
Duration Sampled: 10.28s
Steps:            5

Hardware model:   MacBookPro15,2
Active cpus:      8
Boot args:        chunklist-security-epoch=0 -chunklist-no-rev2-dev

Fan speed:        6348 rpm

Heaviest stack for the target process:
  4  start + 1 (libdyld.dylib + 89917) [0x7fff20363f3d]
  4  main + 378 (nwjs Helper (Renderer) + 3290) [0x10efb1cda]
  4  ChromeMain + 279 (nwjs Framework + 26503) [0x111520787]
  4  ??? (nwjs Framework + 63267836) [0x1151703fc]
  4  ??? (nwjs Framework + 63265673) [0x11516fb89]
  4  ??? (nwjs Framework + 63272713) [0x115171709]
  4  ??? (nwjs Framework + 165511114) [0x11b2f1fca]
  4  ??? (nwjs Framework + 65594173) [0x1153a833d]
  4  ??? (nwjs Framework + 65826347) [0x1153e0e2b]
  4  ??? (nwjs Framework + 66176915) [0x115436793]
  4  ??? (nwjs Framework + 164915411) [0x11b2608d3]
  4  ??? (<429FFA2F-97F3-3189-8BE5-56BC3B973EB2> + 851553) [0x122939e61]
  4  ??? (nwjs Framework + 59520436) [0x114ddd5b4]
  4  ??? (<429FFA2F-97F3-3189-8BE5-56BC3B973EB2> + 114113) [0x122885dc1]
  4  ??? (<429FFA2F-97F3-3189-8BE5-56BC3B973EB2> + 191988) [0x122898df4]
  4  ??? (nwjs Framework + 164913656) [0x11b2601f8]
  4  -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (Foundation + 392007) [0x7fff211c9b47]
  4  CFRunLoopRunSpecific + 563 (CoreFoundation + 522076) [0x7fff2043f75c]
  4  __CFRunLoopRun + 893 (CoreFoundation + 524700) [0x7fff2044019c]
  4  __CFRunLoopDoSources0 + 242 (CoreFoundation + 530292) [0x7fff20441774]
  4  __CFRunLoopDoSource0 + 180 (CoreFoundation + 530932) [0x7fff204419f4]
  4  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 (CoreFoundation + 531084) [0x7fff20441a8c]
  4  ??? (nwjs Framework + 66178159) [0x115436c6f]
  4  ??? (nwjs Framework + 66149266) [0x11542fb92]
  4  ??? (nwjs Framework + 164913770) [0x11b26026a]
  4  ??? (nwjs Framework + 65823354) [0x1153e027a]
  3  ??? (nwjs Framework + 65824134) [0x1153e0586]
  3  ??? (nwjs Framework + 65731430) [0x1153c9b66]
  2  ??? (nwjs Framework + 149942692) [0x11a4191a4]
  2  ??? (nwjs Framework + 149939874) [0x11a4186a2]
  1  ??? (nwjs Framework + 150081539) [0x11a43b003]
  1  ??? (nwjs Framework + 165500905) [0x11b2ef7e9]
  1  ??? (nwjs Framework + 165457972) [0x11b2e5034]
  1  ??? (nwjs Framework + 32986095) [0x11348f3ef]
  1  ??? (nwjs Framework + 66209039) [0x11543e50f]
  1  ??? (nwjs Framework + 66209665) [0x11543e781]
  1  mach_msg_trap + 10 (libsystem_kernel.dylib + 4906) [0x7fff2031332a]


Powerstats for:   nwjs Helper (Renderer) (nwjs Helper (Renderer)) [71132]
UUID:             40B7C3AA-CEE9-39D3-8E4D-E5CFA6FA7A5F
App Version:      88.0.4324.150
Build Version:    4324.150
Path:             /Applications/TiddlyDesktop.app/Contents/Frameworks/nwjs Framework.framework/Versions/88.0.4324.150/Helpers/nwjs Helper (Renderer).app/Contents/MacOS/nwjs Helper (Renderer)
Architecture:     x86_64
Footprint:        32.45 MB -> 54.52 MB (+22.07 MB)
Start time:       2021-06-02 08:25:18.823 +0900
End time:         2021-06-02 08:25:29.107 +0900
Num samples:      5 (100%)
Primary state:    3 samples Non-Frontmost App, Non-Suppressed, User mode, Effective Thread QoS Default, Requested Thread QoS User Interactive, Override Thread QoS Unspecified
User Activity:    0 samples Idle, 5 samples Active
Power Source:     0 samples on Battery, 5 samples on AC
  4  start + 1 (libdyld.dylib + 89917) [0x7fff20363f3d]
    4  main + 378 (nwjs Helper (Renderer) + 3290) [0x10efb1cda]
      4  ChromeMain + 279 (nwjs Framework + 26503) [0x111520787]
        4  ??? (nwjs Framework + 63267836) [0x1151703fc]
          4  ??? (nwjs Framework + 63265673) [0x11516fb89]
            4  ??? (nwjs Framework + 63272713) [0x115171709]
              4  ??? (nwjs Framework + 165511114) [0x11b2f1fca]
                4  ??? (nwjs Framework + 65594173) [0x1153a833d]
                  4  ??? (nwjs Framework + 65826347) [0x1153e0e2b]
                    4  ??? (nwjs Framework + 66176915) [0x115436793]
                      4  ??? (nwjs Framework + 164915411) [0x11b2608d3]
                        4  ??? (<429FFA2F-97F3-3189-8BE5-56BC3B973EB2> + 851553) [0x122939e61]
                          4  ??? (nwjs Framework + 59520436) [0x114ddd5b4]
                            4  ??? (<429FFA2F-97F3-3189-8BE5-56BC3B973EB2> + 114113) [0x122885dc1]
                              4  ??? (<429FFA2F-97F3-3189-8BE5-56BC3B973EB2> + 191988) [0x122898df4]
                                4  ??? (nwjs Framework + 164913656) [0x11b2601f8]
                                  4  -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (Foundation + 392007) [0x7fff211c9b47]
                                    4  CFRunLoopRunSpecific + 563 (CoreFoundation + 522076) [0x7fff2043f75c]
                                      4  __CFRunLoopRun + 893 (CoreFoundation + 524700) [0x7fff2044019c]
                                        4  __CFRunLoopDoSources0 + 242 (CoreFoundation + 530292) [0x7fff20441774]
                                          4  __CFRunLoopDoSource0 + 180 (CoreFoundation + 530932) [0x7fff204419f4]
                                            4  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 (CoreFoundation + 531084) [0x7fff20441a8c]
                                              4  ??? (nwjs Framework + 66178159) [0x115436c6f]
                                                4  ??? (nwjs Framework + 66149266) [0x11542fb92]
                                                  4  ??? (nwjs Framework + 164913770) [0x11b26026a]
                                                    4  ??? (nwjs Framework + 65823354) [0x1153e027a]
                                                      3  ??? (nwjs Framework + 65824134) [0x1153e0586]
                                                        3  ??? (nwjs Framework + 65731430) [0x1153c9b66]
                                                          2  ??? (nwjs Framework + 149942692) [0x11a4191a4]
                                                            2  ??? (nwjs Framework + 149939874) [0x11a4186a2]
                                                              1  ??? (nwjs Framework + 150081539) [0x11a43b003]
                                                                1  ??? (nwjs Framework + 165500905) [0x11b2ef7e9]
                                                                  1  ??? (nwjs Framework + 165457972) [0x11b2e5034]
                                                                    1  ??? (nwjs Framework + 32986095) [0x11348f3ef]
                                                                      1  ??? (nwjs Framework + 66209039) [0x11543e50f]
                                                                        1  ??? (nwjs Framework + 66209665) [0x11543e781]
                                                                          1  mach_msg_trap + 10 (libsystem_kernel.dylib + 4906) [0x7fff2031332a]
                                                                            1  <Kernel mode>
                                                              1  ??? (nwjs Framework + 150079779) [0x11a43a923]
                                                                1  ??? (nwjs Framework + 111753905) [0x117fadab1]
                                                          1  ??? (nwjs Framework + 151341409) [0x11a56e961]
                                                            1  ??? (nwjs Framework + 145481526) [0x119fd7f36]
                                                              1  ??? (nwjs Framework + 145477677) [0x119fd702d]
                                                                1  ??? (nwjs Framework + 145477893) [0x119fd7105]
                                                                  1  ??? (nwjs Framework + 145541924) [0x119fe6b24]
                                                                    1  ??? (nwjs Framework + 145542425) [0x119fe6d19]
                                                                      1  ??? (nwjs Framework + 145465510) [0x119fd40a6]
                                                                        1  ??? (nwjs Framework + 147093891) [0x11a161983]
                                                                          1  ??? (nwjs Framework + 147090454) [0x11a160c16]
                                                                            1  ??? (nwjs Framework + 147297338) [0x11a19343a]
                                                                              1  ??? (nwjs Framework + 147296203) [0x11a192fcb]
                                                                                1  v8::Script::Run(v8::Local<v8::Context>) + 456 (nwjs Framework + 44412984) [0x113f75038]
                                                                                  1  v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 230 (nwjs Framework + 45699718) [0x1140af286]
                                                                                    1  ??? (nwjs Framework + 45702607) [0x1140afdcf]
                                                                                      1  ??? (nwjs Framework + 56202552) [0x114ab3538]
                                                                                        1  ??? (nwjs Framework + 56203099) [0x114ab375b]
                                                                                          1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                            1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                              1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                  1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                    1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                      1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                        1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                          1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                            1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                              1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                  1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                    1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                      1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                        1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                          1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                            1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                              1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                                1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                                  1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                                    1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                                      1  ??? (nwjs Framework + 56705184) [0x114b2e0a0]
                                                                                                                                        1  ??? (nwjs Framework + 56212207) [0x114ab5aef]
                                                                                                                                          1  ??? (nwjs Framework + 57157662) [0x114b9c81e]
                                                                                                                                            1  ??? (nwjs Framework + 56629848) [0x114b1ba58]
                                                                                                                                              1  ??? (nwjs Framework + 50026274) [0x1144cf722]
                                                                                                                                                1  v8::internal::BaseNameDictionary<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::Add(v8::internal::Isolate*, v8::internal::Handle<v8::internal::NameDictionary>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyDetails, v8::internal::InternalIndex*) + 239 (nwjs Framework + 48643999) [0x11437df9f]
                                                                                                                                                  1  v8::internal::Handle<v8::internal::NameDictionary> v8::internal::Dictionary<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::Add<v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::NameDictionary>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyDetails, v8::internal::InternalIndex*) + 97 (nwjs Framework + 48644193) [0x11437e061]
                                                                                                                                                    1  v8::internal::Handle<v8::internal::NameDictionary> v8::internal::HashTable<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::EnsureCapacity<v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::NameDictionary>, int, v8::internal::AllocationType) + 178 (nwjs Framework + 48641522) [0x11437d5f2]
                                                                                                                                                      1  v8::internal::Heap::MaxRegularHeapObjectSize(v8::internal::AllocationType) + 0 (nwjs Framework + 46286000) [0x11413e4b0]
                                                      1  ??? (nwjs Framework + 65824222) [0x1153e05de]
                                                        1  ??? (nwjs Framework + 65757980) [0x1153d031c]
                                                          1  ??? (nwjs Framework + 138050224) [0x1198c1ab0]
  1  start_wqthread + 0 (libsystem_pthread.dylib + 9348) [0x7fff20344484]
    1  <Kernel mode>

  Binary Images:
           0x10efb1000 -        0x10f064fff  io.nwjs.nwjs.helper.renderer 88.0.4324.150 (4324.150) <40B7C3AA-CEE9-39D3-8E4D-E5CFA6FA7A5F>  /Applications/TiddlyDesktop.app/Contents/Frameworks/nwjs Framework.framework/Versions/88.0.4324.150/Helpers/nwjs Helper (Renderer).app/Contents/MacOS/nwjs Helper (Renderer)
           0x11151a000 -        0x11cea1fff  io.nwjs.nwjs.framework 88.0.4324.150 (4324.150)       <D715A7FA-E00C-3D20-8E97-9E0530A262FA>  /Applications/TiddlyDesktop.app/Contents/Frameworks/nwjs Framework.framework/Versions/88.0.4324.150/nwjs Framework
           0x12286a000 -                ???  ???                                                   <429FFA2F-97F3-3189-8BE5-56BC3B973EB2>
        0x7fff20312000 -     0x7fff20341fff  libsystem_kernel.dylib (7195.101.2)                   <62A19DE4-50C5-3866-B5B2-43220E379C3B>  /usr/lib/system/libsystem_kernel.dylib
        0x7fff20342000 -     0x7fff2034dfff  libsystem_pthread.dylib (454.100.8)                   <52F807B1-41A0-3D1E-AE89-115CA570863F>  /usr/lib/system/libsystem_pthread.dylib
        0x7fff2034e000 -     0x7fff20389fff  libdyld.dylib (851.27)                                <9F95C644-D1BD-38D9-9612-6188FE9EA53C>  /usr/lib/system/libdyld.dylib
        0x7fff203c0000 -     0x7fff2085dfff  com.apple.CoreFoundation 6.9 (1775.118.101)           <895AFD1C-0307-32B3-81CB-BA33DA368DE1>  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
        0x7fff2116a000 -     0x7fff214c7fff  com.apple.Foundation 6.9 (1775.118.101)               <5B112EDB-35C1-31A7-BFDA-E185D1B49D93>  /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation

The result is I can no longer access that TiddlyWiki as it will just silently close out everything. That is, unless I workaround it by clearing the saved application window preferences.

workaround steps to restore a TiddlyWiki that will no longer open after fullscreen exit:

  1. completely close out TiddlyDestop
  2. CAUTION This will change the preferences of all Tiddly windows:
    move (or delete) the Application Support file Preferences from Finder, or from the terminal
    mv ~/Library/Application\ Support/TiddlyDesktop/Default/Preferences{,.bak}
  3. start TiddlyDesktop, which will generate a new Preferences file
  4. open TiddlyWiki again and note window caching has been reset

alternatives:

A less impactful (does not reset all Tiddly window preferences) but possibly risky fix (if you fat-finger something) would be to open the Preference JSON file, and look for "fullscreen":true and change it to false. There will be sections called wikifile:///... and you should see your wiki's location, and under the "html" are the saved window preferences. Use at your own risk, but I made a lazy fix-it script. It may blindly smash things but then I can just delete the entire preferences file and start fresh if it wrecks my preferences file:

#!/bin/bash
# USE AT YOUR OWN RISK
PREF_FILE=${HOME}/Library/Application\ Support/TiddlyDesktop/Default/Preferences
sed -i .bak -e 's/\"fullscreen\":true/\"fullscreen\":false/g' "$PREF_FILE" 

my specs:

  • macOS Big Sur 11.3.1 (20E241)
  • MBP 2019 i7
  • TW 5.1.23
  • TiddlyDesktop 0.0.14 (15) (a prerelease of v0.0.15)
  • backup location: local disk
  • TiddlyWiki file location: iCloud Drive folder

qabulin avatar Jun 02 '21 00:06 qabulin

Oh, I just discovered another issue: Each time I fullscreen crashed TiddlyDesktop, there was a left over "nwjs Helper (Renderer)" process consuming an appreciable amount of cpu. After testing the above, my CPU fan was running high (b/c temp at 88.05 C), and my system was running slower. I found this (after TiddlyDesktop was completely closed):

% pgrep nwjs
73020
73065
73087
73117
73140
73167
73219
73239
73261

Each of those was consuming about 30-50% CPU. I had no other nwjs apps running, so I just killed them after closing TiddlyDesktop:

% pgrep nwjs | xargs kill -9 && pgrep nwjs

%

Now everything is back to normal. (I may add this to my script.)

qabulin avatar Jun 02 '21 00:06 qabulin

I made no other changes at all, simply started running the 0.0.15 prerelease. I started using my computer and found TiddlyWiki slow to respond. Noticed my CPU fan running, popped open Activity Monitor and saw this at the top.

Screen Shot 2021-06-03 at 12 07 10

Interestingly, perhaps putting more detail into the idea of this being a "fullscreen" issue, my machine struggles to get connected to both of my 4K monitors, and today it shifted TiddlyWiki from one of the big screens to the main laptop screen. So there could be some buggy display-handling logic that isn't necessarily specific to fullscreen mode (which I have not been using at all lately, never with TiddlyDesktop).

When I hit the Sample button in the nwjs Helper (Renderer) process's window, all the parts of the sample seem to be completely blank. When I try to save the sample, it prompts me for a place to save it, but nothing gets saved.

So in lieu of that, here's the information in the window that pops up when I double-click on that process's line in the list.

Screen Shot 2021-06-03 at 12 24 11 Screen Shot 2021-06-03 at 12 24 43

Open Files and Ports:

cwd
cwd|rtd info error: No such file or directory
txt
/Library/Preferences/Logging/.plist-cache.C64Lj3Vs
txt
/System/Library/Fonts/SFNSItalic.ttf
txt
/usr/lib/dyld
txt
/private/var/db/timezone/tz/2021a.1.0/icutz/icutz44l.dat
txt
/usr/share/icu/icudt66l.dat
txt
/System/Library/Fonts/SFNS.ttf
txt
/System/Library/Fonts/Helvetica.ttc
txt
/System/Library/Fonts/Supplemental/Arial.ttf
txt
/System/Library/Fonts/Apple Color Emoji.ttc
txt
/System/Library/Fonts/Times.ttc
txt
/System/Library/Fonts/Menlo.ttc
0
/dev/null
1
/dev/null
2
/dev/null
3
(revoked)
4
(revoked)
5
(revoked)
6
(revoked)
7
(revoked)
8
(revoked)
9
->0x1a8a71a110891a16
10
->0x635d64362e931fd
11
count=0, state=0xb
12
->0xefea0d30f9cc1131
13
->0x4c98e2d18c34dbe
14
->0x483e207512bac5ce
15
->0x8482c5667df8a9fd
16
->0x8478500772d87fae
17
->0xd7ec441a7c3feae5
18
count=0, state=0x12
19
count=0, state=0x12
20
/dev/urandom
21
/private/var/folders/jr/7_yfzsds0k5fsxj3trm81mwh0000gp/T/.com.tiddlywiki.6pYE4P
22
count=0, state=0xa
23
->0xf823a7039295cb61
24
->0x4e9f9653e5db61ee
25
->0x9df3c9507ad08291
26
->0x81a1ec2f0d9de30
27
count=0, state=0xa
28
->0x9ee208d1a0389726
29
->0xe81f8a19b7930b0d
30
->0xd0f82cd62efb38f0
31
->0xbcdb775c3e49dd34
32
count=0, state=0xa
33
->0x2608543607dcad02
34
->0xf62cc98510110094
35
->0x16d3c77c66899d43
36
->0xed550b117170a5de
37
count=0, state=0xa
38
->0xb94af2f67def7a3f
39
->0xcdf9483a5f4aaba
40
->0xc95c474ca2e23e67
41
->0x7191d8fff6a71264
Interestingly, there's also a chrome_crashpad_handler process taking 80% of CPU. Also blank when I try to sample it.

Screen Shot 2021-06-03 at 12 34 52

Screen Shot 2021-06-03 at 12 35 29

Open Files and Ports:

cwd
/
txt
/Library/Preferences/Logging/.plist-cache.C64Lj3Vs
txt
/Users/john/Library/Application Support/TiddlyDesktop/CrashpadMetrics-active.pma
txt
/usr/lib/dyld
0
/dev/null
1
/dev/null
2
/dev/null
3
/Users/john/Library/Application Support/TiddlyDesktop/CrashpadMetrics-active.pma

/Library/Preferences/Logging/.plist-cache.C64Lj3Vs is an empty file.

Let me know if the contents of ~/Library/Application Support/TiddlyDesktop/Crashpad/completed/*.dmp would be helpful to have. (NW.js documentation on crash dumps.)

Seems like it's worth dropping a link to https://github.com/nwjs/nw.js/issues/7684 here.

replaid avatar Jun 03 '21 09:06 replaid

Since I stopped using TiddlyWiki in fullscreen mode in my MacBook Air, it didn't create any problems for me, but it's true that nw.js has some work to do to fix these problems.

Unfortunately it seems nw.js both very popular and somewhat understaffed and swamped with requests. I'm not sure that I can debug deeper and write fixes for it, but we may need to dig the problem deeper and help the developers somewhat.

Any ideas?

hbayindir avatar Jun 07 '21 14:06 hbayindir