Skip to content
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

com.sun.jna.platform.win32.COM.ITypeInfoTest: multiple failures #406

Closed
dblock opened this issue Mar 16, 2015 · 6 comments
Closed

com.sun.jna.platform.win32.COM.ITypeInfoTest: multiple failures #406

dblock opened this issue Mar 16, 2015 · 6 comments

Comments

@dblock
Copy link
Member

dblock commented Mar 16, 2015

java.lang.NullPointerException
    at com.sun.jna.platform.win32.COM.ITypeInfoTest.testAddressOfMember(ITypeInfoTest.java:165)
@dblock dblock added the bug label Mar 16, 2015
@dblock dblock changed the title ITypeInfoTest: multiple failures com.sun.jna.platform.win32.COM.ITypeInfoTest: multiple failures Mar 16, 2015
@lwahonen
Copy link

Most (14 out of 19) failures can be fixed by making getTypeInfo() return a typeinfo:

public ITypeInfo getTypeInfo() {
    TypeLibUtil shellTypeLib = new TypeLibUtil("{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}", 1, 0);
    int typeInfoCount = shellTypeLib.getTypeInfoCount();
    if (typeInfoCount == 0)
        throw new RuntimeException("Shell lib contains zero type infos");
    ITypeInfo typeInfo = shellTypeLib.getTypeInfo(0);
    return typeInfo;
}

@dblock
Copy link
Member Author

dblock commented Mar 17, 2015

PR please? And mark the rest of the tests skipped?

@lwahonen
Copy link

Do we need changes entries for fixes like this?

@dblock
Copy link
Member Author

dblock commented Mar 17, 2015

No need for CHANGES entries for tests.

@dblock
Copy link
Member Author

dblock commented Mar 17, 2015

On my machine the updated code fails like this:

 [junit] Testcase: testAddressOfMember(com.sun.jna.platform.win32.COM.ITypeInfoTest):        Caused an ERROR
 [junit] Didn't find address for function in any of the type infos
 [junit] java.lang.RuntimeException: Didn't find address for function in any of the type infos
 [junit]     at com.sun.jna.platform.win32.COM.ITypeInfoTest.testAddressOfMember(ITypeInfoTest.java:201)
 [junit]
 [junit]
 [junit] Testcase: testGetDllEntry(com.sun.jna.platform.win32.COM.ITypeInfoTest):    Caused an ERROR
 [junit] Didn't find Dll entry for member in any of the type infos
 [junit] java.lang.RuntimeException: Didn't find Dll entry for member in any of the type infos
 [junit]     at com.sun.jna.platform.win32.COM.ITypeInfoTest.testGetDllEntry(ITypeInfoTest.java:182)
 [junit]
 [junit]
 [junit] Test com.sun.jna.platform.win32.COM.ITypeInfoTest FAILED
 [junit] Testsuite: com.sun.jna.platform.win32.COM.ITypeLibTest
 [junit] Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.646 sec
 [junit]
 [junit] Testcase: testFindName(com.sun.jna.platform.win32.COM.ITypeLibTest):        Caused an ERROR
 [junit] The parameter is incorrect. (puArgErr=)
 [junit] com.sun.jna.platform.win32.COM.COMException: The parameter is incorrect. (puArgErr=)
 [junit]     at com.sun.jna.platform.win32.COM.COMUtils.checkRC(COMUtils.java:112)
 [junit]     at com.sun.jna.platform.win32.COM.COMUtils.checkRC(COMUtils.java:95)
 [junit]     at com.sun.jna.platform.win32.COM.ITypeLibTest.testFindName(ITypeLibTest.java:136)
 [junit]
 [junit]

@matthiasblaesing
Copy link
Member

Closing - master builds cleanly and unittests run on windows 32 and 64.

mstyura pushed a commit to mstyura/jna that referenced this issue Sep 9, 2024
…rectly set (java-native-access#406)


Motivation:

Our cross-compilation on mac did not work correctly and produced a non working lib.

Modifications:

Fix cross compilation by using a custom m4 template

Result:

cross compile works as expected
mstyura pushed a commit to mstyura/jna that referenced this issue Sep 9, 2024

Motivation:

Since PR java-native-access#406 the Android build was not working anymore

Modifications:

Re-added the ldflags to the Android profile of the native library

Result:

The Android library successfully builds again

This reverts commit 122d099.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants