Possible Bug in Win32FindData.clone()

14 views
Skip to first unread message

rarc...@gmail.com

unread,
Mar 14, 2019, 5:05:28 PM3/14/19
to JNIWrapper Forum
The following results in NullPointerException

new Win32FindData().clone();

Exception in thread "main" java.lang.NullPointerException
    at com.jniwrapper.Structure.computeLength(SourceFile:231)
    at com.jniwrapper.Structure.init(SourceFile:168)
    at com.jniwrapper.Structure.init(SourceFile:176)
    at com.jniwrapper.win32.io.Win32FindData.init(Win32FindData.java:65)
    at com.jniwrapper.win32.io.Win32FindData.<init>(Win32FindData.java:60)
    at com.jniwrapper.win32.io.Win32FindData.clone(Win32FindData.java:166)
    at com.ci.pl.app.os.core.win32.util.Win32DirectoryStream.main(Win32DirectoryStream.java:523)

I do this for many other structure classes and it works.  I noticed this issue when I tried to perform:

new ComplexArray( new Win32FindData(), 2);


Thanks,

Rob Arciere

Nataliya Rybynok

unread,
Mar 15, 2019, 8:00:18 AM3/15/19
to rarc...@gmail.com, Customer Care
Hello Rob,
Thank you for reaching out!

This appears to be a bug of the WinPack structure definition. 
The modified WinPack wrapper with the fix is attached to this reply. The complete WinPack source code can be found in the "WinPack/src" subfolder of the JNIWrapper distribution archive. 

Please let me know in case of further questions.

By the way, could you please let me know which company you represent?

Sincerely,
Nataliya Rybynok

Customer Service Manager | TeamDev, Ltd.
Phone +380 57 766-4300
teamdev.com

--
You received this message because you are subscribed to the Google Groups "JNIWrapper Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jniwrapper-for...@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/jniwrapper-forum/b4c16884-5903-47ec-bcec-412a6aad09d7%40teamdev.com.
Win32FindData.java
Reply all
Reply to author
Forward
0 new messages