Hi
My latest game is being tested.
The game runs fine without any crashes or errors yet the 'Tester' says it crashes on the India location when you first enter the room, he says it may be a null pointer on fade in.
I only have a music play and a line of text at fade in.
Could someone just check from their end and see what happens when they go to India.
http://www.mediafire.com/?l12o74fxc48m7m5
As I say, it seems to play ok my end.
Only Sudan and India are available at present.
Cheers if you could take a peek and let me know.
steptoe
PS Debugs shows:
GUI On(1) ignored G 156 (already on)
Tried several times, found no problems entering India.
Quote from: »Arj0n« on Wed 22/02/2012 09:44:19
Tried several times, found no problems entering India.
Cheers ArjOn ;)
Could your tester post the error message? That might be helpful.
No problems here either.
My guess is it's sound related and the crash is due to a combination of the sound file and your tester's system.
Just tell him to turn off sound in winsetup and try again.
Thanks Khris
will ask him.
cheers
steptoe
No problem with arriving in india ;D
btw.
There is something strange about the sound when near the bees.
It sometimes changes from bees-sound to a sound of frogs!? ::)
Quote from: Tabata on Wed 22/02/2012 17:01:18
There is something strange about the sound when near the bees.
It sometimes changes from bees-sound to a sound of frogs!? ::)
America got killer bees, India got frog bees :)
Quote from: »Arj0n« on Wed 22/02/2012 17:06:10
Quote from: Tabata on Wed 22/02/2012 17:01:18
There is something strange about the sound when near the bees.
It sometimes changes from bees-sound to a sound of frogs!? ::)
America got killer bees, India got frog bees :)
lol when you have done the bees the sound returns to nature sounds like crickets and maybe there are frogs to etc etc that is why :)
Quote from: steptoe on Wed 22/02/2012 17:46:20
Quote from: »Arj0n« on Wed 22/02/2012 17:06:10
Quote from: Tabata on Wed 22/02/2012 17:01:18
There is something strange about the sound when near the bees.
It sometimes changes from bees-sound to a sound of frogs!? ::)
America got killer bees, India got frog bees :)
lol when you have done the bees the sound returns to nature sounds like crickets and maybe there are frogs to etc etc that is why :)
I vote for the frog bees, then ;D
(http://s14.directupload.net/images/user/120222/3hybj899.gif)
(because it changes without having done anything to the bees - i.e. while going through the inventory) ;)
I'll take a look
cheers
The first chapter (Sudan) doesn't give me a problem, but india crashes after fade in.
(http://i1228.photobucket.com/albums/ee455/nickynyce/error-1.png)
I tried to turn off the music, but the crash still happens. I also tried to turn off sound and music, but no good. :-\
Quote from: NickyNyce on Sat 25/02/2012 12:40:52
... india crashes after fade in.
I tried to turn off the music, but the crash still happens. I also tried to turn off sound and music, but no good. :-\
That doesn't sound good (http://www.smileyvault.com/albums/userpics/12962/sad.gif)
So if the problem is probably related to the system,
you need more informations about the testers versions, right?
Here are mine:
laptop (Medion)
Windows Vista HP, SP 2, 32 bit
IntelCore 2 Duo CPU
nvidia GeForce 9600M GS 256 MB
Hope it helps to solve the problem - (http://www.smileyvault.com/albums/userpics/12962/goodluck.gif)
steptoe, could you post line 158 and the surrounding ones?
Hi
Khris & NickyNyce,
strange but line 158 was a Hotspot interact with a Display but on just looking the Hotspot Interact Events Panel Hotspot NO Interact was not assigned!! Weird...
This could have been the cause? Nothing else in that Event.
I'll compile game now and see if that helps.
cheers everyone
steptoe
Hi
Is there anyway that
AudioChannel *channel = aExplosion.Play();
Wait(40);
channel.Volume = 100;
Could cause a system error?
steptoe
Quote from: steptoe on Sun 26/02/2012 15:02:34
Is there anyway that ... Could cause a system error?
You are playinga sound, wait a second, and then change the sound's volume.
Does the sound play longer then a second? If not, you are trying to change the volume of a sound that, for AGS, doesn't exist (a null pointer), so yes, that could be the problem- IIRC you can't refer to pointers that have been nulled.
Change the last bit to:
if (channel.IsPlaying())
channel.Volume = 100;
and try again. It's a pretty simple failcheck, and I use it constantly when dealing with pointers.
Hi Ghost
I think the I chose Volume property (audio channel) as the Music was a bit low. Maybe I should have used Volume property (system) instead.
By the way, the sound does change from music 1 to music 2 then back to music 1 after an event.
Though most people found it alright someone had crashing problems with the music.
Between a rock and a hard place as it were.
Anyhow have taken off Volume property (audio channel) and just scripted as music.play.
Fingers crossed.
cheers
steptoe
I'm wondering if there is anything I can do on my side. I have a brand new HP home computer, 64 bit, 8.00 GB...I have no idea why I'm the only one that's getting this error. Could it be something to do with my sound card?
Like I mentioned before, I have never had a problem playing any music or sound in any AGS game.
Quote from: NickyNyce on Sun 26/02/2012 19:34:30
Could it be something to do with my sound card?
The error message clearly states a null pointer reference, which means a command tries to access something that is not there. That's not something caused by the soundcard.
steptoe: Adjusting volume on the fly is no problem as long as the sound/music file you are referring to is referenced. Again, can it be that the sound is so short that it plays less than a second?
Ghost, No, both sounds actually last for about 10 seconds but looped as per music.
The error message line states line blah blah which was the Volume property (audio channel) line which I have now taken out. Not sure what else could cause someone to have these problem.
If you feel that this could be what is causing the problem perhaps I should look at changing the music files altogether for new ones?
I know this is probably the wrong place for this but it is on subject:
// room script file
function room_Load()
{
gIconbar.Transparency=0;
gIconbar.Visible=true;
region[2].Enabled=false;
}
function room_AfterFadeIn()
{
RemoveWalkableArea(2);
RemoveWalkableArea(4);
aBEES.Play();
object[0].SetView(60);
object[0].Animate(0, 4, eRepeat, eNoBlock);
cjonesy.Walk(45, 198, eBlock, eAnywhere);
cjonesy.Say("Agh! A massive beehive with lots of deadly bees! How am I going to get passed without being stung to death!!");
region[2].Enabled=true;
}
function region1_WalksOnto()
{
cjonesy.Say("I can't pass by without getting stung! I need those bees to buzz off!");
}
function oleaves_Look()
{
Display("You see some dead, dried leaves");
}
function oleaves_Interact()
{
Display("You could grab the dried leaves but you have a better idea!");
}
function oleaves_UseInv()
{
aBEES.Play();
if (cjonesy.ActiveInventory==ilighter)
{
region[1].Enabled=false;
RestoreWalkableArea(2);
cjonesy.Walk(112, 188, eBlock);
cjonesy.ActiveInventory=null;
cjonesy.LoseInventory(ilighter);
cjonesy.LockView(62);
cjonesy.Animate(2,4, eOnce, eBlock);
object[1].Visible=false;
cjonesy.UnlockView();
object[2].Visible=true;
object[2].SetView(61);
object[2].Animate(0, 4, eRepeat, eNoBlock);
object[2].Transparency=40;
object[0].Graphic=989;
aBEES.Stop();
//AudioChannel *channel =
aANIMALSOUNDS.Play();
// Wait(40);
// channel.Volume = 100;
cjonesy.AddInventory(ilighter, 20);
cjonesy.Walk(54,198, eBlock);
cjonesy.FaceLocation(104, 197);
cjonesy.SetWalkSpeed(10, 10);
cjonesy.Say("Now's my chance to shifty passed!");
cjonesy.Walk(311, 176, eBlock, eWalkableAreas);
cjonesy.Walk(340, 176, eBlock, eAnywhere);
cjonesy.ChangeRoom(18, 16, 190);
}
else
{
Display("As if that is going to help!");
}
}
function obees_Look()
{
Display("The beehive is huge!");
}
function obees_Interact()
{
Display("No way are you touching that beehive! There must be a way to shoo those bees away!");
}
function obees_UseInv()
{
Display("That would only aggreviate the bees to attack!");
}
function region2_WalksOnto()
{
cjonesy.Say("I can't go back. I must get the sacred tablet!");
}
function hHotspot1_Look()
{
Display("The Indian sky is clear and has an orangy colour");
}
function hHotspot2_Look()
{
Display("The Indian country is very overgrown with plants and is jungle like and stretches for miles. You can hear animals nearby");
}
function hHotspot2_Interact()
{
Display("It's best you keep to the path and not enter the jungle overgrowth unless you really have to!");
}
function hHotspot3_Look()
{
Display("The Indian path is just dried dust");
}
function room_RepExec()
{
}
cheers
steptoe
Hm. Looks solid, and I see no problems with the volume change. But you play aBees without parameters and later call aBees.Stop... that could actually be the offensive line. If I remember correctly you can only call Stop to a sound that is actually playing.
Regarding AudioChannel.Volume and null pointer errors:
I'm pretty sure that one can't call
channel.IsPlaying() to avoid a null pointer error that occurs due to
channel being null.
Because if that's the case,
channel.IsPlaying() will also throw that error.
The reason why it doesn't is that after the sound has finished playing, the AudioChannel will still be there, and so
channel will still point to something valid.
Changing the volume of a channel that isn't playing anything does nothing but won't throw an error either.
Now in the manual, in the example given for AudioChannel.Volume, it says:
AudioChannel *channel = aExplosion.Play();
Wait(40);
channel.Volume = 20;
Not only is the curious Wait(40) in there, but the pointer is also named "channel".
steptoe, it looks like you used a code example from the manual without really getting what it does. There's no need to Wait(40) if you just want to increase the volume of the sound you're trying to play.
Also, I can't make heads or tails of this:
Quote from: steptoe on Sat 25/02/2012 15:42:30strange but line 158 was a Hotspot interact with a Display but on just looking the Hotspot Interact Events Panel Hotspot NO Interact was not assigned!! Weird...
Could you please just post line 158 and surrounding ones, and mark line 158 somehow?
Hi Khris,
thanks for your informative answer.
I did not really need to use AudioChannel.Volume I should have used Volume property (system) instead.
I have since taken out all AudioChannel.Volume and have just used basic music.Play() so it does not seem to be relevant anymore.
Also, due to a revamp, the original line 158 has now GONE.
I understand more about volume channels and null pointers now, so next time i will keep this is mind.
I am presently waiting for an updated test report.
Thank you guys very much
steptoe