I have come across a case where sgx_create_enclave does not return, but runs indefinitely.
I don't know what can be causing the problem, so please tell me what portions of my project would be useful to share, since it's a relatively large one.
The implementation problem was obviously from my side. I rewrote the program and the problem has gone away. I think it had to do with me having provided an incorrect filename, or in a format that the API didn't recognize.
The only problem is that it is more desirable for the API to "object" and return an error code that not to return at all. Unfortunately, I don't think I can give any minimal stepwise guide to reproduce the problem I was having.