mapbox / logbt

Display a backtrace when a C/C++ program crashes
Other
24 stars 45 forks source link

Doesn't handle spaces in arguments correctly #46

Open stevage opened 4 years ago

stevage commented 4 years ago

I'm not certain if this is logbt's fault or my knowledge of Bash quoting is off, but, here's the command I'm trying to debug:

tippecanoe --output=mbtiles/parcels.mbtiles --force --read-parallel --minimum-zoom=13 --maximum-zoom=15 --generate-ids --simplification=10 --simplify-only-low-zooms --attribute-type='ATTOM ID:int' --include='ATTOM ID' --include=APN --include=CountyFIPS --coalesce-smallest-as-needed --base-zoom=14 --accumulate-attribute=APN:comma --accumulate-attribute='ATTOM ID:comma' --layer=parcels data/parcels.json

when I run with logbt:

~/logbt/logbt -- tippecanoe --output=mbtiles/parcels.mbtiles --force --read-parallel --minimum-zoom=13 --maximum-zoom=15 --generate-ids --simplification=10 --simplify-only-low-zooms --attribute-type='ATTOM ID:int' --include='ATTOM ID' --include=APN --include=CountyFIPS --coalesce-smallest-as-needed --base-zoom=14 --accumulate-attribute=APN:comma --accumulate-attribute='ATTOM ID:comma' --layer=parcels data/parcels.json
[logbt] using corefile location: /tmp/logbt-coredumps
[logbt] using core_pattern: core.%p.%E
-TATTOM option must be in the form -Tname:type
[logbt] saw 'tippecanoe' exit with code:1 (HUP)

That is, logbt seems to be failing to quote the arguments that contain spaces (ie, --include='ATTOM ID').

stevage commented 4 years ago

Hmm, this issue was apparently previously addressed in #28? I'm using v2.0.3 on Ubuntu 18.04.2.

springmeyer commented 4 years ago

Yes, this must still be buggy in logbt. Not sure how #28 did not fully fix this. Thanks for ticketing. A workaround for this could be to put your entire tippecanoe command in a new bash script. Then call that with logbt. Something like:

logbt -- ./run_tippecanoe.sh

where ./run_tippecanoe.sh has all your correct options listed out.