mayah / tinytoml

A header only C++11 library for parsing TOML
BSD 2-Clause "Simplified" License
167 stars 31 forks source link

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

Closed jsmartini closed 2 years ago

jsmartini commented 2 years ago

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!

jsmartini commented 2 years ago

User Error.