Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS / nw.js 0.42.5] "The display compositor is frequently crashing" #7253

Open
undavide opened this issue Nov 29, 2019 · 13 comments
Open
Labels

Comments

@undavide
Copy link

NWJS Version : 0.42.5 SDK
Operating System : macOS 10.14.6 (18G1012)

I can't run any project, even the simpler Hello World code from the doc.

.
├── index.html
└── package.json
<!-- index.html -->
<!DOCTYPE html>
<html>
  <head>
    <title>Hello World!</title>
  </head>
  <body>
    <h1>Hello World!</h1>
  </body>
</html>
// package.json
{
  "name": "helloworld",
  "main": "index.html",
}

In the Terminal, I first cd in the app folder, and then call path/to/nwjs-sdk-v0.42.5-osx-x64/nwjs.app/Contents/MacOS/nwjs .

Actual behavior

Crash log:

[21848:35587:1129/224308.505703:FATAL:gpu_data_manager_impl_private.cc(986)] The display compositor is frequently crashing. Goodbye.
0   nwjs Framework                      0x000000011ac703f9 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15724985
1   nwjs Framework                      0x000000011ab92553 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 14816019
2   nwjs Framework                      0x000000011aba6649 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 14898185
3   nwjs Framework                      0x0000000118628a32 ChromeMain + 19862098
4   nwjs Framework                      0x0000000118625f9f ChromeMain + 19851199
5   nwjs Framework                      0x000000011862f454 ChromeMain + 19889268
6   nwjs Framework                      0x000000011842f0b3 ChromeMain + 17791187
7   nwjs Framework                      0x000000011848f003 ChromeMain + 18184227
8   nwjs Framework                      0x000000011848f2ac ChromeMain + 18184908
9   nwjs Framework                      0x000000011ac08baf v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15300975
10  nwjs Framework                      0x000000011ac1e551 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15389457
11  nwjs Framework                      0x000000011ac1e268 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15388712
12  nwjs Framework                      0x000000011ac85917 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15812311
13  nwjs Framework                      0x000000011ac1ee68 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15391784
14  nwjs Framework                      0x000000011abe6527 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15160039
15  nwjs Framework                      0x0000000118441a84 ChromeMain + 17867428
16  nwjs Framework                      0x000000011ac3b6fd v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15508669
17  nwjs Framework                      0x000000011ac7a957 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 15767319
18  libsystem_pthread.dylib             0x00007fff65af92eb _pthread_body + 126
19  libsystem_pthread.dylib             0x00007fff65afc249 _pthread_start + 66
20  libsystem_pthread.dylib             0x00007fff65af840d thread_start + 13
Task trace:
0   nwjs Framework                      0x000000011848eedb ChromeMain + 18183931
1   nwjs Framework                      0x000000011848ea80 ChromeMain + 18182816
2   nwjs Framework                      0x0000000118a35021 ChromeMain + 24107073
3   nwjs Framework                      0x000000011adec1d6 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17280918
4   nwjs Framework                      0x000000011adcff9a v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17165658
Task trace buffer limit hit, update PendingTask::kTaskBacktraceLength to increase.
IPC message handler context: 0xCC7D5A74

[1129/224308.511784:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffedfe37000, 0x2000): (os/kern) invalid address (1)
[1129/224308.595565:WARNING:system_snapshot_mac.cc(42)] sysctlbyname kern.nx: No such file or directory (2)
Trace/BPT trap: 5

Besides, the error message "The display compositor is frequently crashing. Goodbye." feels a bit mocking 😄
Any suggestion? I'd really like to implement nwjs but I'm stuck in an embarrassing dead end. Thank you!

Davide

@undavide undavide changed the title [macOS / nw.js 0.42.5] Hello World crash [macOS / nw.js 0.42.5] "The display compositor is frequently crashing" Nov 29, 2019
@rogerwang
Copy link
Member

Does --disable-gpu make any difference?

@rogerwang
Copy link
Member

btw, does Chrome browser run well in your system?

@undavide
Copy link
Author

undavide commented Nov 30, 2019

Hi, "chromium-args": "--disable-gpu" seems to have no effect. Besides, both Chrome and Chromium work fine on my system (MacBookPro with an AMD Radeon R9 M370X), I've even enabled GPU on Chrome and it has no problems...

I've also tried with "--enable-gpu-rasterization --enable-native-gpu-memory-buffers --gpu-sandbox-start-early" and the opposite "disable-gpu-compositing --disable-gpu --force-cpu-draw --enable-logging --no-sandbox", no luck.

@undavide
Copy link
Author

Update: I've downloaded the 0.43.0-beta1 and it works!
For some reason Chromium 78 gave problems... which 79 solves. Now I just have to understand how to let nwjs-builder-phoenixuse it... 🤔

@bastimeyer
Copy link

The latest NW.js release (0.45.5) still has this problem. If a product_string value other than nwjs is set in the package.json, then the app will crash with "The display compositor is frequently crashing. Goodbye.".

At first I thought this was because of some upstream Chromium changes caused by the lack of GPU acceleration in my macOS VMs, since code related to this error message has been changed recently in Chromium, but after checking everything Chromium related and almost giving up, I decided to look for issues here and found this thread. Should have done this sooner.

This issue is very unfortunate considering the product_string value needed for #7437, if your app building process doesn't differ between macOS and Linux. Not that it's impossible to work around this in the build process and fixing the macOS package.json, I'm just saying that it's very unexpected that it only crashes on macOS.

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
@sunilrebel
Copy link

sunilrebel commented Feb 10, 2022

Were you able to find the solution for it?
For my the app is crashing with latest version 0.61 and it's crashing for a particular webpage only. I have asked question here - https://stackoverflow.com/questions/71068846/nwjs-app-crashing-because-of-website-console-errors

If possible please let me know what can be done in this situation

@stale stale bot removed the stale label Feb 10, 2022
@semmel
Copy link

semmel commented Feb 23, 2022

It took me 3 hours to find product_string to be the reason for my crashes.

@rogerwang Please update Package and Distribution docs with a warning not to use it

@sysrage
Copy link

sysrage commented Mar 25, 2023

@rogerwang this is still causing a crash, many years later. It’s also still the only documented way to rename the helper apps. Please let us know the status. Thanks!

@benjismith
Copy link

benjismith commented Aug 23, 2023

Yikes, I just spent a day and a half debugging this. I recently started using the product_name string in my package.json file, and didn't realize it was causing my app to crash. Please fix this... Or at least update the docs!

@ayushmanchhabra
Copy link
Contributor

https://github.com/nwjs/chromium.src/blob/773647cae90a74f3c085b387912216fa6283847d/chrome/app/chrome_main_delegate.cc#L1412
Here is the code which (tries to) update the Helper apps. I suggest removing this and letting nw-builder handle renaming the Helper apps.

@rogerwang
Copy link
Member

Renaming macos app works for me with product_string. Note that you should rename all the helper applications (including their Info.plist and executables), which is in the documentation.

@ayushmanchhabra
Copy link
Contributor

ayushmanchhabra commented Aug 23, 2023

Okay, thanks for the quick response. Afk right now, but will give this a shot soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants