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.

PropertyChanged.Fody + MvvmCross 6.2 = crash

See original GitHub issue

Combining PropertyChanged.Fody with MvvmCross 6.2-beta results in crashing with System.InvalidProgramException: Invalid IL code in MyApp.Core.ViewModels.LoginViewModel:set_RememberMe (bool): IL_0020: ret

see: https://github.com/MvvmCross/MvvmCross/issues/3016 Probable Solution: Properly handle Task-returning as well as void-returning RaisePropertyChanged().

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
borbmizzetcommented, Jul 19, 2018

@ltrzesniewski That worked perfectly. Thanks!

0reactions
ltrzesniewskicommented, Jul 19, 2018

I’d say you need to modify this method so it returns IEnumerable<Instruction> instead of Instruction (fix the call sites, obviously), and if the method returns something other than System.Void, then just add a pop instruction after the callvirt.

This would simply ignore any return value (even if not a Task), which I think is the right behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commit d2a7fb2d on June 15 breaks compatibility with ...
Fody. Old (and correct) behavior. MvvmCross played nice with PropertyChanged.Fody without crashing up through Mvx6.1.2. Current behavior.
Read more >
MvvmCross 6.2
Announcing MvvmCross 6.2! ... If you are using Fody. ... raised in event handlers for PropertyChanged won't make your app crash anymore.
Read more >
MVVMCross v6.2.0-beta3 release notes (2018-08-17) | LibHunt
MvxTabbedPagePresentation with WrapInNavigationPage = false crashes when closing a ... Commit d2a7fb2d on June 15 breaks compatibility with PropertyChanged.
Read more >
Is it safe to use Fody.PropertyChanged with MVVMCross ...
Today I read about new plugin on net which Fody.PropertyChanged which is very simple and easy to use. Currently I am using MVVMCross...
Read more >
hujinguang/MvvmCross
FormsApplication #2832; Fix crash and improve MvxRecyclerViewAdapter ... Init() in android renderer in mvvmcross 6.2 #3262 ... Fody #3016 ...
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