Closed hatchjaw closed 1 year ago
The problematic code is there https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/gui/MapUI.h#L159 and https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/gui/MapUI.h#L179. So we may have to do something like:
#ifdef TEENSY_DRIVER
Serial.printf(...) // to complete
#else
fprintf(stderr, "ERROR : setParamValue '%s' not found\n", str.c_str());
#endif
Same for getParamValue
.
Can you possibly try in this direction ?
Thanks. I was thinking it might be preferable to inherit from MapUI (e.g. TeensyMapUI) and override get
/setParamValue
, but I see that if MIDICTRL is defined there are a large number of further calls to fprintf
, inserted from SimpleParser
, dsp-adapter
, etc.
So, I've submitted a PR that uses the preprocessor to substitute fprintf
with Serial.printf
.
Even better, thanks for the PR.
For a faust program with, e.g.
then from a Teensy sketch calling
Teensy reboots and produces a crash report:
Running
addr2line
returns Teensy'sPrint.cpp
, but not the line number.This appears to be an issue with the call to
fprintf
inget
/setParamValue()
. In this ancient thread from the PJRC forum, Paul Stoffregen strongly advises usingSerial.printf
instead. Likely this still applies.Minimal example to reproduce attached. param-crash-test.tar.gz
Thanks!