Giter Site home page Giter Site logo

[BUG] When binding received parameter in ContentPage from INavigable ViewModel exception is thrown that cannot access UI control from another thread about sextant HOT 4 OPEN

xplatsolutions avatar xplatsolutions commented on April 27, 2024
[BUG] When binding received parameter in ContentPage from INavigable ViewModel exception is thrown that cannot access UI control from another thread

from sextant.

Comments (4)

open-collective-bot avatar open-collective-bot commented on April 27, 2024

Hey @xplatsolutions 👋,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.

https://opencollective.com/reactiveui

PS.: We offer priority support for all financial contributors. Don't forget to add priority label once you start contributing 😄

from sextant.

winterdouglas avatar winterdouglas commented on April 27, 2024

I couldn't reproduce the exact same issue as is described here, it doesn't crash with the version 2.2.1. For the test I used Forms 4.4, RxUI 11. Tried the latest Sextant 2.4.1 as well, doesn't crash either. However, there are a few remarks:

  1. On iPhone XR iOS 12.4 the BindValidation fails with an IndexOutOfRangeException. The same doesn't happen if I run the exact same code on iOS 13.
  2. The WhenNavigatingTo runs out of the main thread (should it? @RLittlesII), and then the property is set as is, which makes it to not update the UI on iOS. It doesn't crash for me, just the value that doesn't get displayed in the view.
  3. If I do force the property to be set on the main thread, everything works well (except that BindValidation above, I had to comment it out to run on iOS 12.4).

from sextant.

RLittlesII avatar RLittlesII commented on April 27, 2024

@winterdouglas It should execute on the main thread, or whatever thread the View believes is the main thread. Although looking at it now and remembering an issue I had a few weeks ago, this is most likely not happening on the main thread.

navigableViewModel
.WhenNavigatingTo(parameter)
.ObserveOn(View.MainThreadScheduler)
.Subscribe(navigating => Logger.Debug($"Called `WhenNavigatingTo` on '{navigableViewModel.Id}' passing parameter {parameter}"));
AddToStackAndTick(PageSubject, navigableViewModel, resetStack);
Logger.Debug($"Added page '{navigableViewModel.Id}' (contract '{contract}') to stack.");
navigableViewModel
.WhenNavigatedTo(parameter)
.ObserveOn(View.MainThreadScheduler)
.Subscribe(navigated => Logger.Debug($"Called `WhenNavigatedTo` on '{navigableViewModel.Id}' passing parameter {parameter}"));

from sextant.

gsgou avatar gsgou commented on April 27, 2024

i reproduce the same issue on:
Device: iPhone 6S 12.4
Version: Sextant.XamForms 2.10.1

from sextant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.