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.

pure_eval misses the variable on the crash line

See original GitHub issue

(Related to https://github.com/getsentry/sentry-python/issues/748)

I keep experiencing the same situation for various crash reports in my project: the new “interesting variables” logic includes everything but the entities on the line where the crash happens. For example,

def foo(arg: Dict[str, str]):
    bar = arg[5]
    x = func()
    x.attr = "AttributeError"  # crash here
    ...

The visible variables in the stack trace are arg, bar, and even Dict[str, str] from typing (pufe_eval loves typing for some reason), but x - never. Yet the most important local stack information for me is the variables from the line where I raise an exception. I guess the variable suggestion logic can be hacked to prioritize the variables on that line.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
untitakercommented, Sep 2, 2020

Ok 0.17.3 is out. Let me know how it goes.

On Wed, Sep 2, 2020 at 10:47 AM Vadim Markovtsev notifications@github.com wrote:

Can you please release, it is hard for me to switch to master today.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/getsentry/sentry-python/issues/805#issuecomment-685452263, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGMPRJW7QYP5HNMPSQTJIDSDYBBDANCNFSM4QQNFFDQ .

1reaction
alexmojakicommented, Aug 31, 2020

OK thanks, that helped. I’ve opened a PR to deal with trimming.

@vmarkovtsev I’m still not clear on whether this happens when you’ve got less than 10 variables. Your screenshot shows more than 10 so trimming is expected. It seems that the trimming has always been somewhat arbitrary so I’m surprised this wasn’t a problem before pure_eval, although adding more values probably exacerbated it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ChangeLog - Collection of Repositories
Thanks to Poor Yorick for identifying a reproducible crashing case. ... library/http/http.tcl: [Bug 3599395]: http assumes status line is a proper Tcl list....
Read more >
Nixpkgs 22.11 manual - NixOS
Determine whether the function is being called from inside pure-eval mode by seeing ... It is discouraged to set this variable, as it...
Read more >
Package List — Spack 0.20.0.dev0 documentation
Versions: 2-13; Build Dependencies: gnuconfig; Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of...
Read more >
What's New - Oracle Linux Yum Server
... Send anything you want directly to a pastebin from the command line (New) ... KDE Frameworks 5 Tier 2 addon for handling...
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