Skip to content

8358452: JNI exception pending in Java_sun_awt_screencast_ScreencastHelper_remoteDesktopKeyImpl of screencast_pipewire.c:1214 (ID: 51119) #3

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,7 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl
const gchar *token = jtoken
? (*env)->GetStringUTFChars(env, jtoken, NULL)
: NULL;
JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR);

isGtkMainThread = gtk->g_main_context_is_owner(gtk->g_main_context_default());
DEBUG_SCREENCAST(
Expand Down Expand Up @@ -1121,7 +1122,7 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_remoteDesktopMou
const gchar *token = jtoken
? (*env)->GetStringUTFChars(env, jtoken, NULL)
: NULL;

JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR);

DEBUG_SCREENCAST("moving mouse to\n\t%d %d\n\twith token |%s|\n", jx, jy, token);

Expand Down Expand Up @@ -1151,6 +1152,7 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_remoteDesktopMou
const gchar *token = jtoken
? (*env)->GetStringUTFChars(env, jtoken, NULL)
: NULL;
JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR);

gboolean result = initPortal(token, NULL, 0);
DEBUG_SCREENCAST("init result %b, mouse pressing %d\n", result, buttons)
Expand Down Expand Up @@ -1178,6 +1180,7 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_remoteDesktopMou
const gchar *token = jtoken
? (*env)->GetStringUTFChars(env, jtoken, NULL)
: NULL;
JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR);

gboolean result = initPortal(token, NULL, 0);
DEBUG_SCREENCAST("init result %b, mouse wheel %d\n", result, jWheelAmt)
Expand Down Expand Up @@ -1206,13 +1209,14 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_remoteDesktopKey
int key = awt_getX11KeySym(jkey);
AWT_UNLOCK();

if (key == NoSymbol) {
if (key == NoSymbol || (*env)->ExceptionCheck(env)) {
return RESULT_ERROR;
}

const gchar *token = jtoken
? (*env)->GetStringUTFChars(env, jtoken, NULL)
: NULL;
JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR);

gboolean result = initPortal(token, NULL, 0);
DEBUG_SCREENCAST("init result %b, key %d -> %d isPress %b\n", result, jkey, key, isPress)
Expand Down