Help me please! floating point exception

Hello, i have experience when i run malos on my raspbian terminal, i got this message

When I run my matrix OS using NODE_ENV=rc node index.js

The result is

MALOS Unavailable

What should I do?

Thanks

I am getting the same… :angry:

pi@raspberrypi:~ $  /usr/share/matrixlabs/matrixio-devices/fpga_info
IDENTIFY = 6032bad2
VERSION = 10006

pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/matrixlabs.list
deb https://apt.matrix.one/raspbian stretch main

pi@raspberrypi:~ $ dpkg -l | grep matrix
ii  libmatrixio-creator-hal:armhf   0.2.1                        armhf        Hardware Abstraction Layer for MATRIX.
ii  libmatrixio-malos:armhf         0.1.2                        armhf        Libraries of MATRIX abstraction layer for MOS
ii  libmatrixio-malos-dev           0.1.2                        armhf        Libraries of MATRIX abstraction layer for MOS
ii  libmatrixio-protos:armhf        0.1.1                        armhf        Protocolbuffers for MATRIX abstraction layer
ii  libmatrixio-protos-dev          0.1.1                        armhf        Protocolbuffers headers for MATRIX abstraction layer
ii  matrixio-creator-init           0.4.4                        armhf        Install scripts that can program the MATRIX Creator FPGA and SAM3 IMU.
ii  matrixio-malos                  0.3.0                        armhf        Allows queries to MATRIX Creator hardware via ZMQ.
ii  matrixio-malos-wakeword         0.1.4                        armhf        Voice commands for MATRIX Creator hardware via ZMQ callback.
ii  matrixio-openocd                1.0.1                        armhf        Open on-chip JTAG debug solution for ARM and MIPS systems
ii  matrixio-pocketsphinx           0.1.0                        armhf        This is PocketSphinx, one of Carnegie Mellon University's open source large
ii  matrixio-protobuf               3.4.0                        armhf        Protocol Buffers - Google's data interchange format. (From GRPC 3.4.0)
ii  matrixio-sphinxbase             0.1.0                        armhf        This is PocketSphinx, one of Carnegie Mellon University's open source large
ii  matrixio-xc3sprog               1.1.1                        armhf        Spartan3, XCF and CPLD JTAG programmer and other utilities.

pi@raspberrypi:~ $ malos
**************
MALOS starting
**************

You can query specific driver info using port 20012.
Registered driver IMU with port 20013.
Registered driver Humidity with port 20017.
Registered driver Everloop with port 20021.
Registered driver Pressure with port 20025.
Registered driver UV with port 20029.
Registered driver MicArray_Alsa with port 20037.
Registered driver Servo with port 20045.
Floating point exceptionith port 20049.

pi@raspberrypi:~/matrix-creator-hal/build/demos $ ./firmware_info
MCU ID = 0x0
MCU version = 0x0

Hello @wojak and @elluthfi.

1- We are working on it. I am trying to replicate it.
2. Both of you are working on MATRIX Voice?
3. Could paste the full result of:

strace malos

It could help us to find the issue and fix it.

I am waiting for your answer.

Thank You,

Kevin Patino

hi, great! I am owning Voice

there is a strace result

Hello @wojak,

I got the issue, it is around to access to the direction of arrival data.

I will let you know when we resolve it

Regards,

Kevin Patino

1 Like

Hello @wojak

I just fix this issue you just need to update and upgrade the matrixio-packgaes :slight_smile:

Thank You for your feedback!

Regards,

Kevin Patino

Great! Malos working, no floating point exception :slight_smile: Thank you.

However, DOA seems to giving random results in cpp and js. Mic array in js isn’t working, as long as malos is running, output.wav is empty. I will try clean install.

Ok, let us know how the clean install goes.

Thanks for the feedbacks!

Hello, yes, asap, currently I am very busy at other task. I think tomorrow I will report.

No luck :frowning:
DOA isnt working in both cases (MALOS and HAL)
tried to use kernels modules, without any luck:

[    4.236606] matrixio-codec matrixio-codec: ASoC: platform matrixio-pcm not registered
[    4.236624] matrixio-codec matrixio-codec: Failed to register MATRIXIO card (-517)
can't open device
can't send spi message

but no “floating point” exceptions.

So voice is not usable yet. However HAL versions of mic_energy and recorder are working, DOA and array not, also js versions are not working - even output.wav is empty.

