String parameters to method on Java implemented COM object are sometimes (once in 4 hours) NULL

9 views
Skip to first unread message

Kirk Bates

unread,
Feb 27, 2019, 5:18:17 PM2/27/19
to JNIWrapper Forum
The general structure of our Windows application is that the UI is Java on top of 'business logic' implemented by COM/C++ components, bridged by JNIWrapper.  The COM can call back to the UI: typically to ask for confirmation.  For example, user clicks close on UI, which requests that it wants to close to the COM layer which, if that has unsaved state, calls back to the UI to display a confirmation message box as to whether data should be saved, or not, or the close operation cancelled.

ComFJY  2.13 / JniWrap 3.11.

The parameters passed to the message box from the COM layer are BSTR:  I log them to debug log, and they are correct.  They are not released until the call returns.

Everything works as expected for a few hours, and then - it fails because the corresponding parameters on the Java side, are received from the JNI Wrapper as null strings....and SWT message box throws an exception.  

Rather than speculate, I thought, as a next step, I would like to find the reason as to why the strings are coming back as null.  I'm surprised it does not raise an exception, given that the strings on the COM/C++ side are valid.

Any suggestions?   (BTW we do have a commercial licence and I will, if more appropriate, follow up on that channel)

Thanks
Kirk

Nataliya Rybynok

unread,
Feb 28, 2019, 4:35:42 AM2/28/19
to Kirk Bates, Customer Care
Hello Kirk,
Thank you for reaching out!

1. Could you please indicate which company you represent?

2. Is it possible to provide a complete sample application that could be used to reproduce the described behavior in one of our test environments, or at least some code that demonstrates the implementation of the described confirmation logic? 

3. In addition, could you please enable logging for JNIWrapper and ComfyJ as described in the article http://jniwrapper-support.teamdev.com/documentation/logging-in-jniwrapper/enabling-log4j-in-jniwrapper?

Possibly, the logs collected when this issue is reproduced in your environment will shed some light on the cause of the undesired behaviour.

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/3c9f6a97-b3a2-44a6-862b-dbbc78fd3c17%40teamdev.com.
Reply all
Reply to author
Forward
0 new messages