ruby / ruby/fiddle

Debug support in fiddle?

Open
#93 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

need feedback
Dominant language
Ruby
Stars
195
Forks
53
Avg merge
23h 57m
Merged PRs (30d)
1

Description

kojix2 provides the fiddle-bindings for libui here:

https://github.com/kojix2/LibUI

Libui is very easy to use; I ported many of my ruby-gtk3 widgets already,
even though libui is quite limited compared to ruby-gtk3. Anyway, in my own
project i modify Fiddle::Pointer to fake-"simulate" OOP.

My biggest problem with fiddle so far is the debug-support. Due to doing
tons of mistakes I get lots of segfaults, and while it is fun to find out why,
in the long run I'd love to be able to more easily and quickly find the error
I did. But when things segfault, I don't seem to get good quality information.

If segfaults happen in ruby, then I often get the exact name, stack tracke
and call stack; and I can use caller(). With fiddle I do not seem to get the
same information or at the least not as much as I think may be useful.

Would it be possible to improve the debug support in fiddle in general?
Perhaps a better stack trace showing where errors happened, a bit
like how ruby does. Or perhaps I just don't know how to debug this,
in which case it would be nice if the main README could provide a
few helpful pointers. Please feel free to close this issue at any moment
in time - I understand that this may not be a trivial change but if anyone
finds some time in the future, keeping better debug-support would be
super-useful. Right now I seem to do random changes and hope for
the best. :D (See also kojix2' comment in regards to having to assign
to variables to avoid the GC terminate the program. Would be nice
if this could all become more transparent when working via ruby.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the main README and the Fiddle::Pointer behavior described in the issue, then compare the debugging information available for Fiddle calls with Ruby's caller and stack traces. Determine whether the actionable outcome is improved diagnostics or documented debugging guidance; done means one of those paths is clearly specified and supported by tests or README changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.