If you have installed the kernel modules, the hal driver won’t work anymore and so malos, it’s disabling the spi device, but you can undo this with removing the dtoverlay=matrixio from your /boot/config.txt and not to use the kernel modules right now. As mentioned here:

and you should also check if spi is enabled, with:

# Enable SPI
sudo raspi-config >> Interfacing options >> SPI >> yes >> exit and reboot

Hi Kevin,

I am also having issues with my Voice. I did a fresh install of Raspbian and ran through the instructions here this weekend.

I still see the yellow ring on startup. Running arc_demo does nothing and running mic_energy results in a floating point exception.

Any idea of what’s going on?

Thanks!
Ricardo

Hello @rgorinstein,

  1. Could you run those examples with strace and paste the result. For example: strace mic_energy
  2. Just to confirm which packages you have installed, could you run: dpkg -l | grep matrix

Thank You.

Kevin Patino

Hi @kevindpatino,

I uploaded them here since there was a lot going on:

Let me know what else you need.

Thanks!
Ricardo

Hi @kevindpatino,

I realized I was running Debian, not Stretch. I installed a fresh version of Stretch and ran through the instructions again. I got the same issues. I uploaded the same info as before to Github with the prefix “stretch_”.

Let me know what else you need from me.

Thanks,
Ricardo

Hola @rgorinstein

I thought with strace we could catch the bug. But no :frowning:

Let’s try with gdb:

  1. Instead of run in HAL demos cmake .. could you run: cmake -DCMAKE_BUILD_TYPE=Debug ..
  2. Then run: gdb ./demos/mic_energy
  3. gdb shell : run
  4. When it stops or crashes, type: bt (backtrace)
  5. Send me the result of this test.

Thank You,

Kevin Patino

Hello @rgorinstein

Did you fix this issue?

Let me know :slight_smile:

Regards,

Kevin Patino

Hi @kevindpatino,

Sorry for the delay - I got busy in the last week.

Here is the result:

pi@raspberrypi:~/matrix-creator-hal/build $ cmake -DCMAKE_BUILD_TYPE=Debug ..
-- * * * A D M O B I L I Z E * * *
-- Admobilize: Please treat warnings as errors. Use: -DADM_FATAL_WARNINGS=ON
-- * * * * * * * * * * * * * * * *
-- * * * A D M O B I L I Z E * * *
-- Admobilize: Please treat warnings as errors. Use: -DADM_FATAL_WARNINGS=ON
-- * * * * * * * * * * * * * * * *
-- gflags found =>/usr/lib/arm-linux-gnueabihf/libgflags.so
-- * * * A D M O B I L I Z E * * *
-- Admobilize: Please treat warnings as errors. Use: -DADM_FATAL_WARNINGS=ON
-- * * * * * * * * * * * * * * * *
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/matrix-creator-hal/build
pi@raspberrypi:~/matrix-creator-hal/build $ gdb ./demos/mic_energy
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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 "arm-linux-gnueabihf".
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 ./demos/mic_energy...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/pi/matrix-creator-hal/build/demos/mic_energy 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGFPE, Arithmetic exception.
raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x76b7d1fc in __aeabi_ldiv0 () from /lib/arm-linux-gnueabihf/libgcc_s.so.1
#2  0x76fa3928 in matrix_hal::MicrophoneArray::ReadConfValues() () from /home/pi/matrix-creator-hal/build/demos/driver/libmatrix_creator_hal.so
#3  0x000130b0 in main ()
(gdb) 

I also added it to the github repo I used last time.

Thanks,
Ricardo

Hi @kevindpatino ,

Any idea of what’s going on?

Ricardo

Hello @rgorinstein.

Could you try with: MATRIX Creator/Voice Hardware Test

then could you run: dpkg -l | grep matrix

In the gdb log shows an error in the function to try to get the info from the FPGA. We need to confirm first which version of the software you have. Then could you download the last https://github.com/matrix-io/matrix-creator-hal.

It seems that you’re using an outdated software or package.

#0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x76b7d1fc in __aeabi_ldiv0 () from /lib/arm-linux-gnueabihf/libgcc_s.so.1
#2  0x76fa3928 in matrix_hal::MicrophoneArray::ReadConfValues() () from /home/pi/matrix-creator-hal/build/demos/driver/libmatrix_creator_hal.so
#3  0x000130b0 in main ()

Looking forward to your answer.

Kevin Patino