Skip to content

CIDER 1.1.1 Can't Handle Errors Without Stack Traces #3022

@timvisher

Description

@timvisher

Expected behavior

Be able to eval (< 1 nil) and get a reasonable stack trace.

Actual behavior

CIDER panics with *Messages*

error in process filter: cider-stacktrace-render-frame: Format specifier doesn’t match argument type
error in process filter: Format specifier doesn’t match argument type

and a Stacktrace buffer like

1. Unhandled java.lang.NullPointerException
   (No message)

Steps to reproduce the problem

  1. Open a clojure file against a JVM without -XX:-OmitStackTraceInFastThrow passed.
  2. Insert (< 1 nil)
  3. Whack M-x cider-eval-last-sexp RET

This can be fixed by passing -XX:-OmitStackTraceInFastThrow to the underlying JVM via the appropriate channel.

For instance:

$ cat deps.edn
{:deps
 …
 :aliases {:dev {:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]}}}

Followed by M-0 M-x cider-jack-in RET and appending:dev to the CL like

jack-in command: /usr/local/bin/clojure … -M:cider/nrepl:dev`

Environment & Version information

CIDER version information

;; CIDER 1.1.1 (Plovdiv), nREPL 0.8.3
;; Clojure 1.10.3, Java 16.0.1

clojure version

$ clojure --version
Clojure CLI version 1.10.3.855

Emacs version

GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0) of 2021-03-25

Operating system

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.6
BuildVersion:   18G9216

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueA simple tasks suitable for first-time contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions