B
B
BonBon Slick2020-01-02 16:44:16
Cocos2d
BonBon Slick, 2020-01-02 16:44:16

Audioengine::play2d throws this->**_hashForTimers**?

AudioEngine::play2d("sounds/hit.mp3");

void Scheduler::unschedule(SEL_SCHEDULE selector, Ref *target)
{
    // explicit handle nil arguments when removing an object
    if (target == nullptr || selector == nullptr)
    {
        return;
    }
    
    tHashTimerEntry *element = nullptr;
    HASH_FIND_PTR(_hashForTimers, &target, element); // error here

Exception thrown: read access violation.
this->**_hashForTimers** was 0xDDDDDDDD.

More details HERE , also unanswered
AppDelegate::~AppDelegate()
{
#if USE_AUDIO_ENGINE
  //AudioEngine::end(); // this solves exception, but is this right?
#endif
}

Answer the question

In order to leave comments, you need to log in

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question