Skip to content

Conversation

@garuma
Copy link
Contributor

@garuma garuma commented Mar 17, 2017

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=53163

A user uncovered an issue using the Xamarin.Forms previewer where libmonosgen failed to load correctly on Windows.

The root cause was that the already loaded libmono-android was incompatible with the version of mono being loaded (different bridge versions) causing a forced runtime shutdown with the error message:

Invalid bridge callback version. Expected 4 but got 5

After investigating, it turns out the user had an old version of Xamarin installed via MSI (for VS2015) on his machine and was trying to use the newer Xamarin embedded in VS2017 via the Willow distribution mechanism which places binaries such as libmonosgen in a separate directory structure.

Thus the problem was that, while libmono-android itself was loaded correctly from that separate path, the code was then trying to fetch libmonosgen from the global system path (now completely obsolete) causing the bridge version mismatch.

With this patch, the code will now try first to get libmonosgen from the same directory libmono-android was loaded from which should cover the Willow case.

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=53163

A user uncovered an issue using the Xamarin.Forms previewer where
libmonosgen failed to load correctly on Windows.

The root cause was that the already loaded libmono-android was
incompatible with the version of mono being loaded (different bridge
versions) causing a forced runtime shutdown with the error message:

    Invalid bridge callback version. Expected 4 but got 5

After investigating, it turns out the user had an old version of
Xamarin installed via MSI (for VS2015) on his machine and was
trying to use the newer Xamarin embedded in VS2017 via the Willow
distribution mechanism which places binaries such as libmonosgen
in a separate directory structure.

Thus the problem was that, while libmono-android itself was loaded
correctly from that separate path, the code was then trying to
fetch libmonosgen from the global system path (now completely
obsolete) causing the bridge version mismatch.

With this patch, the code will now try first to get libmonosgen
from the same directory libmono-android was loaded from which
should cover the Willow case.
@jonpryor jonpryor merged commit 33504fd into d15-1 Mar 17, 2017
@jonpryor jonpryor deleted the d15-1-designer-checkforalongsidemono branch June 11, 2019 21:46
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants