Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 568045

Summary: [Chromium] on macosx it hangs when exit, the process doesn't die
Product: [Eclipse Project] Platform Reporter: Johan Compagner <jcompagner>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, ivanooi, niraj.modi, yasunaka
Version: 4.17   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Bug Depends on:    
Bug Blocks: 566608, 569095    
Attachments:
Description Flags
a java stackdump and a native stackdump when process is hanging none

Description Johan Compagner CLA 2020-10-20 10:56:53 EDT
In our product if we enable chromiumn through new Browser(SWT.CHROMIUM)
then everything seems to work fine, but on OSX when we then close our product
the ui is gone but the process hangs around eating 100% CPU (i think this is one core under OSX)\

I will attach java stack dump and a native stackdump of that process when it is in this state.
Comment 1 Johan Compagner CLA 2020-10-20 10:59:02 EDT
Created attachment 284524 [details]
a java stackdump and a native stackdump when process is hanging
Comment 2 Ivan O CLA 2020-10-21 10:20:24 EDT
(In reply to Johan Compagner from comment #0)
> In our product if we enable chromiumn through new Browser(SWT.CHROMIUM)
> then everything seems to work fine, but on OSX when we then close our product
> the ui is gone but the process hangs around eating 100% CPU (i think this is
> one core under OSX)\
> 
> I will attach java stack dump and a native stackdump of that process when it
> is in this state.

mine show nothing. blank. I'm using 10.14
Comment 3 Nobuhiko Yasunaka CLA 2021-02-02 09:35:06 EST
On macosx(cocoa), the on_before_close() method of the Chromium does not be called on the last browser instance. And waitForClose() method called from dispose() of the last browser waits the default display to be disposed. (Perhaps this is the 'Hook' mechanism to avoid crash the application at the end of life)
But if the dispose() method of the default display is called, it stops in the readAndDispath() of release() in dispose() method, because the waitForClose() method creates async display events continuously.
That's the reason why the application does not exit and the Java process hangs eating 100% CPU.

To fix this, we need another hook way to exit the application correctly.
Comment 4 Alexander Kurtakov CLA 2021-10-04 04:53:50 EDT
Chromium has been removed via bug 572010 .