charles-001 / dolphie

Your single pane of glass for real-time analytics into MySQL/MariaDB & ProxySQL
https://pypi.org/project/dolphie/
GNU General Public License v3.0
651 stars 40 forks source link

Display details of thread crashes #62

Closed choadrocker closed 6 months ago

choadrocker commented 6 months ago

On large queries and or large windows, dolphie crashes with: AttributeError: 'NoneType' object has no attribute 'splitlines'

I have attached a traceback

And thanks for the great tool!

choadrocker commented 6 months ago

dolphie_crash.txt.zip

charles-001 commented 6 months ago

Hi @choadrocker - thanks for reporting this! I've seen this issue before and honestly, I don't see why it's happening. It seems like it's a bug in Rich's Syntax module, but I'm not quite sure. Is it easily reproducible for you? I've only ran into it once.

choadrocker commented 6 months ago

I can reproduce it

What will be helpful to provide?

charles-001 commented 6 months ago

That's a good question because the traceback doesn't show me what line of Dolphie itself is causing the issue, heh. Since it's easily reproducible for you, any chance you can change the code to not use Syntax and see if that fixes it?

choadrocker commented 6 months ago

Ill give it a shot and let you know. It also may have choked on binary data

charles-001 commented 6 months ago

That's a good point @choadrocker - it could be binary data. The more I think about it, I don't think Syntax is at fault because all queries are processed with it to format in processlist panel. I wish the traceback told us what code in Dolphie is at fault...

charles-001 commented 6 months ago

@choadrocker - I think I fixed this. Can you try it out on your end?

Please do these steps:

  1. Checkout main branch of Dolphie
  2. Run poetry install
  3. Run poetry run dolphie with your normal parameters
charles-001 commented 6 months ago

@choadrocker - following up on this with you as I'd like to get this fix pushed to a new version if it works. Any chance you can test on your end soon?

charles-001 commented 6 months ago

@choadrocker - pinging you one last time for your input before I release a new version with this fix

charles-001 commented 6 months ago

This has been pushed to 5.0.2

choadrocker commented 6 months ago

Sorry I missed these! Thanks for the help!

charles-001 commented 6 months ago

No worries - did you by chance get to test the change and verify it fixes your issue?