This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Remote Procedure Call (RPC) error codes are used to identify various exceptions that occur during IPC communication. This module provides standard error code definitions related to IPC/RPC communication, helping you quickly locate and resolve communication issues.
Error Message
Failed to call mmap.
Description
The mmap function failed.
Possible Causes
The mapping area is too large.
There is no sufficient memory for mapping.
Solution
Check whether an excessively large memory size is specified when Ashmem::create() is called.
Check whether the system has sufficient memory for the mapping operation.
Error Message
Failed to call ioctl.
Description
Failed to call ioctl with the shared memory file descriptor.
Possible Causes
Invalid kernel parameters are set.
The specified type does not comply with the types specified when the shared memory is mapped.
Solution
Check whether the specified parameters are PROT_EXEC, PROT_READ, and PROT_WRITE of the Ashmem class.
Check whether the type specified is one of the types specified when the shared memory is mapped.
Error Message
Operation allowed only for the proxy object.
Description
This operation is allowed only on the RemoteProxy object.
Possible Causes
A method supported only by the RemoteProxy object is called for the RemoteObject object.
Solution
Check whether a method supported only by the RemoteProxy object is called for the RemoteObject object.
Error Message
Operation allowed only for the remote object.
Description
This operation is allowed only on the RemoteObject object.
Possible Causes
A method supported only by the RemoteObject object is called for the RemoteProxy object.
Solution
Check whether a method supported only by the RemoteObject object is called for the RemoteProxy object.
Error Message
Communication failed.
Description
Failed to communicate with the remote object over IPC.
Possible Causes
The remote object has been destroyed.
The remote object was destroyed and then re-created, and the proxy object held by the local end has expired.
Solution
Check whether the remote object has been destroyed.
Check whether a listener for the death event of the remote object is registered. If the remote object is re-created after being destroyed, obtain the proxy object again and update the local reference.
Error Message
The proxy or remote object is invalid.
Description
Invalid proxy or remote object.
Possible Causes
The proxy object is invalid.
The remote object has been destroyed.
Solution
Check whether an exception occurs when the proxy object is obtained.
Check whether the remote object has been destructed.
Error Message
Failed to write data to the message sequence.
Description
Failed to write data to MessageSequence.
Possible Causes
The default sequence space is full.
Solution
Use the method provided by MessageSequence to check whether MessageSequence has sufficient space.
Error Message
Failed to read data from the message sequence.
Description
Failed to read data from MessageSequence.
Possible Causes
The data read sequence is different from the data write sequence.
Solution
Check that the data read sequence is the same as the data write sequence.
Error Message
Memory allocation failed.
Description
Failed to allocate memory during serialization.
Possible Causes
The data to write is too large, which depends on the available contiguous memory on the current heap.
Solution
Check whether the data to write is too large or whether parameters are set improperly.
Error Message
Failed to call the JS callback function.
Description
Failed to invoke the JS callback.
Possible Causes
The JS function of the service returns a failure message.
Solution
Check whether the JS function is successfully executed.
Error Message
Failed to call dup.
Description
Failed to call dup.
Possible Causes
The file handle resources of the process are used up.
The specified fd is closed.
Solution
Check whether the input parameter fd is still valid.
Check whether the process has exhausted its file descriptor resources.