jp2a
jp2a copied to clipboard
Malloc error thrown when using --html on MacOS aarch64
When attempting to convert an image to html code with the --html argument the program throws a malloc error, the program works just fine without converting to html.
Using the homebrew version of the program on aarch64 or Apple Sillicon on MacOS
$ brew info jp2a
==> jp2a: stable 1.1.1 (bottled)
Convert JPG images to ASCII
https://github.com/Talinx/jp2a
/opt/homebrew/Cellar/jp2a/1.1.1 (10 files, 134.6KB) *
Poured from bottle using the formulae.brew.sh API on 2024-01-06 at 22:16:24
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/j/jp2a.rb
License: GPL-2.0-or-later
==> Dependencies
Required: jpeg-turbo ✔, libpng ✔
==> Analytics
install: 181 (30 days), 540 (90 days), 2,024 (365 days)
install-on-request: 81 (30 days), 255 (90 days), 1,251 (365 days)
build-error: 1 (30 days)
$ jp2a ./3799666.png --html
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'>
<head>
<title>???=?</title>
<style type='text/css'>
body {
background-color: black;
}
.ascii {
font-family: Courier;
color: white;
font-size:8pt;
font-weight: bold;
}
</style>
</head>
<body>
jp2a(77309,0x1e31f1000) malloc: *** error for object 0x6000031d8a80: pointer being freed was not allocated
jp2a(77309,0x1e31f1000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort jp2a ./3799666.png --html
You should ask the Homebrew fork.