bskari / pi-rc

Turn your Raspberry Pi into a radio controller for RC toys.
GNU General Public License v2.0
139 stars 38 forks source link

Segmentation fault on line 554 of pi_pcm.c #24

Closed Tankernn closed 7 years ago

Tankernn commented 7 years ago

I'm trying to use your program, and when running the pi_pcm create by make, I get the following output:

pi@raspberrypi:~/pi-rc $ sudo ./pi_pcm
Using mbox device /dev/vcio.
Terminating with signal 11

Further inspection using gdb yields:

(gdb) run
Starting program: /home/pi/pi-rc/pi_pcm
Using mbox device /dev/vcio.

Program received signal SIGSEGV, Segmentation fault.
0x00011a68 in write_samples (cbp=0x0, frequency=49.8300018) at pi_pcm.c:554
554             ctl->sample[i] = 0x5a << 24 | frequency_control; /* Silence */
(gdb) backtrace
#0  0x00011a68 in write_samples (cbp=0x0, frequency=49.8300018) at pi_pcm.c:554
#1  0x00011204 in main (argc=1, argv=0xbefff804) at pi_pcm.c:326

I am using a Raspberry Pi 1 model B with completely fresh Raspbian Jessie lite (headless).

It's probably my fault, but I'm not a C programmer, so I don't really know what's going on here.

bskari commented 7 years ago

Oops, my mistake, should be fixed now. Sorry about that!

Abdalhad commented 5 years ago

i try to run pi_pcm in command prompt (LX Terminal) of raspberry pi by write make sudo -s ./pi_pcm and get this massage make: *** no rule to make target 'sudo' .stop !

Abdalhad commented 5 years ago

please how cn i run this file pi_pcm on my raspberry pi