hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
3.11k stars 384 forks source link

Crashes on Raspberrry Pi when changing LED Layout #816

Closed richard-kramer closed 4 years ago

richard-kramer commented 4 years ago

Bug report

Hyperion crashes on Raspberry Pi 4 when trying to change the LED Layout to higher numbers.

Steps to reproduce

What is expected?

New LED Layout is saved and applied to connected controller.

What is actually happening?

Hyperion crashes with following error:

[1]    14010 segmentation fault  /usr/bin/hyperiond

Repeated saves don't do anything. It crashes every time.

Note: with the Windows Version, everything works as expected.

System

Hyperion Server:

Hyperion Server OS:

IAmTheMitchell commented 4 years ago

Having the same/similar issue. I am trying to run a single line (using Matrix wall) of a 271 x 1 led strip via RPI3 and ESP2866 running WLED. When setting the LED layout to a number as high as 271, the program immediately crashes. Running Hyperion -d produces: Floating point exception

Lord-Grey commented 4 years ago

Setting a high number of LEDs resulted in following coredump on my system

#0  0x00007fcd7c00a3eb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007fcd7bfe996e in __GI_abort () at abort.c:100
#2  0x00007fcd7c05438e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fcd7c17d3a5 "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007fcd7c05c4dc in malloc_printerr (str=str@entry=0x7fcd7c17b4b6 "corrupted size vs. prev_size") at malloc.c:5332
#4  0x00007fcd7c05cb4b in unlink_chunk (p=p@entry=0x7fcd5c062a50, av=0x7fcd5c000020) at malloc.c:1454
#5  0x00007fcd7c05e05b in _int_free (av=0x7fcd5c000020, p=0x7fcd5c04e7e0, have_lock=<optimised out>) at malloc.c:4342
#6  0x000056103ba65235 in Image<ColorRgb>::~Image() (this=0x7fcd63ffe6b0, __in_chrg=<optimised out>) at /home/thomas/hyperion.ng-lordgrey/include/utils/Image.h:116
#7  0x000056103baa7b38 in PriorityMuxer::setInputImage(int, Image<ColorRgb> const&, long) (this=0x56103d23d490, priority=250, image=..., timeout_ms=-1)
    at /home/thomas/hyperion.ng-lordgrey/libsrc/hyperion/PriorityMuxer.cpp:232
#8  0x000056103ba8221b in Hyperion::setInputImage(int, Image<ColorRgb> const&, long, bool const&)
    (this=0x56103d23d3b0, priority=250, image=..., timeout_ms=-1, clearEffect=@0x7fcd63ffe750: true) at /home/thomas/hyperion.ng-lordgrey/libsrc/hyperion/Hyperion.cpp:354
#9  0x000056103bab7799 in CaptureCont::handleSystemImage(QString const&, Image<ColorRgb> const&) (this=0x7fcd5c02e7c0, name=..., image=...)
    at /home/thomas/hyperion.ng-lordgrey/libsrc/hyperion/CaptureCont.cpp:67
#10 0x000056103bab91ce in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<QString const&, Image<ColorRgb> const&>, void, void (CaptureCont::*)(QString const&, Image<ColorRgb> const&)>::call(void (CaptureCont::*)(QString const&, Image<ColorRgb> const&), CaptureCont*, void**) (f=
    (void (CaptureCont::*)(class CaptureCont * const, const class QString &, const class Image<ColorRgb> &)) 0x56103bab76a6 <CaptureCont::handleSystemImage(QString const&, Image<ColorRgb> const&)>, o=0x7fcd5c02e7c0, arg=0x7fcd5c04b0d0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152
#11 0x000056103bab8eb7 in QtPrivate::FunctionPointer<void (CaptureCont::*)(QString const&, Image<ColorRgb> const&)>::call<QtPrivate::List<QString const&, Image<ColorRgb> const&>, void>(void (CaptureCont::*)(QString const&, Image<ColorRgb> const&), CaptureCont*, void**) (f=
    (void (CaptureCont::*)(class CaptureCont * const, const class QString &, const class Image<ColorRgb> &)) 0x56103bab76a6 <CaptureCont::handleSystemImage(QString const&, Image<ColorRgb> const&)>, o=0x7fcd5c02e7c0, arg=0x7fcd5c04b0d0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:185
#12 0x000056103bab8c54 in QtPrivate::QSlotObject<void (CaptureCont::*)(QString const&, Image<ColorRgb> const&), QtPrivate::List<QString const&, Image<ColorRgb> const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7fcd5c02f450, r=0x7fcd5c02e7c0, a=0x7fcd5c04b0d0, ret=0x0)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:414
#13 0x00007fcd7c7bde4a in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fcd7dceaa86 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007fcd7dcf3e00 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fcd7c791a2a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fcd7c7946a8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fcd7c7ea037 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fcd7b7138bd in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fcd7b713b40 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fcd7b713be3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fcd7c7e9635 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007fcd7c7905cb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007fcd7c5c9a45 in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007fcd7c5cac92 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007fcd7d221669 in start_thread (arg=<optimised out>) at pthread_create.c:479
#27 0x00007fcd7c0e6323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Looks like the delete statement causes the core-dump (see gdb line item 6 above):

Image.h /// /// Destructor /// ~Image() { delete[] _pixels; }

Sundancer78 commented 4 years ago

I have the same problem with the WebUI, when I have completed the LED configuration and want to save it, a message comes up that Hperion cannot be reached due to a poor connection or an update, shortly afterwards the WebUI reloads and I am back in the LED configuration. However, I found that if I save every entry the same way, i.e. enter and save upper LEDs, enter and save lower LEDs, etc., everything is adjustable and also works in the end.

I use HperBian Alpha 6 on a Raspi Zero, with Adalight via USB, 324 Neopixel, USBTV, everything for the stand alone version.

m-seker commented 4 years ago

All,

Can you try again after https://github.com/hyperion-project/hyperion.ng/pull/862 is merged, please ?