[Bug 46934] New: Oracle Java SE Runtime Environment 7/8, OpenJDK JVM for Windows: InternalError: Should not get here at sun.nio.fs.WindowsNativeDispatcher.FindFirstStream0
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Mar 30 15:48:22 CDT 2019
https://bugs.winehq.org/show_bug.cgi?id=46934
Bug ID: 46934
Summary: Oracle Java SE Runtime Environment 7/8, OpenJDK JVM
for Windows: InternalError: Should not get here at
sun.nio.fs.WindowsNativeDispatcher.FindFirstStream0
Product: Wine
Version: 4.4
Hardware: x86-64
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: kernel32
Assignee: wine-bugs at winehq.org
Reporter: focht at gmx.net
Distribution: ---
Hello folks,
continuation of bug 46927
https://source.winehq.org/patches/data/161958
I don't understand what's so hard to spend a minute to create a tracking
ticket.
Download:
https://web.archive.org/web/20150215213043/http://ftp.psu.ac.th/pub/java/jre-7u21-windows-i586.exe
* https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8152043
* https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8193173
* https://bugs.openjdk.java.net/browse/JDK-8152043
http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/b2cc99d27aa1/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c#l103
--- snip ---
/**
* Initializes jfieldIDs and get address of Win32 calls that are located
* at runtime.
*/
JNIEXPORT void JNICALL
Java_sun_nio_fs_WindowsNativeDispatcher_initIDs(JNIEnv* env, jclass this)
{
jclass clazz;
HMODULE h;
clazz = (*env)->FindClass(env,
"sun/niofs/WindowsNativeDispatcher$FirstFile");
if (clazz == NULL) {
return;
}
...
// get handle to kernel32
if (GetModuleHandleExW((GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT),
(LPCWSTR)&CreateFileW, &h) != 0)
{
// requires Windows Server 2003 or newer
FindFirstStream_func =
(FindFirstStream_Proc)GetProcAddress(h, "FindFirstStreamW");
FindNextStream_func =
(FindNextStream_Proc)GetProcAddress(h, "FindNextStreamW");
// requires Windows Vista or newer
CreateSymbolicLink_func =
(CreateSymbolicLinkProc)GetProcAddress(h, "CreateSymbolicLinkW");
GetFinalPathNameByHandle_func =
(GetFinalPathNameByHandleProc)GetProcAddress(h,
GetFinalPathNameByHandleW");
}
}
--- snip ---
http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/b2cc99d27aa1/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c#l383
--- snip ---
JNIEXPORT void JNICALL
Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstStream0(JNIEnv* env, jclass
his,
jlong address, jobject obj)
{
WIN32_FIND_STREAM_DATA data;
LPCWSTR lpFileName = jlong_to_ptr(address);
HANDLE handle;
if (FindFirstStream_func == NULL) {
JNU_ThrowInternalError(env, "Should not get here");
return;
}
handle = (*FindFirstStream_func)(lpFileName, FindStreamInfoStandard, &data,
);
if (handle != INVALID_HANDLE_VALUE) {
jstring name = (*env)->NewString(env, data.cStreamName,
jsize)wcslen(data.cStreamName));
if (name == NULL)
return;
(*env)->SetLongField(env, obj, findStream_handle, ptr_to_jlong(handle));
(*env)->SetObjectField(env, obj, findStream_name, name);
} else {
if (GetLastError() == ERROR_HANDLE_EOF) {
(*env)->SetLongField(env, obj, findStream_handle,
tr_to_jlong(handle));
} else {
throwWindowsException(env, GetLastError());
}
}
}
--- snip ---
$ sha1sum jre-7u21-windows-i586.exe
620472dc1e7d015ed9a7700b846565a707946fcb jre-7u21-windows-i586.exe
$ du -sh jre-7u21-windows-i586.exe
31M jre-7u21-windows-i586.exe
$ wine --version
wine-4.5
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list