Giter Club home page Giter Club logo

Comments (35)

fkolar avatar fkolar commented on June 19, 2024 1

Never mind. I just test latest and it works like charm on the MacOSX.

from journey.

fkolar avatar fkolar commented on June 19, 2024

I really need mac support. IF there is anything I can do... ?
I can build jcef, I can run their sample app, that has required structure, but not sure how to package all this..

I Also find these steps: https://bitbucket.org/chromiumembedded/java-cef/issues/109/linux-mac-fix-discovery-of-icudtldat#comment-35461901
If you are able to give some hints I can definitelly do this.

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, I'd appreciate any help you can give, thanks.

I thought I was running into https://bitbucket.org/chromiumembedded/java-cef/issues/270/mac-os-10124-build-fails-with-java-version but the error is actually slightly different (build log):

compile:
    [javac] Compiling 148 source files to /Users/travis/build/CodeBrig/Journey/jcef/jcef_build/native/Release
    [javac] /Users/travis/build/CodeBrig/Journey/jcef/java/org/cef/browser/mac/CefBrowserWindowMac.java:31: error: cannot find symbol
    [javac]                     ((CPlatformWindow) pWindow).execute(new CFRetainedResource.CFNativeAction() {
    [javac]                                                                               ^
    [javac]   symbol:   class CFNativeAction
    [javac]   location: class CFRetainedResource
    [javac] 1 error

Do you not run into this issue? What Java version are you using?

I can make a patch for this issue (patched another one here), if necessary.

from journey.

fkolar avatar fkolar commented on June 19, 2024

I dont have issue with the compile but with actual run. this what I use to build it. following some of the threads from forum I sent.

#!/usr/bin/env bash

git clone https://bitbucket.org/chromiumembedded/java-cef.git jcef
cd jcef

mkdir jcef_build && cd jcef_build
cmake -G "Xcode" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=Release ..

xcodebuild -project jcef.xcodeproj -configuration Release -target ALL_BUILD
cd ../tools && ./make_distrib.sh macosx64
cd ../binary_distrib/macosx64/bin

echo "Patching native libs"
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ./jcef_app.app/Contents/Java/libjcef.dylib
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@executable_path/../../../Chromium Embedded Framework.framework/Chromium Embedded Framework" "./jcef_app.app/Contents/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper"


echo "Done..."

from journey.

fkolar avatar fkolar commented on June 19, 2024

Right now I am using java version "1.8.0_181"

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

I used your configuration and still got the same issue: https://travis-ci.com/CodeBrig/Journey/jobs/203315993

I'm using the osx_image: xcode9.3 configuration from https://docs.travis-ci.com/user/reference/osx/#jdk-and-macos. Is that the closest to your setup? If it is then it looks like that file will need to get manually patched because I'm not sure how to install a specific version of the JDK on a mac.

from journey.

fkolar avatar fkolar commented on June 19, 2024

I have xcode 10.2.1 (10E1001). Also used to brew (which is something like package manager to install gnu packages) cmake, the rest comes with xcode, and xcode command line tools.

from journey.

fkolar avatar fkolar commented on June 19, 2024

I see they say for travis:

Xcode 10.2 #

Xcode 10.2.1 is available by adding osx_image: xcode10.2 to your .travis.yml.

THIS IS WHAT I FOUND:
https://github.com/SCENEE/FloatingPanel/blob/master/.travis.yml

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, upgrading the Xcode version on Travis-CI comes with a JDK upgrade. It looks like Xcode 9.3 is the most suitable version to use.

I think for a temporary hack I'll need your CefBrowserWindowMac.class file. You can provide just that file or the entire mac distribution. During the build process, I will skip compiling CefBrowserWindowMac and use your version. This isn't elegant in any way but should at least allow you to use Journey on macs.

If I was able to install your exact JDK version on Travis-CI I think I could compile successfully too but I couldn't seem to get that working.

from journey.

fkolar avatar fkolar commented on June 19, 2024

I will zip whole macosx64 distribution. ..
Do you want this with or without the

install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ./jcef_app.app/Contents/Java/libjcef.dylib
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@executable_path/../../../Chromium Embedded Framework.framework/Chromium Embedded Framework" "./jcef_app.app/Contents/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper"

commands ?

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

I'm not sure what those commands do. That's something I was going to work with you next.

Is that something that will need to be executed every time the CEF native files are downloaded? Or can you apply them now and just distribute them with those commands already executed?

If you can execute on them now and then they are set for life then I would prefer that way.

from journey.

fkolar avatar fkolar commented on June 19, 2024

I will give you both. In my case I can build it all goes with single error, but I cant really run it. Not sure how to include them into the app, all those notes I saw on the web did not relly help as I was getting errors.

from journey.

fkolar avatar fkolar commented on June 19, 2024

Also what I see people discuss in the forum while running app on the mac they use these command switches:


#!/bin/bash

JCE=./libs/macosx64/bin/jcef_app.app
JAVA_PATH="./libs/macosx64/bin/jcef_app.app/Contents/Java"
FRAMEWORKS_PATH="./libs/macosx64/bin/jcef_app.app/Contents/Frameworks"
RESOURCES_DIR_PATH="./libs/macosx64/bin/jcef_app.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources"
java -cp "./dist:$JAVA_PATH:$JAVA_PATH/*"
 -Djava.library.path=./libs/macosx64/bin/jcef_app.app/Contents/Java

 com.company.Main
 --framework-dir-path="./libs/macosx64/bin/jcef_app.app/Contents/Frameworks/Chromium Embedded Framework.framework"
 --browser-subprocess-path="./libs/macosx64/bin/jcef_app.app/Contents/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper"
 --resources-dir-path="./libs/macosx64/bin/jcef_app.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources"
 --disable-gpu

https://bitbucket.org/chromiumembedded/java-cef/issues/109/linux-mac-fix-discovery-of-icudtldat#comment-35461901

from journey.

fkolar avatar fkolar commented on June 19, 2024

here are the distributions:

https://drive.google.com/drive/folders/1gC3tPtq4eZHEicqCSI6GU8TgTChLA9Ag?usp=sharing

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, this is where I'm going to need to lean on you to finish Mac support.

I've created a pre-release for 0.2.0 here.

I was able to use that pre-release to create this project: https://github.com/BFergerson/linux-journey
This is the smallest self-contained example I can make of how to boot a CefBrowser using Journey (in Linux). With this project I can run the following:

git clone https://github.com/BFergerson/linux-journey .
./gradlew build run

Which results in:
Screenshot from 2019-05-27 14-24-00

What I would need you to do is create the equivalent for Mac. You should probably start with setting the environment variables manually but then use a hack to achieve it programmatically. Once you've achieved it programmatically I can merge that in and close this issue :).

I understand it might be a bit much to ask so please let me know if you run into any issues. I'll try to help as best as I can.


This is how it's done programmatically in Linux: https://github.com/CodeBrig/Journey/blob/237522b516735409377aeea2ac7ccaf80392c0a4/src/main/java/com/codebrig/journey/JourneyLoader.java#L214

This is how it's done programmatically in Windows: https://github.com/CodeBrig/Journey/blob/237522b516735409377aeea2ac7ccaf80392c0a4/src/main/java/com/codebrig/journey/JourneyLoader.java#L240

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, another way which might be easier to get running is something like this:

wget https://github.com/CodeBrig/Journey/releases/download/0.2.0-online/journey-browser-0.2.0.jar
wget https://github.com/CodeBrig/Journey/releases/download/0.2.0-online/jcef-distrib-linux64.zip
unzip jcef-distrib-linux64.zip

export LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$(pwd)/linux64/bin/lib/linux64
java -cp "journey-browser-0.2.0.jar:linux64/bin/*" tests.detailed.MainFrame

Running that on my Ubuntu 18.04 OS results in:
Screenshot from 2019-05-27 18-38-00

Journey packages JCEF tests inside it so the tests.detailed.MainFrame is the one from JCEF and will accept your --disable-gpu (etc) flags.

from journey.

fkolar avatar fkolar commented on June 19, 2024

let me first try simply running this on command line to see if all works as expected and we can move on to implementing extra load method, plus

from journey.

fkolar avatar fkolar commented on June 19, 2024

There must be something about that library loading when simply trying this on command line:
you suggested way

Cobra427:journeydist fkolar$ java -Djava.library.path=/Users/fkolar/Documents/projects/chromium/journeydist/macosx64/bin/jcef_app.app/Contents/Java -cp "journey-browser-0.2.0.jar:/Users/fkolar/Documents/projects/chromium/journeydist/macosx64/bin/jcef_app.app/Contents/Java/*" tests.detailed.MainFrame
dlopen /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework: dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework, 261): image not found
Failed to load the CEF framework.
Startup initialization failed!

plus the forum suggested way, then the result is the same:

Cobra427:journeydist fkolar$ export JAVA_PATH=./macosx64/bin/jcef_app.app/Contents/Java/
Cobra427:journeydist fkolar$ export LD_LIBRARY_PATH=/Users/fkolar/Documents/projects/chromium/journeydist/macosx64/bin/jcef_app.app/Contents/Java
Cobra427:journeydist fkolar$ export FRAMEWORKS_PATH=./macosx64/bin/jcef_app.app/Contents/Frameworks/
Cobra427:journeydist fkolar$ export RESOURCES_DIR_PATH=./macosx64/bin/jcef_app.app/Contents/Frameworks/Chromium\ Embedded\ Framework.framework/Resources/


Cobra427:journeydist fkolar$ java -cp "journey-browser-0.2.0.jar:$JAVA_PATH:$JAVA_PATH/*" -Djava.library.path=$JAVA_PATH tests.detailed.MainFrame --framework-dir-path=$FRAMEWORKS_PATH/Chromium\ Embedded\ Framework.framework  --browser-subprocess-path=$FRAMEWORKS_PATH/jcef\ Helper.app/Contents/MacOS/jcef\ Helper --resources-dir-path="$RESOURCES_DIR_PATH" --disable-gpu
dlopen /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework: dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework, 261): image not found
Failed to load the CEF framework.
Startup initialization failed!

