Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
15.04k stars 3.25k forks source link

Using -D WLED_ENABLE_DMX when audio is included result in compile failure #4298

Open dosipod opened 20 hours ago

dosipod commented 20 hours ago

What happened?

When compiling -D WLED_ENABLE_DMX and the audio usermod is also included ( it is there by default now ) you would get the error image

Compile is fine if the audio usermod is disabled I have no dmx fixture to verify functionally afterword but just helping someone with the compile so not sure that is expected or not

To Reproduce Bug

Use -D WLED_ENABLE_DMX on 15.0-b7

Expected Behavior

No failure

Install Method

Self-Compiled

What version of WLED?

0.15.0-b7 (build 2410270)

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

softhack007 commented 18 hours ago

@dosipod thanks, interesting find

This message was actually not added by me 🤔

20241121_192028

@blazoncek do you remember why you've added this error? Does DMX output require I2S ?

blazoncek commented 16 hours ago

I no longer remember why, but it was definitely intentional. As DMX is not a default feature I would assume that the person compiling would understand the message and remove audioreactive usremod from compilation. This is true for some other compile settings as well.

dosipod commented 15 hours ago

netmindz mentioned that when using dmx that the unit might be not used for anything else even led output ( I see the unit crashes when i use led output ) so might be the case its dmx only unit

netmindz commented 12 hours ago

DMX output is just serial output so I don't think it's a conflict but perhaps more an issue of lack of CPU time

dosipod commented 10 hours ago

I went back to v0.14.4 to compare and the audio usermod seems to be working fine with dmx out enabled and I do not see any issue when enabling led output so must be a reason for the change on 15.0-b7

dosipod commented 9 hours ago

The behavior we see is as follows ( before we try softhack fix ) :

A) On 14.4 with dmx out enabled and AR included : A.1) Enabling AR does not seem to cause any issue at least for audio sync . A.2) Setup of led output also works fine with dmx out (Proxy Universe set to 0 then fps is very low) and (Proxy Universe set to 1 then fps is normal ) ,we can change Proxy Universe back and forth without any issue

B) On 15.0-b7 with dmx out enabled and AR disabled : If you setup led output and try to change Proxy Universe from 1 to 0 then you will see a crash ( not enabled debug yet to keep changes to minimum )

[06:49:49]Rebooting...
[06:49:49]ets Jun  8 2016 00:22:57
[06:49:49]
[06:49:49]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[06:49:49]configsip: 0, SPIWP:0xee
[06:49:49]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[06:49:49]mode:DOUT, clock div:2
[06:49:49]load:0x3fff0030,len:1184
[06:49:49]load:0x40078000,len:12784
[06:49:49]load:0x40080400,len:3032
[06:49:49]entry 0x400805e4
[06:49:50]Ada
[06:49:50]Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
[06:49:50]Core 1 register dump:
[06:49:50]PC      : 0x400813d7  PS      : 0x00060c30  A0      : 0x800e92d3  A1      : 0x3ffb1ec0  
[06:49:50]A2      : 0x3f000000  A3      : 0x00060c20  A4      : 0x4008e90f  A5      : 0x3ffb1ee0  
[06:49:50]A6      : 0x00050c23  A7      : 0x3ffb8058  A8      : 0x00000081  A9      : 0x3ffb1ea0  
[06:49:50]A10     : 0x000001fa  A11     : 0x00000000  A12     : 0x000001fa  A13     : 0x0000d100  
[06:49:50]A14     : 0x00000003  A15     : 0x00060c23  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
[06:49:50]EXCVADDR: 0x000000e5  LBEG    : 0x40002390  LEND    : 0x4000239f  LCOUNT  : 0x00000000  
[06:49:50]
[06:49:50]ELF file SHA256: 0000000000000000
[06:49:50]
[06:49:50]Backtrace: 0x400813d4:0x3ffb1ec0 0x400e92d0:0x3ffb1ee0 0x40118dd8:0x3ffb1f40 0x40119302:0x3ffb1f90 0x401390fd:0x3ffb1fb0 0x4008c172:0x3ffb1fd0
[06:49:50]
[06:49:50]Rebooting...
[06:49:50]ets Jun  8 2016 00:22:57
[06:49:50]
[06:49:50]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[06:49:50]configsip: 0, SPIWP:0xee
[06:49:50]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[06:49:50]mode:DOUT, clock div:2
[06:49:50]load:0x3fff0030,len:1184
[06:49:50]load:0x40078000,len:12784
[06:49:50]load:0x40080400,len:3032
[06:49:50]entry 0x400805e4
[06:49:51]Ada
[06:49:51]Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
[06:49:51]Core 1 register dump:
[06:49:51]PC      : 0x400813d7  PS      : 0x00060c30  A0      : 0x800e92d3  A1      : 0x3ffb1ec0  
[06:49:51]A2      : 0x3f000000  A3      : 0x00060c20  A4      : 0x4008e90f  A5      : 0x3ffb1ee0  
[06:49:51]A6      : 0x00050c23  A7      : 0x3ffb8058  A8      : 0x00000081  A9      : 0x3ffb1ea0  
[06:49:51]A10     : 0x000001f8  A11     : 0x00000000  A12     : 0x000001f8  A13     : 0x0000d100  
[06:49:51]A14     : 0x00000003  A15     : 0x00060c23  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
[06:49:51]EXCVADDR: 0x000000e5  LBEG    : 0x40002390  LEND    : 0x4000239f  LCOUNT  : 0x00000000  
[06:49:51]
[06:49:51]ELF file SHA256: 0000000000000000
[06:49:51]
[06:49:51]Backtrace: 0x400813d4:0x3ffb1ec0 0x400e92d0:0x3ffb1ee0 0x40118dd8:0x3ffb1f40 0x40119302:0x3ffb1f90 0x401390fd:0x3ffb1fb0 0x4008c172:0x3ffb1fd0
[06:49:51]
[06:49:51]Rebooting...
dosipod commented 8 hours ago

@softhack007 I can still see the crash now even after the fix by just setting led output with 256 leds with dmx enabled build . So seems the whole dmx is busted but I am going to leave this be as I have no fixture nor a real interest in DMX but still if you need us to test the crash part then that we could do

blazoncek commented 6 hours ago

@dosipod please use exception decoder when posting crash dumps. Without it they are almost meaningless. The only usable information from this crash dump is that it is caused by invalid pointer.

dosipod commented 6 hours ago

@blazoncek When I enabled debug there was nothing useful , might be you could give that a shot