Skip to content

Crash with org.eclipse.swt.browser using Safari on macOS Ventura #452

Closed

Description

@dstainhauser

Describe the bug
Eclipse and RCP runtimes crash on macOS 13 Ventura using the org.eclipse.swt.browser.

To Reproduce
On macOS 13 Ventura, Open the Internal web browser, enter https://google.com or any other url. It crashes
Same happens on a RCP build using the Safari browser.

Expected behavior
Using equo.chromium works on Ventura. It worked with previous macOS versions.

Screenshots

System Integrity Protection: enabled

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

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process: exc handler [2742]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 0x54ae678506d3 ???
1 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
2 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
3 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
4 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
5 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
6 JavaScriptCore 0x7ff8288d4251 llint_entry + 122919
7 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
8 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
9 JavaScriptCore 0x7ff8288d33b8 llint_entry + 119182
10 JavaScriptCore 0x7ff8288b6027 vmEntryToJavaScript + 216
11 JavaScriptCore 0x7ff829057161 JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 545
1

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • [] All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
    13, Ventura on Intel based Mac

  2. JRE/JDK version
    Adopt Open JDK 11, also with other versions

Version since
Eclipse or SWT version since when the behavior is seen [e.g. 4.23]
All versions. Tested with 2022-03 and 2022-12

Workaround (or) Additional context
No workaround with Safari known.

