Known issues¶
For Kanzi Connect Java code on Android, there is a false assumption that the order of finalization of class instances is deterministic. This can cause an application to terminate because of a mismatch between Java and C++ objects after Android garbage collection. When that occurs, the characteristic logline in
logcat
output isjava.lang.NullPointerException: null upcall object in ...
The assumption affects both the example projects and code generation scripts.
For example, the file
app/src/main/java/com/rightware/connect/system/SystemRuntimeDataListener.java
from the projectSDK/bindings/android/BindingsDemo
, documented in Android bindings example, contains this code that implicitly assumes thatm_token.finalize()
is called afterthis.finalize()
.public void cleanup() { ... if (m_connector != null) { if (m_token != null) { m_connector.getContentClient().releaseContentToken(m_token); ... } ... } } @Override protected void finalize() { cleanup(); super.finalize(); }
Workaround: In Java code, do not rely on the
finalize()
of an object, but explicitly invokecleanup()
before you allow the object to be garbage collected.Using spaces or special characters in project name breaks the C++ Code Behind workflow.
On an Android emulator, acquiring images using the HTTP protocol often fails, if the Kanzi Connect server providing the images is not running on the same emulator.
Possibly related to https://issuetracker.google.com/issues/150758736.
Workaround:
Use hardware.
Host Kanzi Connect server on the emulator.
Use port reversing to mimic localhost.
For example, in case of SSL socket connection for the application, and HTTP for acquiring images:
adb reverse tcp:2006 tcp:2006 adb reverse tcp:8080 tcp:8080
If you are using API level 29 or newer, Java applications that use
connection.xml
from a device SD card ($EXTERNAL_STORAGE/Connect
), do not work correctly. Examples of affected Java applications include Android bindings example and Android Media Remote Service. For details, see Storage updates in Android 11.Workaround: Include all content in the application APK or customize
ConfigurationReader.java
as described in Utility classes provided with Kanzi Connect Android bindings.On Android, overriding
connection.xml
using$EXTERNAL_STORAGE/Connect
as described in Configuring Kanzi Connect application to connect to a Kanzi Connect Server running on another device does not work for applications using KanziView.Workaround: Include all content in the application APK.
Shared memory adapter does not work with Android applications unless you disable SELinux.
Kanzi Connect application does not work on a computer that does not have Kanzi Connect SDK installed.
Workaround: Ensure that all dependencies required by Kanzi Connect are available.
In the Simulator when you add to a Kanzi Connect service methods or events, to see these as triggers and actions in the Kanzi Studio Node Components, in the Kanzi Studio Node Tree you must reselect the node.
On Windows platform turning back system clock causes network communication to freeze.
On QNX7 armv7 platform the Kanzi Connect Viewport example application can fail if the platform does not support a 24-bit framebuffer without alpha channel.
Kanzi Connect Server certificate throws a warning when you initiate a HTTPS connection. For QNX 7.1 https connection is disabled.
Workaround: Use HTTP.
In Kanzi Connect services, the execution context is critical for the service implementation. This causes the Kanzi Connect Server to terminate when you access Kanzi Connect service properties from outside the Kanzi Connect main thread context.
Workaround: Invoke main thread execution by calling the
notifyWork()
method of a service from any execution context. See Updating runtime data from outside the main thread.Known limitations in Kanzi Connect Android bindings:
Avoid using spaces in the installation directory paths.
Passing abstract work items, such as class instances, as work items is not supported.
When you define service interfaces that use custom types, you must enter the name of the custom type in camel case starting with a capital letter. If you do not do this, Kanzi Connect generates C++ code that does not compile.
For example, to define a service that uses custom types:
<type name="ValidCustomTypeName"> <field name="inttype" datatype="int"/> <field name="floattype" datatype="float" /> <field name="booltype" datatype="bool"/> <field name="stringtype" datatype="string"/> </type>
When the Kanzi Studio Preview zoom level is exactly 100% it in some cases inaccurately calculates touch event coordinates from the Input Service.
Workaround: Set the Preview zoom level to a value other than 100% or align the Preview and the application Screen with the top left corner to avoid extra offset on touch coordinates.
Service running callback from
AbstractServiceClient::addSessionRunningSubscription
arrives twice under the normal working conditions.Workaround: Prepare the client application for the multiple callbacks or use the
RunningServicesMonitor
instead.Loading
connect_services.dll
fails because Windows fails to evaluate theCONNECT_PATH
environment variable.Workaround: When you install Kanzi Connect for the first time, in the Windows System Environment Variables in the
Path
variable edit the%CONNECT_PATH%
variable by adding a space character (’ ‘) to the end of the variable. When you save the environment variable settings, Windows trims the extra space that you added, keeping the value of the variable the same as before, but the change causes Windows to re-evaluate macros and update the chained environment variables.If you modify the Kanzi Connect message arguments in Kanzi Connect Actions or Triggers while the Kanzi Studio Preview is running, in some cases, the Preview terminates.
Workaround: Do not modify the message array in Kanzi Studio because Kanzi Connect message arguments are defined through Kanzi Connect introspection tools.
If you drag and drop a node that contains a Kanzi Connect Node Component to the Kanzi Studio Preview, in some cases, the Preview terminates. This is caused by an ownership issue of the Node Component data when Kanzi patches the Preview scene.
On QNX and Android, you must link the Kanzi Connect plugin libraries to applications. This way you ensure that runtime type information and dynamic casts remain functional.