I have Java & Native components in my android project. Native is required as it is legacy code and my organization don't want to waste resources in re-writing whole code again. In the native code I need to post some event to the java layer, so I am using "AttachCurrentThread()" and "DetachCurrentThread()" functions for achieving the same. Made an API to avoid the repetition of the code. Same function was working fine and after few calls, crashing with the below error.
F art : art/runtime/indirect_reference_table.cc:77] Check failed: table_mem_map_.get() != nullptr ashmem_create_region failed for 'indirect ref table': Too many open files
Tried googling this error but in-vain. Can anyone guide me in resolving this error. Guidance is also greatly appreciated.
Thanks.