I have posted question to forum to jcef as well. When I look at th e

CefApp.initialize

  1. It reads lib.path to get the folder with jni lib
  2. it sets jcef_helber ''
    and there is this ../Frameworkthing

from journey.

fkolar avatar fkolar commented on June 19, 2024

There is something here: https://bitbucket.org/chromiumembedded/cef/issues/1552/the-mac-os-x-framework-has-a-wrong-rpath

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, based on searching for that error you encountered I would say you're correct. I should note that I didn't use your install_name_tool patched files. I just took the CefBrowserWindowMac.class file alone.

One thing I'm seeing different (besides the fact you probably need to run install_name_tool) is that here the recommended way is different than how you're doing it.

I would expect something like this:

wget https://github.com/CodeBrig/Journey/releases/download/0.2.0-online/journey-browser-0.2.0.jar
wget https://github.com/CodeBrig/Journey/releases/download/0.2.0-online/jcef-distrib-macintosh64.zip
unzip jcef-distrib-macintosh64.zip
mv ./macosx64/bin/jcef_app.app .

install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ./jcef_app.app/Contents/Java/libjcef.dylib
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@executable_path/../../../Chromium Embedded Framework.framework/Chromium Embedded Framework" "./jcef_app.app/Contents/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper"

JAVA_PATH="./jcef_app.app/Contents/Java"
FRAMEWORKS_PATH="./jcef_app.app/Contents/Frameworks"
RESOURCES_DIR_PATH="$(pwd)/jcef_app.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources"

java -cp "$JAVA_PATH:$JAVA_PATH/*" -Djava.library.path=$JAVA_PATH tests.detailed.MainFrame --framework-dir-path=$FRAMEWORKS_PATH/Chromium\ Embedded\ Framework.framework --browser-subprocess-path=$FRAMEWORKS_PATH/jcef\ Helper.app/Contents/MacOS/jcef\ Helper --resources-dir-path="$RESOURCES_DIR_PATH" --disable-gpu

How does that work for you?


I updated my comment from the way that Marshall recommends to the way that Mark does. Looks like you're actually using the latter so my version probably won't have a different outcome. I'm just moving the ./macosx64/bin directory. Maybe the install_name_tool will make a difference though?

from journey.

fkolar avatar fkolar commented on June 19, 2024

Yes, I followed comment from Mark that says here is the solution where you dont need to modify structure. But definitelly it will have something todo with the apple shared libs are setup.
I think we need to keep pushing and maybe keep contacting folks from that discussion. Cuz I have tried both options, actually tree:

  • without install_name_tool
  • with install_name_tool from mark and the other guy from above.

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, are you able to get JCEF working outside of Journey? If you're able to get the mac version of JCEF working outside of Journey then I can help you transition that setup into Journey. If you aren't able to get it working outside of Journey then that would be the issue to solve first. I don't own a mac so I won't be able to help in the discussion there.

from journey.

fkolar avatar fkolar commented on June 19, 2024

This is the thing I tried the out of box test sample MainFrame without journey as well. so on one side its consistent as it does not work in both cases.

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, I was able to get my hands on a mac computer. It looks like a specific version of Chromium ( 69.0.3497.100) will be needed to support macOS. JxBrowser also uses version 69 so maybe there are some bigger issues with getting the newer versions to work.

Does this work for you?

git clone https://bitbucket.org/chromiumembedded/java-cef.git jcef && cd jcef

git checkout 045302f591e53057a011b4b1df1d26fbee15e35d

mkdir jcef_build && cd jcef_build

cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=Release ..

ninja

cd native/Release

install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ./jcef_app.app/Contents/Java/libjcef.dylib
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@executable_path/../../../Chromium Embedded Framework.framework/Chromium Embedded Framework" "./jcef_app.app/Contents/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper"

JAVA_PATH="./jcef_app.app/Contents/Java"
FRAMEWORKS_PATH="./jcef_app.app/Contents/Frameworks"
RESOURCES_DIR_PATH="$(pwd)/jcef_app.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources"

java -cp "$JAVA_PATH:$JAVA_PATH/*" -Djava.library.path=$JAVA_PATH tests.detailed.MainFrame --framework-dir-path=$FRAMEWORKS_PATH/Chromium\ Embedded\ Framework.framework --browser-subprocess-path=$FRAMEWORKS_PATH/jcef\ Helper.app/Contents/MacOS/jcef\ Helper --resources-dir-path="$RESOURCES_DIR_PATH" --disable-gpu

from journey.

fkolar avatar fkolar commented on June 19, 2024

Let me test it. I was thinking about it as everybody was saying it worked for them but when we tried it did not.

from journey.

fkolar avatar fkolar commented on June 19, 2024

I had to follow a big mac compilation so I did:

git clone https://bitbucket.org/chromiumembedded/java-cef.git jcef && cd jcef
git checkout 045302f591e53057a011b4b1df1d26fbee15e35d

mkdir jcef_build && cd jcef_build
cmake -G "Xcode" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=Release ..

xcodebuild -project jcef.xcodeproj -configuration Release -target ALL_BUILD
cd ../tools && ./make_distrib.sh macosx64
cd ../binary_distrib/macosx64/bin

#echo "Patching native libs"
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ./jcef_app.app/Contents/Java/libjcef.dylib
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@executable_path/../../../Chromium Embedded Framework.framework/Chromium Embedded Framework" "./jcef_app.app/Contents/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper"


JAVA_PATH="./jcef_app.app/Contents/Java"
FRAMEWORKS_PATH="./jcef_app.app/Contents/Frameworks"
RESOURCES_DIR_PATH="$(pwd)/jcef_app.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources"

java -cp "$JAVA_PATH:$JAVA_PATH/*" -Djava.library.path=$JAVA_PATH tests.detailed.MainFrame --framework-dir-path=$FRAMEWORKS_PATH/Chromium\ Embedded\ Framework.framework --browser-subprocess-path=$FRAMEWORKS_PATH/jcef\ Helper.app/Contents/MacOS/jcef\ Helper --resources-dir-path="$RESOURCES_DIR_PATH" --disable-gpu

