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

Null Pointer exception when calling TlbImp on UIAutomationCore.dll #672

Closed
markhumphreysjhc opened this issue Jun 24, 2016 · 3 comments
Closed

Comments

@markhumphreysjhc
Copy link

markhumphreysjhc commented Jun 24, 2016

Null Pointer exception when calling TlbImp on UIAutomationCore.dll

@markhumphreysjhc
Copy link
Author

When I call the tlbimp to extract the definitions from this DLL, I get the following error stack ...

INFO 2016-06-24 10:25:13.877 : Type of kind 'Interface' found: IUIAutomationTextRange
INFO 2016-06-24 10:25:13.879 : Type of kind 'Enum' found: TextPatternRangeEndpoint
INFO 2016-06-24 10:25:13.882 : Type of kind 'Enum' found: TextUnit
INFO 2016-06-24 10:25:13.893 : Type of kind 'Interface' found: IUIAutomationTextRange2
INFO 2016-06-24 10:25:13.895 : Type of kind 'Interface' found: IUIAutomationTextRangeArray
INFO 2016-06-24 10:25:13.896 : Type of kind 'Interface' found: IUIAutomationTextPattern
INFO 2016-06-24 10:25:13.898 : Type of kind 'Enum' found: SupportedTextSelection
INFO 2016-06-24 10:25:13.901 : Type of kind 'Interface' found: IUIAutomationTextPattern2
INFO 2016-06-24 10:25:13.902 : Type of kind 'Interface' found: IUIAutomationTextEditPattern
INFO 2016-06-24 10:25:13.904 : Type of kind 'Interface' found: IUIAutomationCustomNavigationPattern
INFO 2016-06-24 10:25:13.905 : Type of kind 'Enum' found: NavigateDirection
INFO 2016-06-24 10:25:13.909 : Type of kind 'Interface' found: IUIAutomationLegacyIAccessiblePattern
INFO 2016-06-24 10:25:13.912 : Type of kind 'DispInterface' found: IAccessible
java.lang.NullPointerException
at com.sun.jna.platform.win32.COM.tlb.imp.TlbDispInterface.(TlbDispInterface.java:96)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.createCOMDispInterface(TlbImp.java:210)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.startCOM2Java(TlbImp.java:108)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.(TlbImp.java:79)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.main(TlbImp.java:56)

@markhumphreysjhc markhumphreysjhc changed the title Null Pointer exception when calling TlbImp on Null Pointer exception when calling TlbImp on UIAutomationCore.dll Jun 24, 2016
@markhumphreysjhc
Copy link
Author

If I do the same for one of the examples in the help output, then the same occurs i/e/ when I do the following ..

java -cp jna.jar;jna-platform.jar com.sun.jna.platform.win32.COM.tlb.TlbImp -tlb.id {50A7E9B0-70EF-11D1-B75A-00A0C90564FE} -tlb.major.version 1 -tlb.minor.version 0

I get the following output:

java.lang.NullPointerException
at com.sun.jna.platform.win32.COM.tlb.imp.TlbDispInterface.(TlbDispInterface.java:96)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.createCOMDispInterface(TlbImp.java:210)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.startCOM2Java(TlbImp.java:108)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.(TlbImp.java:73)
at com.sun.jna.platform.win32.COM.tlb.TlbImp.main(TlbImp.java:56)

@matthiasblaesing
Copy link
Member

Thanks for the report - the fix is already in master:

30893c2

Please build from master the resulting 4.3.0-SNAPSHOT version will have the fix.

mstyura pushed a commit to mstyura/jna that referenced this issue Sep 9, 2024
Motivation:

We used an outdates action for msbuild

Modifications:

Update to microsoft/setup-msbuild v2

Result:

Use up to date action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants