Skip to content

Non-blind debugging of reference count problems. #90

Description

@Alberth289346

I am extending data-based synthesis in the ESCET project.
The application gives a "User called break" exception.

The message is completely meaningless to me, but the code suggests it has to do with lack of a reference. That somewhat makes sense because the problem happens while releasing references.

I can see two likely causes currently:

  1. Due to lack of documentation, I have guessed the reference count semantics. Maybe I guessed wrong.
  2. I made a reference counting error somewhere.

The question is, how do I debug this? Clearly my counting abilities are not sufficient. I looked for a way to get the actual reference count, and failed to find that.

Other ways that are helpful are welcome too.


I can likely add a way to get the reference count if the project allows that. That would at least make it possible to write checking code that counts behave as they should across a piece of code.

Somewhat more expensive but much more solid is the option to eliminate the problem entirely by leveraging Java semantics to handle this automagically with a derived WeakReferenceQueue class.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions