Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: nightmarer on Tue 02/03/2021 17:51:33

Title: The object being pointed to is not in the managed object pool [SOLVED]
Post by: nightmarer on Tue 02/03/2021 17:51:33
Hello.

QuoteAs I'm trying to play one music file I am receiving:
An internal error has occurred. Please note down the following information.
If the problem persists, post the details on the AGS Technical Forum.
(ACI version 3.5.0.29)

Error: Error running function '_run_dialog15':
Error: Pointer cast failure: the object being pointed is not in the managed object pool

It just happens with the new audios (since number 175) I am entering in the game. It doesn't happenen if play another audio file below 175.
Any idea?

One clue that may not have relation. When I enter a new audio the auto fillcode doesn't recognize this file it untill I restart AGS. Anyway, even adding the audio file and after restarting doesn't solve this issue.

Update: I made sure that the audio is able to be played in the audio menu.

Update: If I delete audio files, this last audio id goes down and now is it able to be played.
Title: Re: The object being pointed to is not in the managed object pool
Post by: Crimson Wizard on Tue 02/03/2021 18:19:42
This is weird.

As a random thought, how long are your clip names? AGS has still a hidden limit of 30 (or 29) chars for a audio name, but it does not warn about it.



Quote from: nightmarer on Tue 02/03/2021 17:51:33
Update: If I delete audio files, this last audio id goes down and now is it able to be played.

How exactly do you use audio in script (how do you play it)?
Title: Re: The object being pointed to is not in the managed object pool
Post by: nightmarer on Tue 02/03/2021 18:37:16
Quote from: Crimson Wizard on Tue 02/03/2021 18:19:42
This is weird.
As a random thought, how long are your clip names? AGS has still a hidden limit of 30 (or 29) chars for a audio name, but it does not warn about it.

The audio filename is aEden, so as you see is not really long.

Quote from: Crimson Wizard on Tue 02/03/2021 18:19:42
How exactly do you use audio in script (how do you play it)?

I am using this script, but let me tell you that it works perfect with any of the files below 175 id, even this same file now it works as I deleted 2 audio files just for testing.

Code (ags) Select
static void SetBGM::Play(AudioClip *music, SetBGM_Channel index) { //Canal principal de música bgm para el 1 bgm para el 2
  if (music != seekaudio && Isaac.Room != 30) {
    SetBGM.Stop(seekaudio);
  }
  if (bgm[index] == null || bgm[index].PlayingClip != music) {
   bgm[index] = music.Play(); //Music is played
   seekaudio = music;
  }
  else if(music == null) {
    music.Stop();
  }
}

seekaudio is a global variable that stores the last song played, so if you enter in a room with the same song it won't play it back, it will just continue playing it.
Title: Re: The object being pointed to is not in the managed object pool
Post by: Crimson Wizard on Tue 02/03/2021 18:56:05
So basically it stops working if you add more than 175 sounds?
Title: Re: The object being pointed to is not in the managed object pool
Post by: nightmarer on Tue 02/03/2021 18:58:12
During the execution it stops and it pops up the message with the text I written above.
Title: Re: The object being pointed to is not in the managed object pool
Post by: Crimson Wizard on Tue 02/03/2021 21:21:10
This is a very strange error.

Would it be acceptable for you to send me a compiled game exe for testing?
Title: Re: The object being pointed to is not in the managed object pool
Post by: nightmarer on Wed 03/03/2021 20:33:57
Hi.

I've been trying to build an exe file, but I don't know why I am getting an error in this compiled file which I don't having while playing the game from AGS.
As soon as I got it I'll get back to you.

Regards.
Title: Re: The object being pointed to is not in the managed object pool
Post by: Monsieur OUXX on Sat 06/03/2021 19:46:38
@nightmarer, don't let this die.
Title: Re: The object being pointed to is not in the managed object pool
Post by: nightmarer on Sat 13/03/2021 16:53:23
Thank you, Monsieur.

I've been really busy during last weeks.
I want to first finish some parts of the game before I show any game file.

Regards.
Title: Re: The object being pointed to is not in the managed object pool [SOLVED]
Post by: nightmarer on Thu 01/04/2021 23:06:45
Hi, this error has been fixed in the new version 3.5.1.
Thank you very much!
Title: Re: The object being pointed to is not in the managed object pool [SOLVED]
Post by: Crimson Wizard on Fri 02/04/2021 13:20:37
Tbh I suspect the bug might still be there, but a situation that was causing it is no longer taking place in 3.5.1.