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.

NullReferenceException in Avalonia.Media.MediaContext.CommitCompositor

See original GitHub issue

Describe the bug NullReference in Avalonia.Media.MediaContext.CommitCompositor:

partial class MediaContext
{
    private bool _scheduleCommitOnLastCompositionBatchCompletion;
    
    private Batch CommitCompositor(Compositor compositor)
    {
        var commit = compositor.Commit();
        _requestedCommits.Remove(compositor);
        _pendingCompositionBatches[compositor] = commit;
        commit.Processed.ContinueWith(_ =>
            Dispatcher.UIThread.Post(() => CompositionBatchFinished(compositor, commit), DispatcherPriority.Send));
        return commit;
    }

This happens after upgrade from 11.0.0-preview6 to 11.0.0-rc1.1

To Reproduce

  1. Clone https://github.com/arnirichard/visual_neural_networks
  2. Debug project VisualNeuralNetwork and wait until data is loaded
  3. Set “Image processing” to “Stretch” on one side (this may not matter at all)
  4. Press “Next batches”
  5. Exception occurs after some time while the neural network is training (this did not happen in Avalonia 11.0.0-preview6

Expected behavior No exception should occur

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 11 Pro
  • Version 11.0.0-rc1.1

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MrJulcommented, Jun 9, 2023

Duplicate of #11603. Can you please try latest nightly builds? It should already be fixed there.

0reactions
arnirichardcommented, Jun 9, 2023

Thanks, fixed now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Avalonia NullReferenceException when referencing ...
Why am I getting this null exception? This seems to work fine outside of Avalonia. I tried. Getting/setting in the UserControl (produced the ......
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