Skip to content

Comments

Implement redirection before loading content into webview#16

Merged
Rylern merged 2 commits intomainfrom
redirection-before-loading-content
Jan 26, 2026
Merged

Implement redirection before loading content into webview#16
Rylern merged 2 commits intomainfrom
redirection-before-loading-content

Conversation

@Rylern
Copy link
Collaborator

@Rylern Rylern commented Jan 21, 2026

The Javadoc viewer is not working when started from a package created with jpackage:

#
#  SIGSEGV (0xb) at pc=0x000000010710ea00, pid=16704, tid=259
#
# JRE version: OpenJDK Runtime Environment Temurin-25+36 (25.0+36) (build 25+36-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-25+36 (25+36-LTS, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V  [libjvm.dylib+0x56ea00]  jni_CallStaticObjectMethodV+0xcc
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
#

---------------  S U M M A R Y ------------

Command Line: -Djpackage.app-version=1 -XX:MaxRAMPercentage=50 --add-opens=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED --enable-native-access=javafx.graphics,javafx.media,javafx.web --enable-native-access=ALL-UNNAMED --add-opens=javafx.base/com.sun.javafx.event=ALL-UNNAMED -Djpackage.app-path=/Users/pbankhea/Documents/GitHub/petebankhead/qupath/build/dist/QuPath-0.7.0-SNAPSHOT-arm64.app/Contents/MacOS/QuPath-0.7.0-SNAPSHOT-arm64 qupath.QuPath

Host: "MacBookPro17,1" arm64, 8 cores, 16G, Darwin 25.2.0, macOS 26.2 (25C56)
Time: Tue Jan 20 09:45:02 2026 GMT elapsed time: 11.203201 seconds (0d 0h 0m 11s)

This is due to the following line:

webView.getEngine().documentProperty().addListener((p, o, n) -> {});

This line was implementing redirection after a page is loaded in the web view. This PR removes this line and implement the redirection before the page is loaded in the web view.

@Rylern Rylern requested a review from petebankhead January 21, 2026 14:04
Copy link
Member

@petebankhead petebankhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I confirm this resolves the problem on macOS.

@Rylern Rylern merged commit 5552edb into main Jan 26, 2026
1 check passed
@Rylern Rylern deleted the redirection-before-loading-content branch January 26, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants