question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Display error with full stack trace for crashed compiler

See original GitHub issue

If the compiler crashes during compilation the full stack trace from the compiler (and maybe some additional clarification) should be displayed instead of the sole error message from the compiler’s exception, which can be as vague as e.g. just assertion failed: <none>. This is important for 2 main reasons:

  • It’s not quite clear if the error means something is wrong with the user’s code, the compiler or scala-cli itself
  • This would make reporting errors to the compiler easier and would encourage people to report bugs (we could also include some message explaining how to do that with a link to the proper repository etc.)

(Reported for scala-cli v0.0.7)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SethTisuecommented, Sep 21, 2022

Another use case is compiler crashes. With scala-cli compile I just get e.g.

exception occurred while compiling /Users/tisue/tmp/20220921/S.scala
Error compiling project (Scala 3.2.0, JVM)
Error: Unexpected error when compiling project_40de3a9abc_40de3a9abc: 'assertion failed: Bad superClass for class Integer: val <none>'
Compilation failed

whereas with 3.2.0’s scalac I get the full stack trace — which I need, if I’m going to file a bug report, or attempt to investigate the crash myself.

0reactions
bblfishcommented, Oct 5, 2022

I get something similar running a 3 line program as described here: https://github.com/VirtusLab/scala-cli/discussions/1420#discussioncomment-3807513

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to automatically generate a stacktrace when my program ...
When my C++ program crashes I would like it to automatically generate a stacktrace. My program is being run by many different users...
Read more >
How to automatically generate a stacktrace when a gcc C++ ...
This compiler uses glibc library. We can use the backtrace() function to trace the error. This function is present inside the execinfo.h ...
Read more >
How Can You Debug Compiler-Generated Entries in iOS ...
Compiler -generated lines in iOS crash reports are difficult to debug. Embrace automatically highlights the most likely file name and line ...
Read more >
How to Produce a Full Stack Trace for mysqld - MariaDB
When mysqld / mariadbd crashes, it will write a stack trace in the error log by default. This is because the stack_trace option...
Read more >
My ESP crashes running some code. How to troubleshoot it?
Do you see always the same exception code and stack trace or it changes? Does this issue occur with unmodified ... Set Compiler...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found