v1.72 playSound crash

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

v1.72 playSound crash

Post by Svengali »

System: WIN

Today I've started to work on Localhero again and it uses some sounds as a communication. It doesn't work anymore (possibly all sounds now go through customsounds.plist?) and using

Code: Select all

> this.s = new SoundSource;
[SoundSource sound=(nil), loop=NO, repeatCount=1, not playing]
> this.s.playSound('hit.ogg');
in the console results in a immediate shutdown of Oolite without anything in the logs.

BTW: Declaring the same KEY in different plists (descriptions and customsounds) also crashes Oolite
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: v1.72 playSound crash

Post by JensAyton »

Svengali wrote:

Code: Select all

> this.s = new SoundSource;
[SoundSource sound=(nil), loop=NO, repeatCount=1, not playing]
> this.s.playSound('hit.ogg');
This should work (and does for me). As a further test, could you try this to see where it fails:

Code: Select all

this.s = new SoundSource;
this.s.sound = "hit.ogg";
this.s; // should print sound info
this.s.play();
Svengali wrote:
BTW: Declaring the same KEY in different plists (descriptions and customsounds) also crashes Oolite
You mean putting “foo = x;” in descriptions.plist and “foo = y;” in customsounds.plist? I’m sorry, but I find this quite hard to believe. I think you’ve misdiagnosed the cause of the problem. I suspect you’ll find that one of the key/value pairs is causing the problem, probably due to a formatting error. (Breaking descriptions.plist will cause Oolite to fail to load.)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: v1.72 playSound crash

Post by Svengali »

Ahruman wrote:
As a further test, could you try this to see where it fails:

Code: Select all

this.s = new SoundSource;
this.s.sound = "hit.ogg";
this.s; // should print sound info
this.s.play();
This works, it gets the right OO-Class, the right sound and plays it correctly. I'll test it a little bit more, because on the first try sound was nil, the other 5 times everything was ok. I've also tried it with other sounds and that was working very well. Muchas gracias, Ahruman.

Edit: Tried it a few more times and everything works with this way. The first time was propably a somehow confused JS-Engine, because of the problems before. playSound crashes like before.
Ahruman wrote:
Svengali wrote:
BTW: Declaring the same KEY in different plists (descriptions and customsounds) also crashes Oolite
You mean putting “foo = x;” in descriptions.plist and “foo = y;” in customsounds.plist? I’m sorry, but I find this quite hard to believe. I think you’ve misdiagnosed the cause of the problem. I suspect you’ll find that one of the key/value pairs is causing the problem, probably due to a formatting error. (Breaking descriptions.plist will cause Oolite to fail to load.)
Probably you are right :-) I'm often playing with these things to see what happens if someone does it by accident and to understand Oolite a little bit better.

Edit: Tried it also and failed to repeat the crash.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6630
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The initial case reported by Svengali works for me in the trunk/maintenance versions, crashes on the 1.72 release. As I seem to recall, the bug was probably corrected at the time of the mute trumbles fix.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

another_commander wrote:
The initial case reported by Svengali works for me in the trunk/maintenance versions, crashes on the 1.72 release. As I seem to recall, the bug was probably corrected at the time of the mute trumbles fix.
Great, another_commander :-)

Does it mean that v1.72.1 comes the next days?
Post Reply