• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RPC Error Codes
2
3> **NOTE**
4>
5> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
6
7The APIs of the **rpc** module return exceptions since API version 9.
8
9## 1900001 Failed to Call mmap
10
11**Error Message**
12
13Call mmap function failed.
14
15**Description**
16
17The mmap function failed.
18
19**Possible Causes**
20
211. The mapping area is too large.
222. There is no sufficient memory for mapping.
23
24**Solution**
25
261. Check whether the memory specified in **Ashmem::create()** is too large.
272. Check whether the system has sufficient memory for the mapping operation.
28
29## 1900002 Failed to Call ioctl
30
31**Error Message**
32
33Call os ioctl function failed.
34
35**Description**
36
37Failed to call **ioctl** with the shared memory file descriptor.
38
39**Possible Causes**
40
411. Invalid kernel parameters are set.
422. The specified type does not comply with the types specified when the shared memory is mapped.
43
44**Solution**
45
461. Check whether the specified parameters are **PROT_EXEC**, **PROT_READ**, and **PROT_WRITE** of the **Ashmem** class.
472. Check whether the type specified is one of the types specified when the shared memory is mapped.
48
49## 1900003 Failed to Write Data to the Shared Memory
50
51**Error Message**
52
53Write to ashmem failed.
54
55**Description**
56
57Failed to write data to the shared memory.
58
59**Possible Causes**
60
611. The size of a single write or total size of continuous writes exceeds the size of the shared memory.
622. The PROT_WRITE mode is not enabled for the shared memory.
63
64**Solution**
65
661. Check whether the data to be written to the shared memory exceeds the total size of the shared memory mapped.
672. Check that PROT_WRITE is enabled for the shared memory.
68
69## 1900004 Failed to Read Data from the Shared Memory
70
71**Error Message**
72
73Read from ashmem failed.
74
75**Description**
76
77Failed to read data from the shared memory.
78
79**Possible Causes**
80
811. The size of a single read or total size of continuous reads exceeds the size of the shared memory.
822. The PROT_READ mode is not enabled for the shared memory.
83
84**Solution**
85
861. Check whether the data to be read exceeds the total size of the shared memory mapped.
872. Check that PROT_READ is enabled for the shared memory.
88
89## 1900005 Operation Allowed Only for the Proxy Object
90
91**Error Message**
92
93Only proxy object permitted.
94
95**Description**
96
97This operation is allowed only on the proxy object.
98
99**Possible Causes**
100
101A method supported only by the **RemoteProxy** object is called for the **RemoteObject** object.
102
103**Solution**
104
105Check whether a method supported only by the **RemoteProxy** object is called for the **RemoteObject** object.
106
107## 1900006 Operation Allowed Only for the Remote Object
108
109**Error Message**
110
111Only remote object permitted.
112
113**Description**
114
115This operation is allowed only on the remote object.
116
117**Possible Causes**
118
119A method supported only by the **RemoteObject** object is called for the **RemoteProxy** object.
120
121**Solution**
122
123Check whether a method supported only by the **RemoteObject** object is called for the **RemoteProxy** object.
124
125## 1900007 Failed to Communicate with the Remote Object
126
127**Error Message**
128
129Communication failed.
130
131**Description**
132
133Failed to communicate with the remote object over IPC.
134
135**Possible Causes**
136
1371. The remote object has been destroyed.
1382. The remote object is re-created, but the proxy object held by the local end has expired.
139
140**Solution**
141
1421. Check whether the remote object has been destroyed.
1432. Check whether an observer for listening for the dead status of the remote object is registered, and whether the remote object is destructed and created again.
144
145## 1900008 Invalid IPC Object
146
147**Error Message**
148
149Proxy or remote object is invalid.
150
151**Description**
152
153The proxy or remote object is invalid.
154
155**Possible Causes**
156
1571. The proxy object is invalid.
1582. The remote object has been destroyed.
159
160**Solution**
161
1621. Check whether an exception occurs when the proxy object is obtained.
1632. Check whether the remote object is destructed.
164
165## 1900009 Failed to Write Data to MessageSequence
166
167**Error Message**
168
169Write data to message sequence failed.
170
171**Description**
172
173Failed to write data to **MessageSequence**.
174
175**Possible Causes**
176
177The default **MessageSequence** space is full.
178
179**Solution**
180
181Use the method provided by **MessageSequence** to check whether **MessageSequence** has sufficient space.
182
183## 1900010 Failed to Read Data from MessageSequence
184
185**Error Message**
186
187Read data from message sequence failed.
188
189**Description**
190
191Failed to read data from **MessageSequence**.
192
193**Possible Causes**
194
195The data read sequence is different from the data write sequence.
196
197**Solution**
198
199Check that the data read sequence is the same as the data write sequence.
200
201## 1900011 Memory Allocation Failed
202
203**Error Message**
204
205Sequence memory alloc failed.
206
207**Description**
208
209Failed to allocate memory during serialization.
210
211**Possible Causes**
212
213The data to write is too large.
214
215**Solution**
216
217Check whether the data to write is too large or whether parameters are set improperly.
218
219## 1900012 JS Callback Failed
220
221**Error Message**
222
223Call JS callback function failed.
224
225**Description**
226
227Failed to invoke the JS callback.
228
229**Possible Causes**
230
231The JS function of the service returns a failure message.
232
233**Solution**
234
235Check whether the JS function is successfully executed.
236
237## 1900013 Failed to Invoke dup
238
239**Error Message**
240
241Call os dup function failed.
242
243**Description**
244
245Failed to call dup.
246
247**Possible Causes**
248
2491. The file handle resources of the process are used up.
2502. The specified **fd** is closed.
251
252**Solution**
253
2541. Check whether the input parameter** fd** is valid.
2552. Check whether there are file handle resources of the process.
256