Sascha
March 27, 2025, 8:27am
1
Hello,
when i use the audio encoder directly from the Tonies Menu (left panel) the creation of .taf files works like it should.
However, when i go to library and upload there the same .mp3 files first, mark them and click convert, the following error occured:
TypeError: undefined has no properties
Teddycloud latest_debian on raspberry pi 3B.TeddyCloud v0.6.4 (f13703a) - 2025-03-05 08:01:37
Please check the teddycloud logs directly (docker logs)
Sascha
March 27, 2025, 2:11pm
3
Here is the output of docker logs teddycloud. I uploaded a file and then i wanted to convert this file. right after i push the convert button:
docker logs --since 1m --details teddycloud
INFO |handler_api.c:0952:file_save_start| Writing to '/teddycloud/data/library/Pettersson und Findus - Der Raketenkater_001_joined.mp3'
INFO |server_helpers.c:0484:multipart_handle| Received file 'Pettersson und Findus - Der Raketenkater_001_joined.mp3'
=================================================================
==8==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x007f91f99430 at pc 0x0055945a2098 bp 0x007f91f978c0 sp 0x007f91f97908
WRITE of size 32768 at 0x007f91f99430 thread T2
#0 0x55945a2094 in __interceptor_memset (/usr/local/bin/teddycloud+0x632094)
#1 0x55946a1550 in parsePostData src/handler_api.c:31
#2 0x55946b80e0 in handleApiEncodeFile src/handler_api.c:1942
#3 0x5594708680 in httpServerRequestCallback src/server.c:483
#4 0x559485dfe0 in httpConnectionTask src/cyclone/cyclone_tcp/http/http_server.c:541
#5 0x7f97c8ee8c (/lib/aarch64-linux-gnu/libc.so.6+0x7ee8c)
#6 0x7f97cf7b18 (/lib/aarch64-linux-gnu/libc.so.6+0xe7b18)
Address 0x007f91f99430 is located in stack of thread T2 at offset 4544 in frame
#0 0x55946b7f6c in handleApiEncodeFile src/handler_api.c:1932
This frame has 8 object(s):
[32, 40) 'rootPath' (line 1934)
[64, 72) 'current_source' (line 1996)
[96, 112) 'overlay' (line 1933)
[128, 384) 'message' (line 1963)
[448, 4544) 'post_data' (line 1941)
[4672, 8768) 'source' (line 1951) <== Memory access at offset 4544 partially underflows this variable
[8896, 12992) 'target' (line 1952) <== Memory access at offset 4544 partially underflows this variable
[13120, 418624) 'multisource' (line 1949) <== Memory access at offset 4544 partially underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
Thread T2 created by T0 here:
#0 0x55945a3cd4 in __interceptor_pthread_create (/usr/local/bin/teddycloud+0x633cd4)
#1 0x5594a5ea48 in osCreateTask src/cyclone/common/os_port_posix.c:87
#2 0x559485ab4c in httpServerStart src/cyclone/cyclone_tcp/http/http_server.c:233
#3 0x559470fb5c in server_init src/server.c:862
#4 0x559457c248 in main src/main.c:610
#5 0x7f97c3773c (/lib/aarch64-linux-gnu/libc.so.6+0x2773c)
#6 0x7f97c37814 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x27814)
#7 0x55945819ac in _start (/usr/local/bin/teddycloud+0x6119ac)
SUMMARY: AddressSanitizer: stack-buffer-overflow (/usr/local/bin/teddycloud+0x632094) in __interceptor_memset
Shadow bytes around the buggy address:
0x001ff23f3230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff23f3240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff23f3250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff23f3260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff23f3270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x001ff23f3280: 00 00 00 00 00 00[f2]f2 f2 f2 f2 f2 f2 f2 f2 f2
0x001ff23f3290: f2 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00
0x001ff23f32a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff23f32b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff23f32c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff23f32d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==8==ABORTING
Running teddycloud...
TeddyCloud v0.6.4 (f13703a) - 2025-03-05 08:01:37 +0000 debian linux-aarch64(64)
INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/private.der' detected as DER style RSA PRIVATE KEY
INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.ini
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY
INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/private.der' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0390:tls_adapter_init| Loading certificates...
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 5216232
=================================================================
==8==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x007fb1999430 at pc 0x005557242098 bp 0x007fb19978c0 sp 0x007fb1997908
WRITE of size 32768 at 0x007fb1999430 thread T2
#0 0x5557242094 in __interceptor_memset (/usr/local/bin/teddycloud+0x632094)
#1 0x5557341550 in parsePostData src/handler_api.c:31
#2 0x55573580e0 in handleApiEncodeFile src/handler_api.c:1942
#3 0x55573a8680 in httpServerRequestCallback src/server.c:483
#4 0x55574fdfe0 in httpConnectionTask src/cyclone/cyclone_tcp/http/http_server.c:541
#5 0x7fb770ee8c (/lib/aarch64-linux-gnu/libc.so.6+0x7ee8c)
#6 0x7fb7777b18 (/lib/aarch64-linux-gnu/libc.so.6+0xe7b18)
Address 0x007fb1999430 is located in stack of thread T2 at offset 4544 in frame
#0 0x5557357f6c in handleApiEncodeFile src/handler_api.c:1932
This frame has 8 object(s):
[32, 40) 'rootPath' (line 1934)
[64, 72) 'current_source' (line 1996)
[96, 112) 'overlay' (line 1933)
[128, 384) 'message' (line 1963)
[448, 4544) 'post_data' (line 1941)
[4672, 8768) 'source' (line 1951) <== Memory access at offset 4544 partially underflows this variable
[8896, 12992) 'target' (line 1952) <== Memory access at offset 4544 partially underflows this variable
[13120, 418624) 'multisource' (line 1949) <== Memory access at offset 4544 partially underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
Thread T2 created by T0 here:
#0 0x5557243cd4 in __interceptor_pthread_create (/usr/local/bin/teddycloud+0x633cd4)
#1 0x55576fea48 in osCreateTask src/cyclone/common/os_port_posix.c:87
#2 0x55574fab4c in httpServerStart src/cyclone/cyclone_tcp/http/http_server.c:233
#3 0x55573afb5c in server_init src/server.c:862
#4 0x555721c248 in main src/main.c:610
#5 0x7fb76b773c (/lib/aarch64-linux-gnu/libc.so.6+0x2773c)
#6 0x7fb76b7814 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x27814)
#7 0x55572219ac in _start (/usr/local/bin/teddycloud+0x6119ac)
SUMMARY: AddressSanitizer: stack-buffer-overflow (/usr/local/bin/teddycloud+0x632094) in __interceptor_memset
Shadow bytes around the buggy address:
0x001ff6333230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff6333240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff6333250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff6333260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff6333270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x001ff6333280: 00 00 00 00 00 00[f2]f2 f2 f2 f2 f2 f2 f2 f2 f2
0x001ff6333290: f2 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00
0x001ff63332a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff63332b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff63332c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x001ff63332d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==8==ABORTING
Running teddycloud...
TeddyCloud v0.6.4 (f13703a) - 2025-03-05 08:01:37 +0000 debian linux-aarch64(64)
INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/private.der' detected as DER style RSA PRIVATE KEY
INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.ini
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY
INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/48ca4340ac80/private.der' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0390:tls_adapter_init| Loading certificates...
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 5216232
Sascha
March 29, 2025, 12:21pm
4
Is it helpul, may i open a ticket somewhere else? Is there a workaround? Because i would load all mp3 files to the library and use the taf conversion in this way. as i have a lot of files to convert
Innos
March 31, 2025, 8:11am
5
If you have a lot files to be converted I would go with the Windows docker Version of audio2tonie and convert using your desktop as the raspberry will take ages to convert.
Never the less I agree that the Button should not dump
See: HowTo: convert audio to TAF fast and easy (macOS/Linux) - #4 by marco79cgn
1 Like