Closed lllucius closed 10 years ago
Hi Illicus, thanks for the bug report. Can you tell me which program you're attempting to use kn0ckout with so I can reproduce?
On 5/25/2014 6:13 PM, Jeremy Salwen wrote:
Hi Illicus, thanks for the bug report. Can you tell me which program you're attempting to use kn0ckout with so I can reproduce? Howdy,
I originally tried with a self built svn version of Audacity. But, I'd be happy to try others if you want. In case it matters, Audacity build is based on:
lilv-0.16.0
lv2-1.6.0
msinttypes-r29
serd-0.18.2
sord-0.12.0
sratom-0.4.2
All other LV2 plugs I've tried with Audacity have worked fine, but kn0ck0ut fails here:
//Latency works out to be exactly the fft size.
*p(p_latency)=gfftSize;
When using the kn0ck0ut that ships with Fedora 20, the stack trace looks like:
sampleFrames=524288) at kn0ck0ut6.cpp:212
sample_count=524288) at ../lib-src/lv2/include/lilv/lilv.h:1626
count=0, left=0x1cc4770, right=0x0, lstart=0, rstart=0, len=1323000) at effects/lv2/LV2Effect.cpp:532
effects/lv2/LV2Effect.cpp:414
parent=0x17e1260, flags=33, projectRate=44100, list=0x18068b0, factory=0x1833bc0, t0=0x17e15a0, t1=0x17e15a8, params=...) at effects/Effect.cpp:146
type=33, f=0x17d6ca0, params=..., saveState=true) at Menus.cpp:2725
They call their kn0ck0ut version:
lv2-kn0ck0ut-1.1-4.0.giteaeb2d90.fc20.x86_64
I've verified that their line 212 is the same line in github.
Leland
This appears to be an audacity bug. The problem is that audacity is connecting the latency output port to NULL. This port is not optional on kn0ck0ut, and so they are not allowed to do that. A workaround would be to check if it's null before writing to it, and to make the port optional, which would be backwards compatible. I'm going to do this, but I'd suggest filing a report with audacity as well.
On 5/26/2014 12:32 AM, Jeremy Salwen wrote:
This appears to be an audacity bug. The problem is that audacity is connecting the latency output port to NULL. This port is not optional on kn0ck0ut, and so they are not allowed to do that. A workaround would be to check if it's null before writing to it, and to make the port optional, which would be backwards compatible. I'm going to do this, but I'd suggest filing a report with audacity as well. Thanks, will do.
Leland
I've committed the change to master
On 5/26/2014 7:17 PM, Jeremy Salwen wrote:
I've commited the change to master Thanks much. I'll grab a new copy now.
Leland
I've built it myself and have tried the Fedore 20 version and both crash. It happens when on line 212 in kn0ck0out.cpp:
Don't know why really. Even if you simply try to print the value with something like:
printf("latency = %f\n", *p(p_latency));
It still crashes.
The generated peg file seems to be "okay", but I don't know LV2 plugins so take that with a grain of salt. Here's the peg file:
ifndef kn_ck_ut_peg
define kn_ck_ut_peg
ifndef PEG_STRUCT
define PEG_STRUCT
typedef struct { float min; float max; float default_value; char toggled; char integer; char logarithmic; } peg_data_t;
endif
/* urn:St3pan0va.plugins.kn0ck0ut.1.1 */
static const char p_uri[] = "urn:St3pan0va.plugins.kn0ck0ut.1.1";
enum p_port_enum { p_left, p_right, p_outl, p_outr, p_mode, p_lowcut, p_highcut, p_decay, p_blur, p_windowsize, p_overlapf, p_phase, p_latency, p_n_ports };
static const peg_data_t p_ports[] = { { -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 }, { -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 }, { -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 }, { -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 }, { -3.40282e+38, 3.40282e+38, 0, 0, 0, 0 }, { 0, 128, 0, 0, 0, 0 }, { 0, 1, 0, 0, 0, 0 }, { 0, 127, 0, 0, 0, 0 }, { 0, 24, 0, 0, 0, 0 }, { 4, 65536, 8192, 0, 0, 0 }, { 1, 32, 2, 0, 0, 0 }, { -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 }, { -3.40282e+38, 3.40282e+38, -3.40282e+38, 0, 0, 0 }, };
endif /* kn_ck_ut_peg */