Forums > Jitter

Problem on passing argument lists into jit.gl.lua


Oct 10 2013 | 9:53 am

Hi, guys

Max 6 crashes when argument lists (> 83 elements) are passed into "jit.gl.lua" in a short time.

Acturally I would like to pass arguments list, which has 128 elements, into "jit.gl.lua" in each 20 milliseconds.

Does anyone have same problem? How to manage it?

Any help would be appreciated. Thank u :)

Sample Code

{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 3,
"architecture" : "x86"
}
,
"rect" : [ 837.0, 372.0, 374.0, 260.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 0,
"gridsize" : [ 15.0, 15.0 ],
"gridsnaponopen" : 0,
"statusbarvisible" : 2,
"toolbarvisible" : 1,
"boxanimatetime" : 200,
"imprint" : 0,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"boxes" : [ {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-5",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 206.0, 36.0, 32.5, 18.0 ],
"text" : "84"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-9",
"maxclass" : "number",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "int", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 144.0, 36.0, 50.0, 20.0 ]
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-7",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 117.0, 111.0, 57.0, 20.0 ],
"text" : "thresh 0."
}

}
, {
"box" : {
"id" : "obj-6",
"maxclass" : "button",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 117.0, 36.0, 20.0, 20.0 ]
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-4",
"linecount" : 4,
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 57.0, 146.0, 51.0, 58.0 ],
"text" : "1 2 3 4 5 6 7 8 9 10 11 12"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-2",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 3,
"outlettype" : [ "bang", "bang", "int" ],
"patching_rect" : [ 117.0, 74.0, 46.0, 20.0 ],
"text" : "uzi 64"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-1",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 117.0, 146.0, 146.0, 20.0 ],
"text" : "jit.gl.lua @file TestList.lua"
}

}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-7", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-2", 2 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-2", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-5", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-6", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-7", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-4", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-7", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-2", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-9", 0 ]
}

}
],
"dependency_cache" : [ ]
}

}

TestList.lua

function list(...)
local values = {...}
print("list", table.concat(values, ", "), "inlet", this.last_inlet)
end

Oct 21 2013 | 12:57 pm

I think that jit.gl.lua crashes max6, when i call lua function with large variable arguments on short interval. for example, when I send fft list data to lua.

Is there any solution for this problem?

Dec 12 2014 | 4:15 am

i had same problem while passing all kinect bones to a gl.lua, inserting a qlim 33 (kinect fps) before gl.lua fixed the crash

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > Jitter