|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0 ![]() ![]() |
Loudness Compensator test request
Ok - I was screwing around... and upon loading this plugin - kX Mixer crashed...
And would crash when I try restarting kX Mixer... so, to avoid re-installing everything kX... I tracked down the kxfxloudness.kxl file in windows system32... and renamed the plugin to get kX mixer to stop crashing - and it worked. So, to retest this, I renamed he kxl file back (all I really did was add '.old' to the file name - so I would avoid making a mistake in renamimg it... Restart kX Mixer - and it says - 'error - would you like to un-register this plugin' or to that affect... anyways... now I wonder if I hosed my kX installation. Bottom line is I was hoping someone with 3545a could test that out for me and report back. I would just like to hear comfirmation that I hosed up my install be for I un-install / re-install everything (all them da plugins Ive collected) Thanks in advance. |
|
|
|
|
|
#2 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
I doubt that you hosed anything...
There seems to be a problem with that plugin in 3545b too ((crashes if you try to restart kxmixer with it loaded)). Double check the file name: kxfxloudness.kxl, or just unregister it (IIRC, even though kX asks if you want to unregister a plugin, it does not do so). .reg file to unregister that plugin: Code:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\kX\Plugins] "3e1bdfb8-b4c5-41ff-8b0c-82d9c529c079"=- "3e1bdfb8-b4c5-41ff-8b0c-82d9c529c079.name"=- [-HKEY_CURRENT_USER\Software\kX\Plugins\3e1bdfb8-b4c5-41ff-8b0c-82d9c529c079] |
|
|
|
|
|
|
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0 ![]() ![]() |
thanks Russ... yeah I meant 3545b...
*be gone cursed plugin *
|
|
|
|
|
|
#4 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Hehe
![]() You should probably let Eugene know (or maybe townkat) so that it can be fixed (or whatever). |
|
|
|
|
|
#5 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
I've taken a look in its sources - it seems to crash with division by zero -
most likely when set_all_params(default_params) is called (params[SETVOL_ID] is the one being ZERO (when it should not) and it is the last parameter being set to actual default value)
__________________
|
|
|
|
|
|
#6 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
[COLOR=Gray](Out of curiosity)[/COLOR] Any idea why that would only happen when restarting kxmixer (i.e. it does not crash on me when loading the plugin or clicking the reset button)?
|
|
|
|
|
|
#7 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
I think it happens just randomly - when plugin is loaded the memory of the "params" array is not initialized - so params[SETVOL_ID] can or cannot be 0 by occasion.
__________________
|
|
|
|
|
|
#8 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks for the explanation, I think I know what you mean. I did not see the sources anywhere, so I have not looked at them, but I have seen where this type of thing might occur in other plugins (when one parameter uses another parameter as part of it's calculations, before the other parameter has been initialized (maybe not same thing here, but same idea)).
|
|
|
|
|
|
#9 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
sources: KX Plugins
>when one parameter uses another parameter as part of it's calculations, before the other parameter has been initialized In general - it's OK - (in context of "lazy" set_all_params() implemented like there) - as in the last iteration we get all the parameters initialized. But of course only if invalid parameter values (in earlier iterations) do not cause crash (like that div-by-zero)
__________________
|
|
|
|
|
|
#10 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks for the link. Yup I see it... So the fix would be to memcpy the default_params into the _params array before set_all_params is callled within set_defaults (or probably better to copy the values in set_all_params)
Last edited by Russ; Aug 28, 2008 at 04:19 AM. |
|
|
|
|
|
#11 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
Yeah, i thought exactly of the same fix. Also after all - i would just put
Code:
if (params[SETVOL_ID] == 0)
params[SETVOL_ID] = !0;
![]() edit: oops...
__________________
Last edited by Max M.; Aug 28, 2008 at 08:29 AM. |
|
|
|
|
|
#12 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Yeah, that is a good idea...
Last edited by Russ; Aug 28, 2008 at 04:44 AM. |
|
|
|
|
|
#13 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
I am not sure if townkat still comes around here, so I added the suggested code changes (set_all_params).
Here is the modified source (includes .kxl compiled for 3545b). Last edited by Russ; Sep 2, 2008 at 08:51 PM. |
|
|
|
|
|
|
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0 ![]() ![]() |
awesome Russ... thank you...
|
|
|
|
|
|
#15 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
<edit>
Nevermind, I decided to leave it with just the memcpy in set_all_params. Last edited by Russ; Sep 2, 2008 at 08:56 PM. |
|
|
|
|
|
#16 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
[color=gray]mm, doesn't it have sync(ndx) after each set_param already?
(e.g. it is already synched after set_all_params w/o additional calls)[/color]
__________________
|
|
|
|
|
|
#17 | |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64 ![]() ![]() ![]() ![]() |
Quote:
for the _params array initialization? Those are only called once and prior to all the set_param stuff. |
|
|
|
|
|
|
#18 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
[color=gray]Well, if we are about "perfectization" i would rewrote the whole set_param there at all (first of all, i'd get off of copy-pastes and secondly removed division - to fix the problem itself and not fixing the symptoms
) And finally i'd renamed it from the "Timbre"! But who cares - whatever fix does the trick - who cares of how exactly. (IMHO) Too much attention to this one little plugin. [/color]
__________________
Last edited by Max M.; Sep 1, 2008 at 11:21 AM. |
|
|
|
|
|
#19 |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64 ![]() ![]() ![]() ![]() |
|
|
|
|
|
|
#20 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
catcha!
__________________
|
|
|
|
|
|
#21 | ||
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
Quote:
BTW: I did rename most of the files, etc, as if Eugene ends up using this code, I didn't think leaving it called timbre would be good (but other than that, I did try to leave most of the code intact). Last edited by Russ; Sep 2, 2008 at 08:38 PM. |
||
|
|
|
|
|
#22 | |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64 ![]() ![]() ![]() ![]() |
Quote:
Yes and I added that I would initialize that array in init() and *not* in set_all_params(). |
|
|
|
|
|
|
#23 | |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
When you set defaults or load a preset, you get a whole new set of values. set_all_params() calls set_param() for each parameter one at a time (as you know). The problem is that each parameter uses other parameters before their values would have been updated, thus they are using old (thus invalid) values (or in the case of the divide by zero error, uninitialized data) for their calculations, resulting in the calculations being invalid. Last edited by Russ; Sep 1, 2008 at 02:57 PM. |
|
|
|
|
|
|
#24 |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64 ![]() ![]() ![]() ![]() |
Ah yes, I see now. (weird coding
)Sorry, I stand correct! edit: And thus Max was right afterall; best to re-write the content of set_param(). Last edited by Lex Nahumury; Sep 1, 2008 at 07:25 PM. |
|
|
|
![]() |
| Thread Tools | |
|
|