And the output was:

bash-3.2$ java -cp "$JAVA_PATH:$JAVA_PATH/*" -Djava.library.path=$JAVA_PATH tests.detailed.MainFrame --framework-dir-path=$FRAMEWORKS_PATH/Chromium\ Embedded\ Framework.framework --browser-subprocess-path=$FRAMEWORKS_PATH/jcef\ Helper.app/Contents/MacOS/jcef\ Helper --resources-dir-path="$RESOURCES_DIR_PATH" --disable-gpu
Offscreen rendering disabled
2019-06-03 15:16:53.698 java[25315:2285599] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
        0   AppKit                              0x00007fff3b9a0ccc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
        1   AppKit                              0x00007fff3b99e07c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
        2   AppKit                              0x00007fff3b99daa6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
        3   libjcef.dylib                       0x0000000129f5f6d3 _ZN13TempWindowMacC2Ev + 131
        4   libjcef.dylib                       0x0000000129f4f57f _ZN7Context6CreateEv + 31
        5   libjcef.dylib                       0x0000000129f26b82 Java_org_cef_CefApp_N_1PreInitialize + 18
        6   ???                                 0x0000000109c18667 0x0 + 4458645095
        7   ???                                 0x0000000109c07a90 0x0 + 4458576528
)
Using:
JCEF Version = 3.3497.187
CEF Version = 3.3497.1831
Chromium Version = 69.0.3497.100
AppHandler.stateHasChanged: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path ./jcef_app.app/Contents/Java
Added scheme search://
Added scheme client://
[0603/151653.822257:WARNING:dns_config_service_posix.cc(333)] Failed to read DnsConfig.
[0603/151653.845698:ERROR:gpu_process_transport_factory.cc(1017)] Lost UI shared context.
AppHandler.stateHasChanged: INITIALIZED
BrowserFrame.onAfterCreated id=1


from journey.

fkolar avatar fkolar commented on June 19, 2024

Screen Shot 2019-06-03 at 3 18 18 PM

from journey.

fkolar avatar fkolar commented on June 19, 2024

worked. .

from journey.

fkolar avatar fkolar commented on June 19, 2024

I did not worked without --disable-gpu now we need to be able to pass these arguments when instantiating client. Are these read in JNI layer?

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, I'm glad to see you were able to get something working.

This probably won't work but can you try:

mkdir journey && cd journey

git clone https://github.com/BFergerson/linux-journey . --branch=mac-test

./gradlew build

install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ./jcef_app.app/Contents/Java/libjcef.dylib
install_name_tool -change "@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "@executable_path/../../../Chromium Embedded Framework.framework/Chromium Embedded Framework" "./jcef_app.app/Contents/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper"

JAVA_PATH="./jcef_app.app/Contents/Java"

java -cp "./build/libs/*:$JAVA_PATH:$JAVA_PATH/*" -Djava.library.path=$JAVA_PATH JourneyFrame

I could have sworn that worked at one point but I can't get it working again.

This should work now.

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, please let me know how this works:

mkdir journey && cd journey
git clone https://github.com/BFergerson/macintosh-journey .
./gradlew build run

If that works for you then I can move forward with merging in macOS support.

There seems to be a slight problem with closing the browser. I have to command+c on the terminal. Does that happen for you too?

from journey.

fkolar avatar fkolar commented on June 19, 2024

I am able to run wihout problem and, browser app works, but closing issue is there like you described. it freezes or something and ctrl+c is the rescue

I took a thread dump:

