-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Win32WindowDemo.java #1286
Comments
Please provide a full stack trace - for me the demo works. A real fix would be preferred, feel free to open a PR. |
Looking at the DEV_BROADCAST_PORT mapping, it looks like A potential fix for stability would be to move the |
Stack trace below: Dec 21, 2020 11:31:22 AM com.sun.jna.Native$1 uncaughtException |
Code which causes the issue below. I have managed to get round the issue using the lines of code.
Code which causes the issue:
|
- Ensure all structures defined in com.sun.jna.platform.win32.DBT can be instantiated - Use correct mapping for DEV_BROADCAST_PORT#dbcp_name. And add accessor for the string value of that property. This is an API incompatible change, but the class could not be instantiated, so it is assumed, that it is a safe change - Prevent potential out-of-bounds read in DEV_BROADCAST_DEVICEINTERFACE - Make demo-nativewindowmsg.jar runnable Closes: java-native-access#1286
- Ensure all structures defined in com.sun.jna.platform.win32.DBT can be instantiated - Use correct mapping for DEV_BROADCAST_PORT#dbcp_name. And add accessor for the string value of that property. This is an API incompatible change, but the class could not be instantiated, so it is assumed, that it is a safe change - Prevent potential out-of-bounds read in DEV_BROADCAST_DEVICEINTERFACE - Make demo-nativewindowmsg.jar runnable Closes: java-native-access#1286
- Ensure all structures defined in com.sun.jna.platform.win32.DBT can be instantiated - Use correct mapping for DEV_BROADCAST_PORT#dbcp_name. And add accessor for the string value of that property. This is an API incompatible change, but the class could not be instantiated, so it is assumed, that it is a safe change - Prevent potential out-of-bounds read in DEV_BROADCAST_DEVICEINTERFACE - Make demo-nativewindowmsg.jar runnable Closes: java-native-access#1286
- Ensure all structures defined in com.sun.jna.platform.win32.DBT can be instantiated - Use correct mapping for DEV_BROADCAST_PORT#dbcp_name. And add accessor for the string value of that property. This is an API incompatible change, but the class could not be instantiated, so it is assumed, that it is a safe change - Prevent potential out-of-bounds read in DEV_BROADCAST_DEVICEINTERFACE - Make demo-nativewindowmsg.jar runnable Closes: java-native-access#1286
Provide complete information about the problem
The Win32WindowDemo.java example uses the following to gain access to the DEV_BROADCAST_PORT structure.
DEV_BROADCAST_PORT bpt = new DEV_BROADCAST_PORT(bhdr.getPointer());
when trying the demo I get the ERROR 'Array fields must be initialized'
Code works if you comment out the line but you are not able to access the DEV_BROADCAST_PORT structure.
MPC.
The text was updated successfully, but these errors were encountered: