HyperHDR: HyperHDR crashes after setting up adalight as LED controller
Steps to reproduce
Flash HyperSerialEsp8266.ino.d1_mini_WS821x_FIRSTLED_DISABLED.bin to ESP8266 CH340G Open HyperHDR webUI Setup LED Hardware:
- Controller Type:
adalight
- Output path:
/dev/ttyUSB0
- Baudrate:
2000000
- High speed serial AWA protocol with data integrity check :
true
Hit save settings
What is expected?
HyperHDR running
What is actually happening?
As soon as the settings is saved, HyperHDR crashes and restarts and crashes again, and this just goes on forever.
The following are the logs from hyperhdr -d
hyperhdr -d
GUI application
2021-10-10T22:09:28.049 MAIN : <INFO> Database path: '/home/pi/.hyperhdr/db/hyperhdr.db', readonlyMode = disabled
2021-10-10T22:09:28.049 MAIN : <INFO> Starting HyperHdr - 17.0.0.0, (HEAD detached at dec81c0) (Awawa-2a2ed8d/dec81c0-1631541363), built: Sep 15 2021:17:02:39
2021-10-10T22:09:28.049 MAIN : <DEBUG> main.cpp:360:main() | QtVersion [5.11.3]
2021-10-10T22:09:28.050 MAIN : <INFO> Set user data path to '/home/pi/.hyperhdr'
2021-10-10T22:09:28.055 DB : <INFO> Database opened: /home/pi/.hyperhdr/db/hyperhdr.db
2021-10-10T22:09:28.157 SETTINGSMGR : <INFO> Settings database initialized
2021-10-10T22:09:28.157 HYPERHDR : <INFO> Sound device is disabled
2021-10-10T22:09:28.198 V4L2:USB VIDEO: USB : <INFO> Cropping image: width=0 height=0; crop: left=0 right=0 top=0 bottom=0
2021-10-10T22:09:28.199 V4L2:USB VIDEO: USB : <INFO> Found capture device: /dev/video14
2021-10-10T22:09:28.200 V4L2:USB VIDEO: USB : <INFO> Found capture device: /dev/video15
2021-10-10T22:09:28.201 V4L2:USB VIDEO: USB : <INFO> Restarting video grabber is now blocked due to reloading of the configuration
2021-10-10T22:09:28.201 V4L2:USB Video: USB : <DEBUG> GrabberWrapper.cpp:415:handleSettingsUpdate() | Auto resume is: enabled
2021-10-10T22:09:28.201 V4L2:USB VIDEO: USB : <INFO> Cropping image: width=0 height=0; crop: left=0 right=0 top=0 bottom=0
2021-10-10T22:09:28.201 V4L2:USB Video: USB : <DEBUG> GrabberWrapper.cpp:42:setCecStartStop() | CEC keycode. Start: 0, stop: 0
2021-10-10T22:09:28.201 V4L2:USB VIDEO: USB : <DEBUG> Grabber.cpp:117:trySetWidthHeight() | Set new width: 640, height: 480 for capture
2021-10-10T22:09:28.201 V4L2:USB VIDEO: USB : <DEBUG> Grabber.cpp:262:setWidthHeight() | setWidthHeight preparing to restarting video grabber 0
2021-10-10T22:09:28.201 V4L2:USB VIDEO: USB : <INFO> Delayed restart of the grabber due to change of the capturing resolution
2021-10-10T22:09:28.202 V4L2:USB VIDEO: USB : <INFO> Delayed restart of the grabber due to change of the framerate
2021-10-10T22:09:28.202 V4L2:USB VIDEO: USB : <DEBUG> Grabber.cpp:186:setBrightnessContrastSaturationHue() | Set brightness to -11, contrast to 148, saturation to 180, hue to 0
2021-10-10T22:09:28.202 V4L2:USB VIDEO: USB : <INFO> Delayed restart of the grabber due to change of the Brightness/Contrast/Saturation/Hue
2021-10-10T22:09:28.202 V4L2:USB VIDEO: USB : <DEBUG> V4L2Grabber.cpp:98:setHdrToneMappingEnabled() | setHdrToneMappingMode to: Disabled
2021-10-10T22:09:28.202 V4L2:USB VIDEO: USB : <DEBUG> Grabber.cpp:140:setFpsSoftwareDecimation() | setFpsSoftwareDecimation to: 1
2021-10-10T22:09:28.202 SIGNAL_OLD : <DEBUG> DetectionManual.cpp:85:setSignalDetectionOffset() | Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
2021-10-10T22:09:28.202 SIGNAL_OLD : <DEBUG> DetectionManual.cpp:75:setSignalThreshold() | Signal threshold set to: {12, 12, 12} and frames: 200
2021-10-10T22:09:28.202 V4L2:USB VIDEO: USB : <INFO> Automatic signal detection is now enabled
2021-10-10T22:09:28.202 SIGNAL_AUTO : <DEBUG> DetectionAutomatic.cpp:368:setAutoSignalParams() | Automatic signal detection -> errorTolerance: 9, modelTolerance: 90, sleepTime: 5000, wakeTime: 1000
2021-10-10T22:09:28.203 V4L2:USB VIDEO: USB : <DEBUG> Grabber.cpp:307:setDeviceVideoStandard() | setDeviceVideoStandard preparing to restart video grabber. Old: '' new: 'USB Video: USB Video (video0)'
2021-10-10T22:09:28.203 V4L2:USB VIDEO: USB : <INFO> Delayed restart of the grabber due to change of selected device
2021-10-10T22:09:28.203 V4L2:USB VIDEO: USB : <DEBUG> Grabber.cpp:158:setEncoding() | Force encoding to: yuyv (old: NO_CHANGE)
2021-10-10T22:09:28.203 V4L2:USB VIDEO: USB : <INFO> Delayed restart of the grabber due to change of the video encoding format
2021-10-10T22:09:28.203 V4L2:USB VIDEO: USB : <INFO> setQFrameDecimation is now: enabled
2021-10-10T22:09:28.209 X11_SYSTEM:AUTO : <INFO> Cropping image: width=0 height=0; crop: left=0 right=0 top=0 bottom=0
2021-10-10T22:09:28.209 X11_SYSTEM:AUTO : <INFO> Loaded X11 proxy library for screen capturing
2021-10-10T22:09:28.210 X11_SYSTEM:AUTO : <INFO> Restarting video grabber is now blocked due to reloading of the configuration
2021-10-10T22:09:28.210 X11_SYSTEM:AUTO : <DEBUG> Grabber.cpp:117:trySetWidthHeight() | Set new width: 512, height: 512 for capture
2021-10-10T22:09:28.210 X11_SYSTEM:AUTO : <DEBUG> Grabber.cpp:262:setWidthHeight() | setWidthHeight preparing to restarting video grabber 0
2021-10-10T22:09:28.210 X11_SYSTEM:AUTO : <INFO> Delayed restart of the grabber due to change of the capturing resolution
2021-10-10T22:09:28.210 X11_SYSTEM:AUTO : <INFO> Delayed restart of the grabber due to change of the framerate
2021-10-10T22:09:28.210 SIGNAL_OLD : <DEBUG> DetectionManual.cpp:85:setSignalDetectionOffset() | Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
2021-10-10T22:09:28.210 SIGNAL_OLD : <DEBUG> DetectionManual.cpp:75:setSignalThreshold() | Signal threshold set to: {12, 12, 12} and frames: 200
2021-10-10T22:09:28.210 X11_SYSTEM:AUTO : <DEBUG> Grabber.cpp:307:setDeviceVideoStandard() | setDeviceVideoStandard preparing to restart video grabber. Old: '' new: 'auto'
2021-10-10T22:09:28.211 X11_SYSTEM:AUTO : <INFO> Delayed restart of the grabber due to change of selected device
2021-10-10T22:09:28.281 SETTINGSMGR : <INFO> Settings database initialized
2021-10-10T22:09:28.284 BLACKBORDER : <INFO> Set mode to: default
2021-10-10T22:09:28.284 COMPONENTREG0 : <INFO> Blackborder detector: enabled
2021-10-10T22:09:28.284 IMAGETOLED0 : <DEBUG> ImageProcessor.cpp:136:setSparseProcessing() | setSparseProcessing to 0
2021-10-10T22:09:28.285 RGB_TRANSFORM0 : <INFO> RGB transform classic_config: 1, saturationGain: 1.000000, luminanceGain: 1.000000, backlightThreshold: 0
2021-10-10T22:09:28.286 ADJUST_RED0 : <INFO> Set correction to 255
2021-10-10T22:09:28.286 ADJUST_BLUE0 : <INFO> Set correction to 255
2021-10-10T22:09:28.286 ADJUST_GREEN0 : <INFO> Set correction to 255
2021-10-10T22:09:28.288 DB : <INFO> Database opened: /home/pi/.hyperhdr/db/hyperhdr.db
2021-10-10T22:09:28.300 JSONSERVER : <DEBUG> JsonServer.cpp:28:JsonServer() | Created instance
2021-10-10T22:09:28.300 JSONSERVER : <INFO> Started on port 19444
2021-10-10T22:09:28.307 FLATBUFSERVER : <INFO> Started on port 19400
2021-10-10T22:09:28.310 COMPONENTREG0 : <INFO> Smoothing: enabled
2021-10-10T22:09:28.310 SMOOTHING0 : <INFO> Creating config (0) => type: Linear, dirMode: false, pause: false, settlingTime: 200ms, interval: 40ms (25Hz), antiFlickTres: 0, antiFlickStep: 0, antiFlickTime: 0
2021-10-10T22:09:28.310 SMOOTHING0 : <INFO> Selecting config (0) => type: Linear, dirMode: false, pause: false, settlingTime: 200ms, interval: 40ms (25Hz), antiFlickTres: 0, antiFlickStep: 0, antiFlickTime: 0
2021-10-10T22:09:28.310 SMOOTHING0 : <INFO> Selecting config (0) => type: Linear, dirMode: false, pause: false, settlingTime: 200ms, interval: 40ms (25Hz), antiFlickTres: 0, antiFlickStep: 0, antiFlickTime: 0
2021-10-10T22:09:28.311 FLATBUFCONN : <INFO> Connecting to HyperHDR: 127.0.0.1:19401
2021-10-10T22:09:28.313 MUXER0 : <INFO> Register new input 'System/COLOR' with priority 254 as inactive
2021-10-10T22:09:28.313 MUXER0 : <DEBUG> PriorityMuxer.cpp:211:setInput() | Priority 254 is now active
2021-10-10T22:09:28.313 MUXER0 : <INFO> Set visible priority to 254
2021-10-10T22:09:28.313 HYPERHDR0 : <INFO> New priority[254], previous [255]
2021-10-10T22:09:28.313 HYPERHDR0 : <INFO> New source available -> switch LED-Device on
2021-10-10T22:09:28.313 IMAGETOLED0 : <DEBUG> ImageProcessor.cpp:180:setHardLedMappingType() | set hard led mapping to multicolor_mean
2021-10-10T22:09:28.314 HYPERHDR : <INFO> Initial background color set (136 4 41)
2021-10-10T22:09:28.314 MUXER0 : <INFO> Register new input 'System/VIDEOGRABBER' with priority 240 as inactive
2021-10-10T22:09:28.314 COMPONENTREG0 : <INFO> Video capture device: enabled
2021-10-10T22:09:28.314 V4L2:USB VIDEO: USB : <INFO> Multithreading for V4L2 is enabled. Available thread's count 4
2021-10-10T22:09:28.315 V4L2:USB VIDEO: USB : <INFO> Found capture device: /dev/video14
2021-10-10T22:09:28.315 BOBLIGHT : <INFO> Instance created
2021-10-10T22:09:28.316 V4L2:USB VIDEO: USB : <INFO> Found capture device: /dev/video15
2021-10-10T22:09:28.316 PROTOSERVER : <INFO> Started on port 19445
2021-10-10T22:09:28.316 WEBSERVER : <INFO> Initialize Webserver
2021-10-10T22:09:28.316 V4L2:USB VIDEO: USB : <DEBUG> V4L2Grabber.cpp:158:init() | Device USB Video: USB Video (video0) is not available. Changing to auto.
2021-10-10T22:09:28.317 V4L2:USB VIDEO: USB : <DEBUG> V4L2Grabber.cpp:165:init() | Forcing auto discovery device
2021-10-10T22:09:28.317 V4L2:USB VIDEO: USB : <ERROR> Could not find any capture device
2021-10-10T22:09:28.317 HYPERMANAGER : <INFO> HyperHDR instance 'TV Ambient Light' has been started
2021-10-10T22:09:28.317 DAEMON : <INFO> Unload CEC
2021-10-10T22:09:28.318 WEBSERVER : <INFO> Initialize Webserver
2021-10-10T22:09:28.318 LEDDEVICE : <INFO> Start LedDevice 'ws281x'.
2021-10-10T22:09:28.319 LEDDEVICE : <DEBUG> LedDevice.cpp:149:init() | deviceConfig: [{"colorOrder":"rgb","currentLedCount":166,"dma":5,"gpio":18,"hardwareLedCount":166,"invert":false,"latchTime":0,"leds":256,"pwmchannel":0,"rewriteTime":1000,"rgbw":false,"type":"ws281x","whiteAlgorithm":"subtract_minimum"}]
2021-10-10T22:09:28.319 LEDDEVICE : <DEBUG> LedDevice.cpp:408:setLatchTime() | LatchTime updated to 0ms
2021-10-10T22:09:28.319 LEDDEVICE : <DEBUG> LedDevice.cpp:429:setRewriteTime() | Refresh interval = 1000ms
2021-10-10T22:09:28.319 LEDDEVICE : <DEBUG> LedDevice.cpp:435:setRewriteTime() | RewriteTime updated to 1000ms
2021-10-10T22:09:28.320 LEDDEVICE : <DEBUG> LedDeviceWS281x.cpp:59:init() | ws281x strip type : 1050624
Can't open /dev/mem: Permission denied
2021-10-10T22:09:28.320 LEDDEVICE : <ERROR> Device disabled, device 'ws281x' signals error: 'Failed to open. Error message: mmap() failed'
2021-10-10T22:09:28.333 WEBSERVER : <INFO> Apply Webserver settings
2021-10-10T22:09:28.333 WEBSERVER : <INFO> Apply Webserver settings
2021-10-10T22:09:28.334 WEBSERVER : <INFO> Set document root to: :/webconfig
2021-10-10T22:09:28.334 WEBSERVER : <INFO> Set document root to: :/webconfig
2021-10-10T22:09:28.334 WEBSERVER : <INFO> Started on port 8090 name 'HyperHDR Webserver'
2021-10-10T22:09:28.337 WEBSERVER : <INFO> Setup SSL certificate
2021-10-10T22:09:28.338 WEBSERVER : <INFO> Setup private SSL key
2021-10-10T22:09:28.338 WEBSERVER : <INFO> Started on port 8092 name 'HyperHDR Webserver'
2021-10-10T22:09:30.813 WEBSOCKET : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::ffff:192.168.0.10
2021-10-10T22:09:30.814 WEBSOCKET : <DEBUG> JsonAPI.cpp:89:handleInstanceSwitch() | Client '::ffff:192.168.0.10' switch to HyperHDR instance 0
2021-10-10T22:09:31.942 WEBSOCKET : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::ffff:192.168.0.10
2021-10-10T22:09:31.942 WEBSOCKET : <DEBUG> JsonAPI.cpp:89:handleInstanceSwitch() | Client '::ffff:192.168.0.10' switch to HyperHDR instance 0
2021-10-10T22:09:33.029 WEBSOCKET : <DEBUG> WebSocketClient.cpp:30:WebSocketClient() | New connection from ::ffff:192.168.0.10
2021-10-10T22:09:33.030 WEBSOCKET : <DEBUG> JsonAPI.cpp:89:handleInstanceSwitch() | Client '::ffff:192.168.0.10' switch to HyperHDR instance 0
2021-10-10T22:09:36.036 DB : <INFO> Database opened: /home/pi/.hyperhdr/db/hyperhdr.db
2021-10-10T22:09:54.139 LEDDEVICE : <INFO> Stopped LedDevice 'ws281x'
2021-10-10T22:09:54.140 LEDDEVICE : <INFO> Start LedDevice 'adalight'.
2021-10-10T22:09:54.140 LEDDEVICE : <DEBUG> LedDevice.cpp:149:init() | deviceConfig: [{"awa_mode":true,"colorOrder":"rgb","currentLedCount":166,"delayAfterConnect":0,"hardwareLedCount":166,"latchTime":15,"output":"ttyUSB0","rate":2000000,"rewriteTime":1000,"type":"adalight"}]
2021-10-10T22:09:54.140 LEDDEVICE : <DEBUG> LedDevice.cpp:408:setLatchTime() | LatchTime updated to 15ms
2021-10-10T22:09:54.140 LEDDEVICE : <DEBUG> LedDevice.cpp:429:setRewriteTime() | Refresh interval = 1000ms
2021-10-10T22:09:54.140 LEDDEVICE : <DEBUG> LedDevice.cpp:435:setRewriteTime() | RewriteTime updated to 1000ms
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:36:init() | DeviceType : adalight
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:37:init() | LedCount : 166
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:38:init() | ColorOrder : rgb
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:39:init() | RefreshTime : 1000
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:40:init() | LatchTime : 15
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:52:init() | deviceName : ttyUSB0
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:53:init() | AutoDevice : 0
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:54:init() | baudRate_Hz : 2000000
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> ProviderRs232.cpp:55:init() | delayAfCon ms: 0
2021-10-10T22:09:54.141 LEDDEVICE : <DEBUG> LedDeviceAdalight.cpp:64:CreateHeader() | Adalight driver with activated high speeed & data integration check AWA protocol
2021-10-10T22:09:54.142 LEDDEVICE : <DEBUG> LedDeviceAdalight.cpp:74:CreateHeader() | Adalight header for 166 leds: Awa 0x00 0xa5 0xf0
2021-10-10T22:09:54.142 LEDDEVICE : <INFO> Opening UART: ttyUSB0
2021-10-10T22:09:54.142 LEDDEVICE : <DEBUG> ProviderRs232.cpp:141:tryOpen() | _rs232Port.open(QIODevice::ReadWrite): ttyUSB0, Baud rate [2000000]bps
2021-10-10T22:09:54.184 LEDDEVICE : <DEBUG> ProviderRs232.cpp:146:tryOpen() | portName: ttyUSB0
2021-10-10T22:09:54.184 LEDDEVICE : <DEBUG> ProviderRs232.cpp:147:tryOpen() | systemLocation: /dev/ttyUSB0
2021-10-10T22:09:54.184 LEDDEVICE : <DEBUG> ProviderRs232.cpp:148:tryOpen() | description: USB2.0-Ser
2021-10-10T22:09:54.184 LEDDEVICE : <DEBUG> ProviderRs232.cpp:149:tryOpen() | manufacturer: 1a86
2021-10-10T22:09:54.184 LEDDEVICE : <DEBUG> ProviderRs232.cpp:150:tryOpen() | productIdentifier: 0x7523
2021-10-10T22:09:54.185 LEDDEVICE : <DEBUG> ProviderRs232.cpp:151:tryOpen() | vendorIdentifier: 0x1a86
2021-10-10T22:09:54.185 LEDDEVICE : <DEBUG> ProviderRs232.cpp:152:tryOpen() | serialNumber:
2021-10-10T22:09:54.192 COMPONENTREG0 : <INFO> LED device: enabled
2021-10-10T22:09:54.192 SMOOTHING0 : <INFO> Using linear smoothing input (0)
2021-10-10T22:09:54.192 SMOOTHING0 : <INFO> Enabling timer. Now timer is active: 1, remaining time to run: 40
2021-10-10T22:09:54.232 SMOOTHING0 : <INFO> Using linear smoothing procedure (0)
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
HyperHDR caught signal :SIGABRT
2021-10-10T22:09:59.494 CORE : <ERROR> /lib/arm-linux-gnueabihf/libc.so.6(__default_rt_sa_restorer+0) [0xb593c120]
Aborted
System
HyperHDR Server:
- Build: (HEAD detached at dec81c0) (Awawa-2a2ed8d/dec81c0-1631541363)
- Build time: Sep 15 2021 16:23:59
- Git Remote: https://github.com/awawa-dev/HyperHDR
- Version: 17.0.0.0
- UI Lang: auto (BrowserLang: en-CA)
- UI Access: expert
- Avail Capt: Linux (V4L2)
- Database: read/write
HyperHDR Server OS:
- Distribution: Raspbian GNU/Linux 10 (buster)
- Architecture: arm
- CPU Model: ARMv7 Processor rev 3 (v7l)
- CPU Type: Raspberry Pi 4 Model B Rev 1.4
- CPU Revision: d03114
- CPU Hardware: BCM2711
- Kernel: linux (5.10.63-v7l+ (WS: 32))
- Qt Version: 5.11.3
- Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:93.0) Gecko/20100101 Firefox/93.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (8 by maintainers)
@awawa-dev I just received my new ESP32 boards and I flashed the latest HyperSerialESP32 firmware. This time as you said, there was no issue with the board
Pi’s kernel detected it correctly and the adalight led controller worked beautifully Thank you! so much for all your help & support
I have that exact same issue in dmesg
Transmission is mostly likely getting corrupted because of this.
Yes, once the HyperHDR starts crashing, its in an endless-loop. I had to either delete the database or disconnect ESP8266 to get the HyperHDR to stop crashing.
I think I can give it a try when I’m free. Maybe my best option is to wait for the new ESP board. Till then I will use the HyperSPI firmware.