current dir: /Users/fkolar/Documents/projects/chromium/journey-mac
2019-06-05 11:50:41.425 java[36310:3610615] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
        0   AppKit                              0x00007fff3b9a0ccc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
        1   AppKit                              0x00007fff3b99e07c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
        2   AppKit                              0x00007fff3b99daa6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
        3   libjcef.dylib                       0x0000000124c8e433 _ZN13TempWindowMacC2Ev + 131
        4   libjcef.dylib                       0x0000000124c7e88f _ZN7Context6CreateEv + 31
        5   libjcef.dylib                       0x0000000124c57f72 Java_org_cef_CefApp_N_1PreInitialize + 18
        6   ???                                 0x000000010d16c667 0x0 + 4514563687
        7   ???                                 0x000000010d15ba90 0x0 + 4514495120
)
initialize on Thread[AWT-EventQueue-0,6,main] with library path /Users/fkolar/Documents/projects/chromium/journey-mac/jcef_app.app/Contents/Java
[0605/115041.444915:ERROR:gpu_process_transport_factory.cc(1017)] Lost UI shared context.
got to getWindowHandle: org.cef.browser.CefBrowserWr$3[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=java.awt.Dimension[width=0,height=0],preferredSize=]
Ran run: 140406931864192
did result: 140406931864192
got to getWindowHandle: org.cef.browser.CefBrowserWr$3[,0,0,1000x578,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=java.awt.Dimension[width=0,height=0],preferredSize=]
Ran run: 140406931864192
did result: 140406931864192
2019-06-05 11:51:13
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode):

"Thread-1" #18 daemon prio=5 os_prio=31 tid=0x00007fb310000000 nid=0xe203 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"DestroyJavaVM" #16 prio=5 os_prio=31 tid=0x00007fb30c493000 nid=0x2603 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Java2D Disposer" #15 daemon prio=10 os_prio=31 tid=0x00007fb30c1d1000 nid=0x1f407 in Object.wait() [0x000070001431e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x000000076b212900> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
        - locked <0x000000076b212900> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
        at sun.java2d.Disposer.run(Disposer.java:148)
        at java.lang.Thread.run(Thread.java:748)

"Java2D Queue Flusher" #14 daemon prio=10 os_prio=31 tid=0x00007fb30991f800 nid=0x16107 in Object.wait() [0x000070001421b000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:203)
        - locked <0x000000076b20f518> (a sun.java2d.opengl.OGLRenderQueue$QueueFlusher)

"TimerQueue" #13 daemon prio=5 os_prio=31 tid=0x00007fb30a034000 nid=0x15607 waiting on condition [0x0000700014118000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x000000076b02e5d0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
        at java.util.concurrent.DelayQueue.take(DelayQueue.java:223)
        at javax.swing.TimerQueue.run(TimerQueue.java:174)
        at java.lang.Thread.run(Thread.java:748)

"AWT-EventQueue-0" #12 prio=6 os_prio=31 tid=0x00007fb30a021800 nid=0x1230b waiting on condition [0x000070000b7e2000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x000000076ae8de68> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
        at java.awt.EventQueue.getNextEvent(EventQueue.java:554)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:187)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

"AWT-Shutdown" #11 prio=5 os_prio=31 tid=0x00007fb30a00e800 nid=0x6717 in Object.wait() [0x000070000b0bb000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x000000076aed7ac8> (a java.lang.Object)
        at java.lang.Object.wait(Object.java:502)
        at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
        - locked <0x000000076aed7ac8> (a java.lang.Object)
        at java.lang.Thread.run(Thread.java:748)

"AppKit Thread" #10 daemon prio=5 os_prio=31 tid=0x00007fb30c118800 nid=0x307 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #9 daemon prio=9 os_prio=31 tid=0x00007fb30988f000 nid=0x5503 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #8 daemon prio=9 os_prio=31 tid=0x00007fb30a855000 nid=0x3d03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x00007fb30a854000 nid=0x3f03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #6 daemon prio=9 os_prio=31 tid=0x00007fb309874800 nid=0x4103 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=31 tid=0x00007fb30c002000 nid=0x4303 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=31 tid=0x00007fb30c000000 nid=0x3b03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007fb30a80e000 nid=0x4903 in Object.wait() [0x000070000a8a3000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x000000076ab08ed0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
        - locked <0x000000076ab08ed0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)

"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007fb30a80d000 nid=0x3403 in Object.wait() [0x000070000a7a0000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x000000076ab06bf8> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:502)
        at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
        - locked <0x000000076ab06bf8> (a java.lang.ref.Reference$Lock)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

"VM Thread" os_prio=31 tid=0x00007fb30986d000 nid=0x3303 runnable 

