AGS Engine

Further development of AGS engine

Bug Issue: Null pointer error when sound is disabled in Winsetup

Pages: [1]

Dave Gilbert

  • Mittens Vassal
  • AGSer
  • Posts: 2,631
  • Hi. Our names are FRIGGING ADORABLE.
« on: 22 Feb 2018, 16:53 »
Like it says in the subject. When music and sound is disabled in winsetup, playing ANY sound from an audiochannel crashes the game with a "null pointer reference."

This does NOT appear to happen when you play sounds using the .Play() command. The error only occurs when you play from an audiochannel.

Crimson Wizard

  • AGSer
  • Posts: 8,594
« Reply #1 on: 22 Feb 2018, 17:06 »
Like it says in the subject. When music and sound is disabled in winsetup, playing ANY sound from an audiochannel crashes the game with a "null pointer reference."

This does NOT appear to happen when you play sounds using the .Play() command. The error only occurs when you play from an audiochannel.

The description of a problem does not seem right (you cannot play a sound from audiochannel), but I have a guess that you are speaking of a well known problem: Play function returns null AudioChannel* pointer if it could not play a sound.
This was always like that, and is intentional, not a bug. You must check AudioChannel pointer returned by Play command before using its functions and properties (like, modifying volume).
There is a sticky topic on this problem: http://www.adventuregamestudio.co.uk/forums/index.php?topic=52176.0

Whether this is a good design or not is a separate question. There were ideas mentioned in the past on how to improve this to make it easier to avoid crashes.
« Last Edit: 22 Feb 2018, 17:10 by Crimson Wizard »

Dave Gilbert

  • Mittens Vassal
  • AGSer
  • Posts: 2,631
  • Hi. Our names are FRIGGING ADORABLE.
« Reply #2 on: 22 Feb 2018, 19:40 »
Huh. Well, if it's not a bug then it's not a bug! Thanks for pointing out the thread.

Issue updated by Crimson Wizard
« Reply #3 on: 22 Feb 2018, 19:56 »
  • Status changed from New to Closed

Pages: [1]

Issue Details

  • Reported
    22 Feb 2018, 16:53
  • Updated
    22 Feb 2018, 19:56
  • View Status
    Public
  • Type
    Bug
  • Status
    Closed
  • Priority
    Normal
  • Version
    Adventure Game Studio 3.4, AGS 3.4.0, AGS 3.4.1
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Audio

Tags



Powered by: SMF Project Tools 0.5.4 © Niko Pahajoki 2007-2011