Bug 45279 - mono_main overwrites any dirs set with mono_set_dirs before hand
Summary: mono_main overwrites any dirs set with mono_set_dirs before hand
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 4.8.0 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-11 15:41 UTC by Chris Hamons
Modified: 2016-10-11 15:41 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Chris Hamons 2016-10-11 15:41:21 UTC
In this code:

https://github.com/xamarin/xamarin-macios/blob/master/runtime/launcher.m#L496

We call set_dir during Xamarin.Mac application launch:

frame #0: RemotingTest`mono_set_dirs()
frame #1: RemotingTest`app_initialize()
frame #2: RemotingTest`::xamarin_main()
frame #3: RemotingTest`main()

and then invoke mono_main which overwrites are requested dirs:

frame #0: RemotingTest`fallback [inlined] mono_set_dirs(assembly_dir="/Users/donblas/Programming/macios/master/xamarin-macios/builds/install/mac64/lib", config_dir="/Users/donblas/Programming/macios/master/xamarin-macios/builds/install/mac64/etc") at assembly.c:588 [opt]
frame #1: RemotingTest`fallback + 23
frame #2: RemotingTest`mono_set_rootdir
frame #3: RemotingTest`mono_main() 
frame #4: RemotingTest`::xamarin_main()
frame #5: RemotingTest`main()

This appears to be a bug in the embedding API?

Worked around in XM with https://github.com/xamarin/xamarin-macios/pull/971

Note You need to log in before you can comment on or make changes to this bug.