"GC task thread#0 (ParallelGC)" os_prio=31 tid=0x00007fb30a803800 nid=0x1e07 runnable 

"GC task thread#1 (ParallelGC)" os_prio=31 tid=0x00007fb30a001800 nid=0x2a03 runnable 

"GC task thread#2 (ParallelGC)" os_prio=31 tid=0x00007fb30981b800 nid=0x5403 runnable 

"GC task thread#3 (ParallelGC)" os_prio=31 tid=0x00007fb30981c000 nid=0x5303 runnable 

"GC task thread#4 (ParallelGC)" os_prio=31 tid=0x00007fb30981d000 nid=0x5203 runnable 

"GC task thread#5 (ParallelGC)" os_prio=31 tid=0x00007fb30a804000 nid=0x5103 runnable 

"GC task thread#6 (ParallelGC)" os_prio=31 tid=0x00007fb30a804800 nid=0x5003 runnable 

"GC task thread#7 (ParallelGC)" os_prio=31 tid=0x00007fb30a805000 nid=0x4e03 runnable 

"GC task thread#8 (ParallelGC)" os_prio=31 tid=0x00007fb30a806000 nid=0x3003 runnable 

"GC task thread#9 (ParallelGC)" os_prio=31 tid=0x00007fb30a806800 nid=0x3103 runnable 

"VM Periodic Task Thread" os_prio=31 tid=0x00007fb3098a2000 nid=0xa803 waiting on condition 

JNI global references: 521

Heap
 PSYoungGen      total 76288K, used 40700K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000)
  eden space 65536K, 62% used [0x000000076ab00000,0x000000076d2bf3e8,0x000000076eb00000)
  from space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000)
  to   space 10752K, 0% used [0x000000076eb00000,0x000000076eb00000,0x000000076f580000)
 ParOldGen       total 175104K, used 0K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000)
  object space 175104K, 0% used [0x00000006c0000000,0x00000006c0000000,0x00000006cab00000)
 Metaspace       used 12680K, capacity 12996K, committed 13184K, reserved 1060864K
  class space

from journey.

fkolar avatar fkolar commented on June 19, 2024

Also, I see the mainFrame.addWindowListener when I click on the close button it does not even reach the event listener.

e.g. When I replace line that adds the browser to the mainFrame with this:
mainFrame.getContentPane().add(new Label("aaaaaa"), BorderLayout.CENTER);

The problem is the same if I only comment out the JCEF code.

For example, even this hangs:

     CefSettings settings = new CefSettings();
        settings.windowless_rendering_enabled = false;
        CefApp cefApp = CefApp.getInstance(var0, settings);
//        CefClient client = cefApp.createClient();
//        CefBrowser browser = client.createBrowser("https://google.com", false, false);
//        Component browserUI = browser.getUIComponent();
        JFrame mainFrame = new JFrame();
        mainFrame.getContentPane().add(new Label("aaaaaa"), BorderLayout.CENTER);
        mainFrame.setSize(1000, 600);
        mainFrame.setVisible(true);
//        browser.setFocus(true);

It must have something to do with this?

019-06-05 12:35:45.580 java[37283:3754854] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
	0   AppKit                              0x00007fff3b9a0ccc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
	1   AppKit                              0x00007fff3b99e07c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
	2   AppKit                              0x00007fff3b99daa6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
	3   libjcef.dylib                       0x00000001264f1433 _ZN13TempWindowMacC2Ev + 131
	4   libjcef.dylib                       0x00000001264e188f _ZN7Context6CreateEv + 31
	5   libjcef.dylib                       0x00000001264baf72 Java_org_cef_CefApp_N_1PreInitialize + 18
	6   ???                                 0x00000001142c9a88 0x0 + 4633434760

from journey.

BFergerson avatar BFergerson commented on June 19, 2024

@fkolar, go ahead and try out the latest version. Feel free to raise any issues if you have them. Feel free to give this project a star if you don't ;).

from journey.

fkolar avatar fkolar commented on June 19, 2024

@BFergerson do you mean latest version of master or https://github.com/BFergerson/macintosh-journey branch?

from journey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.