Astra Mini S - TryOpenFrame() generates internal error

Greetings,

I am programming in C# and using an Orbbec Astra Mini S.

I have a problem with StreamReader.TryOpenFrame(). In one case, it returns “Astra.AstraException: 'astra_reader_close_frame: Internal Error”.

I start my app and start the Astra Mini but I only open the DepthStream first.

Later, I want ColorStream and BodyStream. To do it, I stop all streams (depth stream), dispose the StreamReader and StreamSet and I start the camera again: open StreamSet, CreateReader, open and start all streams.

I open a thread with the loop as in the example from Latest SDK v2.0.7 - Help find any example or instructions of using c# wrapper - #2 by victorsbd. But the problem occcurs.

I saw a topic explaining that might be due to the stream being null, I checked that the stream isn’t garbage collected when the error occurs.

private void Loop()
        {
            try
            {
                // Status change

                this.ChangeRunning(true);

                // Main loop

                while (this._running)
                {
                    this._lastKeepAlivePing = DateTime.Now;

                    try
                    {
                        if (this._reader.TryOpenFrame(this._tryFrameCount, out var frame))
                        {
                            using (frame)
                            {
                                this.ProcessFrame(frame);
                            }
                        }
                    }
                    catch (AstraException exc)
                    {
                        this.RaiseError(exc);
                        break;
                    }

                      Thread.Sleep(this._latency);
                }
            }
            catch (Exception ex)
            {
                this.RaiseError(ex);
            }

            // End

            this.ChangeRunning(false);
        }

And here is information from debug:

Astra.AstraException
HResult=0x80131500
Message=astra_reader_close_frame: Internal Error
Source=AstraDotNet
StackTrace:
at Astra.ApiStatus.ThrowIfError(String functionName)
at Astra.Core.Native.Reader.CloseFrame(IntPtr readerFrameHandle)
at Astra.ReaderFrame.Dispose()
at Astra.ReaderFrame.Finalize()

Does anyone know how to fix this ?

Thanks in advance.

Hello,

Problem solved, it was a licence problem…

2019-09-19 17:10:41,325 ERROR [astra] Body Tracking Error: 0x60094613 Orbbec Body Tracking trial expired. Please contact Orbbec support.

Don’t forget to check the astra.log if you have an internal error too.