Cosmin Negoescu - 2014-07-10

Hi.

I have used the latest version of the ASN library (0.9.24) to encode in ASN1 unaligned PER format.

I am using the method uper_encode_to_buffer() inside a daemon.
At a first look, the encoding seemed to work fine, it encodes the data in UPER format.

BUT:

The daemon stayed 24h in an idle state.
Then a request came to the daemon to encode in UPER format, and the daemon gives the error:
"Resource temporarily unavailable" because of the asn1c library, and the library was unable to encode correctly the data in UPER format.

The information contained in the failed_type->name is "INTEGER" but I cannot figure out what integer is it about,
and the address of the structure_ptr is empty (!!)
the error being strerr(errno) = "Resource temporarily unavailable"

This is the way how I free the memory, after encoding:
asn_DEF_MyStructure.free_struct(&asn_DEF_MyStructure, myStructure, 0); // 0 = free the pointer too

After resetting the daemon, the encoder works fine again. But when in an idle state for hours, and a new request comes to encode in UPER format it says again the same error: "Resource temporarily unavailable".

Did any of you encounter something like this?
Do you have any idea why is this happening?

Thank you in advance for your support.
_Cosmin