Open tbhanson opened 6 months ago
Thanks for the rapport. Unfortunately, I don't have an arm mac to test on. Over Discord @sorawee was kind enough to test the binary, and the program:
#lang racket
(require racket-poppler)
ran without crashes.
I noticed the line:
Termination Reason: Namespace CODESIGNING, Code 2 Invalid Page
in the crash report.
But I don't know how code signing for libraries work. The instructions here:
https://eclecticlight.co/2023/06/05/what-to-do-when-an-app-crashes-as-it-opens/
seems to be for applications.
Thanks. Maybe I should make sure I know a couple details.
Do I need to install both racket-poppler and poppler-aarch64-macosx ?
Does the order matter? When I invoke them, I require only `
(require racket-poppler ) ` ?
Btw, I know almost nothing about reading these crash reports, but I did notice it said Thread 0 crashed and there's a stanza that includes
Thread 0 crashed with ARM Thread State (64-bit): x0: 0x000000017ae08000 x1: 0x000000016eeaa1c8 x2: 0x000000000013c000 x3: 0x0000000000040012 x4: 0x0000000000000007 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x00000001ec94fb6c x9: 0x00000001ec9513d0 x10: 0x0000000000000012 x11: 0x0000000000000001 x12: 0x0000000000000001 x13: 0x080000000017c000 x14: 0x000000000006a6f0 x15: 0x000000016eeaafe8 x16: 0x00000000000000c5 x17: 0x00000001848b7f90 x18: 0x0000000000000000 x19: 0x000000016eeaa1c8 x20: 0x0000000000000007 x21: 0x000000016eeaa1c8 x22: 0x000000016eea9c38 x23: 0x00000000001e8000 x24: 0x0000000000000000 x25: 0x000000016eea99bc x26: 0x0000000000000000 x27: 0x000000017ae08000 x28: 0x0000000000000040 fp: 0x000000016eea93b0 lr: 0xd27a0001848cf830 sp: 0x000000016eea93a0 pc: 0x00000001849044b0 cpsr: 0x20001000 far: 0x000000017ae08000 esr: 0x92000007 (Data Abort) byte read Translation fault
"(Data Abort) byte read Translation fault" sounds vaguely bad, but I don't know much about what it means or how one would prevent it.
Do I need to install both racket-poppler and poppler-aarch64-macosx ?
The package poppler-aarch64-macosx
contains the binaries for Poppler, so it needs
to be installed first. But I made racket-poppler
depend on poppler-aarch64-macosx
so in principle, installing racket-poppler
should trigger an automatic installation of
poppler-aarch64-macosx
.
When I invoke them, I require only
lang racket (require racket-poppler )
That's correct. Also, since requiring racket-poppler
doesn't invoke any functions
in the shared library (as far as I can remember), the problem occurs when the
shared library is loaded. This matches the theory that the problem is related
to code signing.
I got the same issue too. I installed the lastest Racket (8.13) on my machine (M2 macbook air), Running
#lang racket
(require racket-poppler)
will crash the Racket immediately.
Also tested on my Intel-chip iMac, everything work fine.
@juniorxxue Can you post the crash report? Hopefully there is an error message that can give us a hint.
I ran it on DrRacket, and this is the report from system. Let me know if you want other information.
After installing today
MacBook-Pro:~ tbh$ raco pkg install poppler-aarch64-macosx Resolving "poppler-aarch64-macosx" via https://download.racket-lang.org/releases/8.12/catalog/ Resolving "poppler-aarch64-macosx" via https://pkgs.racket-lang.org Downloading repository https://github.com/soegaard/poppler-libs.git?path=poppler-aarch64-macosx commit 029c07225d55593ee38c1bc3fcce2a8a1dd6cdc6 raco setup: version: 8.12
Running this `
lang racket
(require racket-poppler ) ` causes DrRacket to crash. [2024-05-08_tbh_DrRacket_racket-poppler_crash.pdf](https://github.com/soegaard/racket-poppler/files/15254292/2024-05-08_tbh_DrRacket_racket-poppler_crash.pdf) cf. https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/28?u=tbhanson