Connecting to signal of a GstElement errors with "too much recursion"
System information
OS = ArchLinux
gjs version = 1.76.2
Bug information
Steps to reproduce
Run this code
const { Gst, GLib } = imports.gi;
Gst.init(null);
const pipelineStr = 'pulsesrc ! audioconvert ! audio/x-raw,format=S16LE,rate=44100,channels=2 ! appsink name=analysis_sink caps=audio/x-raw,format=S16LE,rate=44100,channels=2 emit-signals=true';
const pipeline = Gst.parse_launch(pipelineStr);
const analysisSink = pipeline.get_child_by_name('analysis_sink');
function analyzeAudio(appsink, data) {
console.log('trying to pull buffer');
return Gst.FlowReturn.OK;
}
analysisSink.connect('new-sample', analyzeAudio);
pipeline.set_state(Gst.State.PLAYING);
const mainLoop = GLib.MainLoop.new(null, false);
mainLoop.run();
pipeline.set_state(Gst.State.NULL);
Current behaviour
(gjs:4083): Gjs-CRITICAL **: 16:13:57.039: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.049: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.059: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.069: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.079: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.089: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.099: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.109: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.119: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.129: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.139: JS ERROR: too much recursion
@test.js:13:10
(gjs:4083): Gjs-CRITICAL **: 16:13:57.149: JS ERROR: too much recursion
@test.js:13:10
Expected behaviour
The callback function should be called.
Edited by Raihan