hzeller/rpi-matrix-pixelpusher

matrix submodule is out of date

d3v-null opened this issue · 10 comments

Hi there,
When I try to use pixelpusher, it reports having a framerate of infHz, and nothing shows up on the screen.
My panels work fine with the rpi-rgb-led-matrix/utils binaries after commit c9de0089
It doesn't work for commits before 27e2a670

If I cd into the matrix submodule, and checkout c9de0089 then re-make pixel pusher, it works perfectly.

Trying to build with the most recent master version of rpi-rgb-led-matrix complains with:

g++ -Ipp-server/include -Imatrix/include -Wall -O3 -g -c -o pixel-push.o pixel-push.cc
pixel-push.cc:26:10: fatal error: transformer.h: No such file or directory
 #include "transformer.h"
          ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:33: pixel-push.o] Error 1

Do you think it would be a good idea to at least upgrade matrix to c9de0089 ? Will submit a PR.

Obviously it would be great if matrix was completely up to date, but that would require a bit more work :)

Thanks!

Done.

You did that quicker than it took me to create the PR haha! nice one.

so it looks like you've updated the submodule to 8a4d748bc4fb3e3d0ebdbb4bb108bf237fb1eb78, but for me at least, that sha doesn't work.

g++ -Ipp-server/include -Imatrix/include -Wall -O3 -g -c -o pixel-push.o pixel-push.cc
pixel-push.cc:25:10: fatal error: led-matrix.h: No such file or directory
 #include "led-matrix.h"
          ^~~~~~~~~~~~~~
compilation terminated.

The SHA that does work is c9de0089

want me to submit a new issue?

Are you sure you checked out --recursive ?

Sorry, i forgot to init submodules, this sha: 600eca8 produces a segfault not a compile error

sudo ./pixel-push --led-cols=64 --led-show-refresh --led-slowdown-gpio=3 --led-parallel 2
Segmentation fault

Hopefully this GDB trace will help debug

[14:06 dietpi@DietPi rpi-matrix-pixelpusher] > sudo gdb --args ./pixel-push --led-cols=64 --led-show-refresh --led-slowdown-gpio=3 --led-parallel 2
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./pixel-push...done.
(gdb) run
Starting program: /home/dietpi/rpi-matrix-pixelpusher/pixel-push --led-cols=64 --led-show-refresh --led-slowdown-gpio=3 --led-parallel 2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000007ff7f90d34 in pthread_mutex_lock () from /lib/aarch64-linux-gnu/libpthread.so.0
(gdb) where
#0  0x0000007ff7f90d34 in pthread_mutex_lock () from /lib/aarch64-linux-gnu/libpthread.so.0
#1  0x000000555555c3cc in rgb_matrix::Mutex::Lock (this=0xd8) at ../include/thread.h:78
#2  rgb_matrix::MutexLock::MutexLock (m=0xd8, this=<synthetic pointer>) at ../include/thread.h:78
#3  rgb_matrix::RGBMatrix::Impl::UpdateThread::SwapOnVSync (frame_fraction=1, other=0x0, this=0x0) at led-matrix.cc:232
#4  rgb_matrix::RGBMatrix::Impl::SwapOnVSync (this=0x55555913f0, other=0x0, frame_fraction=1) at led-matrix.cc:517
#5  0x000000555555a138 in RGBMatrixDevice::RGBMatrixDevice (matrix=0x55555b5700, this=0x7ffffff3a8) at pp-server/include/pp-server.h:41
#6  main (argc=<optimized out>, argv=<optimized out>) at pixel-push.cc:199
(gdb) list 199
194       }
195
196       RGBMatrix *matrix = CreateMatrixFromOptions(matrix_options, runtime_opt);
197       matrix->set_luminance_correct(pp_options.is_logarithmic);
198
199       RGBMatrixDevice device(matrix);
200       if (!pp::StartPixelPusherServer(pp_options, &device)) {
201         return 1;
202       }
203

It runs on my dietpi; could this be because you're using a 64 bit version ?
Could you track down what 64-bitness problem there might be ?

Yeah, that's right, 64 bit. I can give it a try, can u suggest where to start? What kinda stuff have u been using to debug this so far?

I think gdb is good. I rarely encountered crashes, but when I do it is typically related to what I just did, so debugging always was simple, so I never really even had to use gdb.

But in this case it might help guide to the place where there is a problem.

BTW, turns out some things were not properly initialized in some of the initialization options, so maybe that was the problem here ? I've updated the matrix submodule to contain the latest changes - maybe this is fixed now ?