audio analyser crashes

Post your questions here and we'll all try to help.
mfo
Posts: 350
Joined: Fri Oct 08, 2004 11:48

Post by mfo »

I've not experienced any other problem yet.
But im already too deep into flash8 to switch back to old version.
cacheAsBitmap(), the blendmodes or the new videocodec are too sexy to live without it.

continuity-B
Posts: 295
Joined: Sat Jan 15, 2005 18:24
Location: Glasgow

Post by continuity-B »

Never mind then, I'll need to go back and see what the problem was then because i'd love to use 8 in res

mfo
Posts: 350
Joined: Fri Oct 08, 2004 11:48

Post by mfo »

Maybe an interessting sidenote for bart&edwin:
I was (unsucessfully) trying to find a better work-around for this analyzer crash problem and found out that the crash even happens when i don't use resolumes audio variables at all.

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Post by edwin »

Hi,
we experienced the crash as well. And not allways when using flash, so it seems it is not direclty related to flash playback but i'm not 100% sure.
The bug is on our list, and i don't have any other workaround then 'mfo' mentioned. (reselect the audio source in the preferences window).
if you have any other clue why en when this bug appears let us know.

Cheers
Edwin

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Post by edwin »

Hi all,
well we did some testing and found out what is happening.
We know that flash can make the audio analyzer crash.
There still might be other situations that crash the audio anlyzer but flash 8 can cause problems for sure.

If you use actionscript in flash 8 and you happen to make mistakes in the code. Those mistakes are somehow since flash version 8 routed to the host. Let's say you make the mistake by dividing a number by zero, wich is a common mistake in programming, flash will generate an error saying that the script made an illegal operation.
If this happends a lot of times, finally somehow Resolume's audio thread is interrupted and stops.

This divide by zero error will probably happen a lot when you use the Resolume variables in your flash movie. All variables range from 0 to 100. The audio variables will often have a value of zero, so let's say you do this:

_root.mc_clip._xscale = 100 / raudioleftmid;

this will generate an error when the variable 'raudioleftmid' has a value of 0.
You can prevent this in different ways, one is this:

_root.mc_clip._xscale = Math.max(1,100 / raudioleftmid);

problem with this is that _xscale will never be zero of course.
another solution is this:

if (raudioleftmid > 0) {
_root.mc_clip._xscale = Math.max(1,100 / raudioleftmid);
} else {
_root.mc_clip._xscale = 0;
}
this is the best solution but requires more code.

so it's a flash 8 actionscript problem, no matter if you use actionscript version 1 or 2. If you don't need the version 8 functionality, just publish your file as flash 7.

We will try wether we can fix this for the new release.
let me know wether you experience the audio analyzer crash also in other situations.

Cheers
Edwin

mfo
Posts: 350
Joined: Fri Oct 08, 2004 11:48

Post by mfo »

Hmm, but i do nothing but a
mysound=Number(raudiolow);
in flash. All further operation are done with this variable and they are done without any bug messages in flashs debug-enviroment nor in the tracer. (When outside Resolume, my films generate values themselves, put into 'mysound'.)

Can there be other reasons why Flash outputs too much infos to the host app? Maybe because heavy movies quite often don't reach their fps ??
Or could you maybe even build a debug/message console into Resolume, one similar to the info console i get by pressing Alt+Ctrl+I ?!

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Post by edwin »

Hi Mfo,

mysound=Number(raudiolow);
what else do you do with this number, i guess you use mysound somewhere else?
i don't get any sensible input from flash, only when it goes wrong it will generate execpetions in Resolume. There is no more info then that i'm afraid. Could you send me a flash file you made for me to have a look at.

you can send it to: edwin@resolume.com

Cheers
Edwin

mfo
Posts: 350
Joined: Fri Oct 08, 2004 11:48

Post by mfo »

Hi Edwin

Ah, hm, that's not so easy as i'm using my own "tool" inside Resolume.
The main part of my tool runs as a flashmovie on one or more Resolume layers, loads footage clips, shows those, does the sound calculations and so on. The controller part of my tool runs outside resolume stand-alone in a projector and is basically a control interface. This controller talks with the main tool via "local connect" -a Flash feature for connections between several players on a local host (Could that be the problem??? It was working without probs in past versions of Flash and Resolume).
My Tool consists of a huge amount of code. Only the sound functions are about 300 lines of code, you probably don't want to work yourself into it ;)


The main tool does several things with the sound variables, like checking versus a threshold:
sound_high=(mysound>50);
Plus it saves the old values and calculates highest and lowest values measured in the last 25 or 50 frames. But anyway, i have a switch in it, using several mathematical functions instead of Resolumes sound input. And even if i do wrong things with these function, like letting those return -1 or "undefined" or "null", even than i don't get errors or warnings in Flashs debug console.


This is a really mixed up situation. How can we simulate what is going on with the Flashplayer?
I would appreciate any kind of debug/error/logging message.

Best,
Marcel // MFO

[Edited on 9-5-2006 by mfo]

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Post by edwin »

Hi Mfo,
My Tool consists of a huge amount of code. Only the sound functions are about 300 lines of code, you probably don't want to work yourself into it ;)
No i probably dont't ;)
We have been working on the audio part and we got it working much better. The responsiveness has been greatly improved. And i haven't experienced the audio crash anymore.
But i still get exceptions in resolume when playing certain flash movies. Stil lhaven't figured out how to prevent this. And i don't know if this audio crash really is fixed.
This is a really mixed up situation. How can we simulate what is going on with the Flashplayer?
I would appreciate any kind of debug/error/logging message.
Well it's hard, i tried making actionscripts that would make the audio analyzer crash but i couldn't. So i haven't found a way yet to do debugging in a proper way.
Maybe you have some script from what you know can cause problems?

I will probably post a new beta version again this week. We are very happy with audio responsivess so far in this new version.

Cheers
Edwin

mfo
Posts: 350
Joined: Fri Oct 08, 2004 11:48

Post by mfo »

Sounds good! Would be great to have the new beta before saturday as i have a gig there and could test it under live conditions.
(You know, strange bugs ALWAYS happen live and never at home ;) )

Tonight i will try some "containered" files. These are strongly reduced, almost non-interactive versions of my tool, made to replay only one clip. If i can reproduce the analyzer crash with those, i'll send you one.

Post Reply