Activity

  1. added
    macOS
    on Oct 26, 2022
  2. akurtakov commented on Oct 26, 2022

    @akurtakov
    Member

    @sravanlakkimsetti Should we be looking into moving the test machines to MacOS 13 in order to catch such issues?

  3. Phillipus commented on Oct 26, 2022

    @Phillipus
    Contributor

    I've tested this and it works for me:

    Mac Mini M1
    Ventura 13.0 (22A380)
    Eclipse 4.25

    What version are you on?

  4. dstainhauser commented on Oct 26, 2022

    @dstainhauser
    Author

    We are using a

    Mac Mini Intel
    Ventura 13.0
    Eclipse 4.25
    Safari 16.1

    Seems to be a difference between the M1 and Intel code

  5. Phillipus commented on Oct 26, 2022

    @Phillipus
    Contributor

    I tested on Intel Mac and I also get the same crash when opening the internal browser in Eclipe 4.25.

    However, running the Browser Snippet at https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java works.

    Edit - this works because it is being launched as a child process from Eclipse. See my comment below.

  6. Phillipus commented on Oct 26, 2022

    @Phillipus
    Contributor

    The strange thing is that the Internal Browser works OK in a launched child Eclipse session. And it's the same with our RCP app which uses the SWT Browser component. When run standalone the whole app crashes when the Browser component tries to display a URL, but not when debugging the app from Eclipse.

  7. sravanlakkimsetti commented on Oct 26, 2022

    @sravanlakkimsetti
    Member

    @sravanlakkimsetti Should we be looking into moving the test machines to MacOS 13 in order to catch such issues?

    We have Mac M1 as test machine. Probably we should upgrade. We are running tests on macos 11.4.
    Raised Upgrade nc1ht-macos11-arm64 to macos 13

  8. Phillipus commented on Oct 26, 2022

    @Phillipus
    Contributor

    @sravanlakkimsetti The problem with this bug is it's only occurring on an Intel Mac.

  9. akurtakov commented on Oct 26, 2022

    @akurtakov
    Member

    We are not sure whether there aren't others. It's best to make sure we test on latest version.

  10. sravanlakkimsetti commented on Oct 26, 2022

    @sravanlakkimsetti
    Member

    @sravanlakkimsetti The problem with this bug is it's only occurring on an Intel Mac.

    yes. that is true. will this occur if we run intel build using rosetta2 translator? if yes then we can catch this using our test machine.

  11. Phillipus commented on Oct 26, 2022

    @Phillipus
    Contributor

    will this occur if we run intel build using rosetta2 translator? if yes then we can catch this using our test machine.

    I tried that. The crash doesn't happen on M1 using Intel versions of Eclipse and Java

  12. sravanlakkimsetti commented on Oct 26, 2022

    @sravanlakkimsetti
    Member

    will this occur if we run intel build using rosetta2 translator? if yes then we can catch this using our test machine.

    I tried that. The crash doesn't happen on M1 using Intel versions of Eclipse and Java

    We have a problem then. Our regular tests may not be able to catch the problem.

  13. Phillipus commented on Oct 26, 2022

    @Phillipus
    Contributor

    The strange thing is that the Internal Browser works OK in a launched child Eclipse session. And it's the same with our RCP app which uses the SWT Browser component. When run standalone the whole app crashes when the Browser component is shown, but not when debugging the app from Eclipse.

    Is there anything that might cause this situation? Could it be a threading issue or that child Eclipse uses a different Java process?

  14. sravanlakkimsetti commented on Oct 26, 2022

    @sravanlakkimsetti
    Member

    notifications: @lshanmug

  15. 55 remaining items

  16. Phillipus commented on Dec 20, 2022

    @Phillipus
    Contributor

    Even if it were possible to create a new Eclipse launcher it won't solve the problem for existing Eclipse, RCP and Java users. I guess it depends on when a new version of Webkit is built and how long before Apple integrates it into Ventura.

  17. Phillipus commented on Dec 21, 2022

    @Phillipus
    Contributor

    @lshanmug Is it possible for Eclipse build to create a launcher that users could download and replace as per this quote as a temporary workaround?

    https://bugs.webkit.org/show_bug.cgi?id=247387#c31

    They have a version of JavaApplicationStub that uses the default page size available by asking support. The changes requires Install4j 10 and the updated JavaApplicationStub can be placed in install4j10/resource/macos.

  18. SamSharaf commented on Jan 12, 2023

    @SamSharaf

    I found one simple workaround here which worked for me. It is mentioned by Klara Ward and it says:
    Workaround that worked for my colleague - Uncheck Enable flight recording analysis in the Preferences, then the Rules overview is not shown.

  19. Phillipus commented on Jan 12, 2023

    @Phillipus
    Contributor

    I found one simple workaround here which worked for me. It is mentioned by Klara Ward and it says: Workaround that worked for my colleague - Uncheck Enable flight recording analysis in the Preferences, then the Rules overview is not shown.

    How does one "uncheck Enable flight recording analysis in the Preferences" in Eclipse or an RCP app built on Eclipse?

  20. klaraward commented on Jan 13, 2023

    @klaraward

    I found one simple workaround here which worked for me. It is mentioned by Klara Ward and it says: Workaround that worked for my colleague - Uncheck Enable flight recording analysis in the Preferences, then the Rules overview is not shown.

    How does one "uncheck Enable flight recording analysis in the Preferences" in Eclipse or an RCP app built on Eclipse?

    Yeah, this setting only applies for JDK Mission Control (which uses Eclipse under the hood)

    In the general case I guess the workaround is "make sure not to open the internal browser)

  21. SamSharaf commented on Jan 14, 2023

    @SamSharaf

    I found one simple workaround here which worked for me. It is mentioned by Klara Ward and it says: Workaround that worked for my colleague - Uncheck Enable flight recording analysis in the Preferences, then the Rules overview is not shown.

    How does one "uncheck Enable flight recording analysis in the Preferences" in Eclipse or an RCP app built on Eclipse?

    @Phillipus. Open the eclipse preferences (settings in ventura). Search for " Enable flight recording analysis", then uncheck it.
    On another front, you may find this tutorial very useful.

  22. SamSharaf commented on Jan 14, 2023

    @SamSharaf

    I found one simple workaround here which worked for me. It is mentioned by Klara Ward and it says: Workaround that worked for my colleague - Uncheck Enable flight recording analysis in the Preferences, then the Rules overview is not shown.

    How does one "uncheck Enable flight recording analysis in the Preferences" in Eclipse or an RCP app built on Eclipse?

    Yeah, this setting only applies for JDK Mission Control (which uses Eclipse under the hood)

    In the general case I guess the workaround is "make sure not to open the internal browser)

    Thank you @klaraward for your follow up comment.
    In fact, I use the plain JMC which I downloaded from here. Your colleague's workaround works perfectly as in the snap-shot attached.
    Screenshot 2023-01-14 at 3 40 38 PM

    The very same workaround also resolved the same issue in Azul mission control which is one community variation.


    Edit:
    Yes @Phillipus. You are right. I was so absorbed by how this discussion applies to my issue.... Apologies to all

  23. Phillipus commented on Jan 15, 2023

    @Phillipus
    Contributor

    @Phillipus. Open the eclipse preferences (settings in ventura). Search for " Enable flight recording analysis", then uncheck it. On another front, you may find this tutorial very useful.

    There is no such setting in Eclipse and is irrelevant to this discussion. This thread is about using the SWT Browser component in Eclipse and RCP apps.

    Please read #452 (comment)

  24. azaylamba commented on Jan 20, 2023

    @azaylamba

    I am also getting the same error on Intel Mac with Ventura 13.0.1. Below is the crash report:

    Crashed Thread: 0 Dispatch queue: com.apple.main-thread
    Exception Type: EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5
    Terminating Process: exc handler [24935]
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0 ??? 0x5c2ccbabc6bb ???
    1 ??? 0x0 ???
    2 JavaScriptCore 0x7ff82f2b5e38 llint_entry + 121870
    3 JavaScriptCore 0x7ff82f2b62c4 llint_entry + 123034
    4 JavaScriptCore 0x7ff82f2b6251 llint_entry + 122919
    5 JavaScriptCore 0x7ff82f2b53b8 llint_entry + 119182
    6 JavaScriptCore 0x7ff82f2b53b8 llint_entry + 119182
    7 JavaScriptCore 0x7ff82f2b62c4 llint_entry + 123034
    8 JavaScriptCore 0x7ff82f2b62c4 llint_entry + 123034
    9 JavaScriptCore 0x7ff82f2b53b8 llint_entry + 119182
    10 JavaScriptCore 0x7ff82f2b53b8 llint_entry + 119182
    11 JavaScriptCore 0x7ff82f2b53b8 llint_entry + 119182
    12 JavaScriptCore 0x7ff82f2b53b8 llint_entry + 119182
    13 JavaScriptCore 0x7ff82f2b554b llint_entry + 119585
    14 JavaScriptCore 0x7ff82f2b53b8 llint_entry + 119182
    15 JavaScriptCore 0x7ff82f298027 vmEntryToJavaScript + 216
    16 JavaScriptCore 0x7ff82fa3316d
    JSC::Interpreter::executeProgram(JSC::SourceCode const&,
    JSC::JSGlobalObject*, JSC::JSObject*) + 1117
    17 JavaScriptCore 0x7ff82fcde5fa
    JSC::evaluate(JSC::JSGlobalObject*, JSC::SourceCode const&, JSC::JSValue,
    WTF::NakedPtrJSC::Exception&) + 250
    18 WebCore 0x7ff83375772c
    WebCore::JSExecState::profiledEvaluate(JSC::JSGlobalObject*,
    JSC::ProfilingReason, JSC::SourceCode const&, JSC::JSValue,
    WTF::NakedPtrJSC::Exception&) + 92
    19 WebCore 0x7ff8337573c8
    WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode
    const&, WebCore::DOMWrapperWorld&) + 200
    20 WebCore 0x7ff8337577c5
    WebCore::ScriptController::evaluateIgnoringException(WebCore::ScriptSource
    Code const&) + 53
    21 WebCore 0x7ff833ad8a8a
    WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode
    const&) + 586
    22 WebCore 0x7ff833aa7247
    WebCore::LoadableClassicScript::execute(WebCore::ScriptElement&) + 151
    23 WebCore 0x7ff833ad90a9
    WebCore::ScriptElement::executePendingScript(WebCore::PendingScript&) +
    137
    24 WebCore 0x7ff833adbf08
    WebCore::ScriptRunner::timerFired() + 184
    25 WebCore 0x7ff834159f48
    WTF::Detail::CallableWrapper<WebCore::ThreadTimers::setSharedTimer(WebC
    ore::SharedTimer*)::$_0, void>::call() + 152
    26 WebCore 0x7ff83264274f
    WebCore::timerFired(__CFRunLoopTimer*, void*) + 31
    27 CoreFoundation 0x7ff8153c9996
    CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION +
    20
    28 CoreFoundation 0x7ff8153c94fe __CFRunLoopDoTimer + 820
    29 CoreFoundation 0x7ff8153c9114 __CFRunLoopDoTimers + 285
    30 CoreFoundation 0x7ff8153afa5c _CFRunLoopRun + 2098
    31 CoreFoundation 0x7ff8153aebb0 CFRunLoopRunSpecific + 560
    32 Foundation 0x7ff81620749a -[NSRunLoop(NSRunLoop)
    runMode:beforeDate:] + 216
    33 libswt-pi-cocoa-4954r7.jnilib 0x2bb60b29
    Java_org_eclipse_swt_internal_cocoa_OS_objc_1msgSend_1bool__JJJJ + 57
    34 ??? 0x1ac10187 ???
    35 ??? 0x14133c74 ???
    36 ??? 0x12bec203 ???
    37 ??? 0x12bec203 ???
    38 ??? 0x12bec248 ???
    39 ??? 0x12bec248 ???
    40 ??? 0x12bec203 ???
    41 ??? 0x12bec056 ???
    42 ??? 0x12bec203 ???
    43 ??? 0x12bec203 ???
    44 ??? 0x12bec248 ???
    45 ??? 0x12bec203 ???
    46 ??? 0x12bebc40 ???
    47 ??? 0x12bebc40 ???
    48 ??? 0x12bec056 ???
    49 ??? 0x12bec056 ???
    50 ??? 0x12bebf80 ???
    51 ??? 0x12bebf80 ???
    52 ??? 0x12bebf80 ???
    53 ??? 0x12be2cc9 ???
    54 libjvm.dylib 0x9a82f73
    JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*,
    Thread*) + 599
    55 libjvm.dylib 0x9d49c4c invoke(InstanceKlass*,
    methodHandle const&, Handle, bool, objArrayHandle, BasicType,
    objArrayHandle, bool, Thread*) + 2072
    56 libjvm.dylib 0x9d493ea
    Reflection::invoke_method(oopDesc*, Handle, objArrayHandle, Thread*) + 244
    57 libjvm.dylib 0x9b0632c JVM_InvokeMethod + 448
    58 ??? 0x12bf1930 ???
    59 ??? 0x12bebf80 ???
    60 ??? 0x12bebf80 ???
    61 ??? 0x12bec056 ???
    62 ??? 0x12bebf80 ???
    63 ??? 0x12bec203 ???
    64 ??? 0x12bec203 ???
    65 ??? 0x12be2cc9 ???
    66 libjvm.dylib 0x9a82f73
    JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*,
    Thread*) + 599
    67 libjvm.dylib 0x9ac1864 jni_invoke_nonstatic(JNIEnv
    ,
    JavaValue
    , _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*,
    Thread*) + 621
    68 libjvm.dylib 0x9ac2f05 jni_CallIntMethod + 371
    69 eclipse_11700.so 0x13f7fca startJavaJNI + 1946
    70 eclipse_11700.so 0x13f3eb0 _run + 6016
    71 eclipse_11700.so 0x13f227a run + 426
    72 provar 0x12999f7 original_main + 1319
    73 provar 0x129a3a7 main + 1655
    74 dyld 0x7ff814fa5310 start + 2432

  25. Phillipus commented on Jan 23, 2023

    @Phillipus
    Contributor

    Good news - the fix has made it into Ventura 13.2.

    If others could confirm with Ventura 13.2 this can then be closed.

  26. mbonato commented on Jan 24, 2023

    @mbonato

    I can confirm. With macOS Ventura 13.2 installed, the Eclipse internal browser does not seem crash any more.

  27. dstainhauser commented on Jan 24, 2023

    @dstainhauser
    Author

    I'd like to give a big thank to everybody participating in this thread for your support and actively trying to fix the problem. I'm glad that Apple finally solved this issue.

  28. azaylamba commented on Jan 25, 2023

    @azaylamba

    I can also confirm that my app is working fine on Ventura 13.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    macOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions