crystal mysql weird

Exception: Unexpected EOF (Exception)

0x82d54b8: *MySql::ReadPacket#read_byte!:UInt8 at /home/rdp/dev/sensible-cinema/html5_javascript/kemal_server/lib/mysql/src/mysql/read_packet.cr 40:18

0x82d5de1: *MySql::ReadPacket#read_string<Int64>:String at /home/rdp/dev/sensible-cinema/html5_javascript/kemal_server/lib/mysql/src/mysql/read_packet.cr 54:9

0x82d59ac: *MySql::ReadPacket#read_lenenc_string:String at /home/rdp/dev/sensible-cinema/html5_javascript/kemal_server/lib/mysql/src/mysql/read_packet.cr 62:5

0x8407f0c: *MySql::Type::VarString::read<MySql::ReadPacket>:String at /home/rdp/dev/sensible-cinema/html5_javascript/kemal_server/lib/mysql/src/mysql/types.cr 217:3

0x840527a: *MySql::ResultSet#read:(Bool | Float32 | Float64 | Int16 | Int32 | Int64 | Int8 | Slice(UInt8) | String | Time | Nil) at /home/rdp/dev/sensible-cinema/html5_javascript/kemal_server/lib/mysql/src/mysql/result_set.cr 81:13

0x8407227: *DB::ResultSet+ at /home/rdp/dev/sensible-cinema/html5_javascript/kemal_server/lib/db/src/db/result_set.cr 79:7

but restart fixed it?

any help welcome…’

*maybe* fixed by this: https://github.com/crystal-lang/crystal-mysql/issues/25

crystal spec doesn’t run any

Finished in 705 microseconds
0 examples, 0 failures, 0 errors, 0 pending
Index out of bounds (IndexError)
0x10bcd9b25: *CallStack::unwind:Array(Pointer(Void)) at ??
0x10bcd9ac1: *CallStack#initialize:Array(Pointer(Void)) at ??
0x10bcd9a98: *CallStack::new:CallStack at ??
0x10bcce9b1: *raise<IndexError>:NoReturn at ??
0x10bcd8a2e: *Array(String)@Indexable(T)#at<Int32>:String at ??
0x10bcd89c9: *Array(String)@Indexable(T)#[]<Int32>:String at ??
0x10bcc39a8: __crystal_main at ??
0x10bcd3c48: main at ??

 

meant “you are referencing ARGV in a file and somehow that is blowing up spec before it runs…wait what?”

homebrew weirdness

hostscript
Error: No such keg: /usr/local/Cellar/ghostscript
RogerPackMBP:Downloads packrd$ brew install ghostscript
==> Installing dependencies for ghostscript: libtiff
==> Installing ghostscript dependency: libtiff
==> Using the sandbox
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.7.tar.gz
Already downloaded: /Users/packrd/Library/Caches/Homebrew/libtiff-4.0.7.tar.gz
==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.7-5.debian.tar.xz
Already downloaded: /Users/packrd/Library/Caches/Homebrew/libtiff–patch-f4183c48ed74b6c3c3a74ff1f10f0cf972d3dba0f840cf28b5a3f3846ceb2be6.tar.xz
==> Patching
==> Applying patches/01-CVE.patch
patching file ChangeLog
patching file libtiff/tif_read.c
patching file libtiff/tiffiop.h
==> Applying patches/02-CVE.patch
patching file ChangeLog
patching file tools/tiffcp.c
==> Applying patches/03-CVE.patch
patching file ChangeLog
patching file libtiff/tif_luv.c
patching file libtiff/tif_pixarlog.c
==> Applying patches/04-CVE.patch
patching file ChangeLog
patching file libtiff/tif_dirread.c
patching file libtiff/tif_strip.c
==> Applying patches/05-CVE.patch
patching file ChangeLog
patching file libtiff/tif_ojpeg.c
==> Applying patches/06-CVE.patch
patching file ChangeLog
patching file tools/tiffcrop.c
==> Applying patches/07-CVE.patch
patching file ChangeLog
patching file tools/tiffcrop.c
==> Applying patches/08-CVE.patch
patching file ChangeLog
patching file tools/tiffcrop.c
==> Applying patches/09-CVE.patch
patching file ChangeLog
patching file tools/tiffinfo.c
==> Applying patches/10-CVE.patch
patching file ChangeLog
patching file tools/tiffcp.c
==> Applying patches/11-CVE.patch
patching file ChangeLog
patching file libtiff/tif_dir.c
==> Applying patches/12-CVE.patch
patching file ChangeLog
patching file tools/tiffcp.c
==> Applying patches/13-CVE.patch
patching file ChangeLog
patching file tools/tiffcp.c
==> Applying patches/14-CVE.patch
patching file ChangeLog
patching file tools/tiffcp.c
==> Applying patches/15-TIFFFaxTabEnt_bugfix.patch
patching file ChangeLog
patching file libtiff/tif_fax3.h
==> Applying patches/16-CVE-2016-10094.patch
patching file ChangeLog
patching file tools/tiff2pdf.c
==> Applying patches/17-CVE-2017-5225.patch
patching file ChangeLog
patching file tools/tiffcp.c
==> ./configure –prefix=/usr/local/Cellar/libtiff/4.0.7_2 –without-x –with-jpeg-include-dir=/usr/local/opt/jpeg/include –with-jpeg-lib-dir=/usr/local/opt/jpeg/lib –disable-lzma
Last 15 lines from /Users/packrd/Library/Logs/Homebrew/libtiff/01.configure:
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… config/install-sh -c -d
checking for gawk… no
checking for mawk… no
checking for nawk… no
checking for awk… awk
checking whether make sets $(MAKE)… yes
checking whether make supports nested variables… yes
checking how to create a pax tar archive… gnutar
checking whether to enable maintainer-specific portions of Makefiles… no
checking for gcc… clang
checking whether the C compiler works… no
configure: error: in `/private/tmp/libtiff-20170302-16420-10zr6ye/tiff-4.0.7′:
configure: error: C compiler cannot create executables
See `config.log’ for more details

READ THIS: http://docs.brew.sh/Troubleshooting.html

RogerPackMBP:Downloads packrd$ gcc
clang: error: no input files
RogerPackMBP:Downloads packrd$ brew clean libtiff
Error: Unknown command: clean
RogerPackMBP:Downloads packrd$ brew purge libtiff
Error: Unknown command: purge
RogerPackMBP:Downloads packrd$ brew help
Example usage:
brew search [TEXT|/REGEX/]
brew (info|home|options) [FORMULA…]
brew install FORMULA…
brew update
brew upgrade [FORMULA…]
brew uninstall FORMULA…
brew list [FORMULA…]

Troubleshooting:
brew config
brew doctor
brew install -vd FORMULA

Developers:
brew create [URL [–no-fetch]]
brew edit [FORMULA…]
http://docs.brew.sh/Formula-Cookbook.html

Further help:
man brew
brew help [COMMAND]
brew home
RogerPackMBP:Downloads packrd$ brew remove libtiff
Error: Refusing to uninstall /usr/local/Cellar/libtiff/4.0.6_2
because it is required by gd, which is currently installed.
You can override this and force removal with:
brew uninstall –ignore-dependencies libtiff
RogerPackMBP:Downloads packrd$ brew uninstall –ignore-dependencies libtiff
Uninstalling /usr/local/Cellar/libtiff/4.0.6_2… (262 files, 5M)
RogerPackMBP:Downloads packrd$ brew install libtiff
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.7_2.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtiff-4.0.7_2.sierra.bottle.tar.gz
? /usr/local/Cellar/libtiff/4.0.7_2: 248 files, 3.4M
RogerPackMBP:Downloads packrd$ brew install ghostscript
==> Downloading https://homebrew.bintray.com/bottles/ghostscript-9.20.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ghostscript-9.20.sierra.bottle.tar.gz
? /usr/local/Cellar/ghostscript/9.20: 717 files, 63.9M
RogerPackMBP:Downloads packrd$ gs
GPL Ghostscript 9.20 (2016-09-26)
Copyright (C) 2016 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>^[[21~
Error: /undefined in 21~
Operand stack:
–nostringval–
Execution stack:
%interp_exit .runexec2 –nostringval– –nostringval– –nostringval– 2 %stopped_push –nostringval– –nostringval– %loop_continue –nostringval– –nostringval– false 1 %stopped_push .runexec2 –nostringval– –nostringval– –nostringval– 2 %stopped_push –nostringval–
Dictionary stack:
–dict:1199/1684(ro)(G)– –dict:0/20(G)– –dict:78/200(L)–
Current allocation mode is local
Current file position is 6
GS<1>0.
GS<2>.
Error: /undefined in .
Operand stack:
–nostringval– 0.0

crystal db woe

cast from Nil to String failed, at /Users/packrd/dev/ruby/sensible-cinema/html5_javascript/kemal_server/lib/db/src/db/result_set.cr:79 (TypeCastError)


meant "you have a field in crystal like DB.mapp(name: String) so crystal land thinks it can never be null, but this was nil in your DB

Roger's meanderings, notes to himself, bug reports, and other things