mayah/tinytoml

Type type() const { return type_; } Seg fault on Beagle Bone black, ARM target

Closed this issue · 1 comments

hardware_scheme.toml
[DRV8830]
x = [4, 30]
y = [5, 30]
z = [6, 30]

[MMC]

channels for each sensor

s1 = 0
s2 = 1
s3 = 2

[MUX]
path = "/dev/i2c-"

[GAINS]
xyz = [0.29, 0.29, 0.34]
xyz_ohms = [25, 25, 27]

[CALS]
s1 = [0, 0, 0, 0, 0, 0, 0, 0, 0] # 9 dobule array for calibration and rotation of values
s2 = [0, 0, 0, 0, 0, 0, 0, 0, 0]
s3 = [0, 0, 0, 0, 0, 0, 0, 0, 0]

[FILTER]
w = [1] # array of max length

[TESTING]
target = "127.0.0.1"
port = 7777

[MISC]
rate = 10000

gdb debug info

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from simdot...done.
(gdb) run ../src/hardware_scheme.toml
Starting program: /home/debian/Bdot-Controller/binaries/simdot ../src/hardware_scheme.toml
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Parsing Config File
Loaded TOML Tables

Program received signal SIGSEGV, Segmentation fault.
0x0040ba18 in toml::Value::type (this=0x0) at toml.h:108
108 Type type() const { return type_; }
(gdb)

build script:

#!/bin/bash

export CC="g++"

echo "Building Simulation Software"
$CC -w -g bdot_testing.cpp -lzmq -lfmt -li2c -I ../eigen-3.4.0 -lpthread --std=c++11 -o ../binaries/simdot

Does anyone have any solutions to this? Am I missing a compile flag?
It is not in my actual code, the error comes from line 108 of toml.h.

Any help would be appreciated!

User Error.