godot-kotlin-jvm icon indicating copy to clipboard operation
godot-kotlin-jvm copied to clipboard

[Proposal] Print JVM stack trace when the error is being thrown inside a cpp file.

Open Humberd opened this issue 4 years ago • 7 comments

It would be cool to have it, so that we would know what went wrong

Humberd avatar Apr 24 '21 16:04 Humberd

Exception should appear in classic console or terminal. We can't do much about this, the stream to where JVM prints is handled by JVM implementation. When calling void ExceptionDescribe() JVM will output it to sdterr. There is no easy way for us to retreive the message.

@chippmann if you're ok, I think we can close this one.

piiertho avatar Aug 25 '21 08:08 piiertho

@piiertho I don't think this is what the issue describes. As I understand it; the problem is when a crash happens inside cpp land and not the jvm. Then no java stacktrace is printed. Only a dump from cpp land is printed. What this issue requests (as far as i understand it) is that when a cpp crash happens, the jvm stacktrace should be printed as well, if a call was coming from jvm land. This would enable easier debugging.

chippmann avatar Aug 25 '21 08:08 chippmann

What @chippmann said was exactly my problem. I wrote a bunch of code, executed it and then the cpp part crashed and I didn't know which JVM call caused that, which resulted in me putting logs in every line.

Humberd avatar Aug 25 '21 09:08 Humberd