Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Hit assert(false && "Can't write to pending frame queue.") likely red light off. #18

Open
m-7761 opened this issue Mar 6, 2019 · 2 comments
Labels

Comments

@m-7761
Copy link
Collaborator

m-7761 commented Mar 6, 2019

FYI: I hit this assert inside PS3EyeFrameProcessor::enqueueCompressedFrame_usbThread. It's a mild annoyance, but I think it's hit because the red lights on the PS3Eye cameras were off. That said, I'm not sure if they are turned on manually.

Afterward the red lights came on on their own, and it no longer hit.

The following subroutine had to return false for this to have occurred:

bool enqueue(const t_element_type& input)
    {
        const size_t head = m_head.load(std::memory_order_relaxed);

        if (((m_tail.load(std::memory_order_acquire) - (head + 1)) & m_mask) >= 1)
		{
            m_buffer[head & m_mask] = input;
            m_head.store(head + 1, std::memory_order_release);

            return true;
        }

        return false;
    }
@m-7761
Copy link
Collaborator Author

m-7761 commented Mar 6, 2019

Update: For the record, I seem to keep hitting this at startup unless the program was recently run. I think the cameras are activated, but go dormant after a little while. Then this assert must be triggered when they are brought out of standby or something.

EDITED: I am finding this annoying for-what-it's-worth. It seems to work. I think it just needs to account for this common scenario.

@m-7761
Copy link
Collaborator Author

m-7761 commented Apr 14, 2019

This (671cbd5#diff-8407f6014ca07bbf93b7f3f7ac17c6b5) fixes this but I worry it may be treating the symptom.

@m-7761 m-7761 added the bug label Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant