Bug 20469 - System.EntryPointNotFoundException on TimeZoneInfo.GetSystemTimeZones();
Summary: System.EntryPointNotFoundException on TimeZoneInfo.GetSystemTimeZones();
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.2.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-09 05:46 UTC by John Hair
Modified: 2014-06-10 10:22 UTC (History)
3 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description John Hair 2014-06-09 05:46:12 UTC
Execute the following line of code;
TimeZoneInfo.GetSystemTimeZones();
Exception raised:

System.EntryPointNotFoundException: monotouch_timezone_get_names
  at at (wrapper managed-to-native) System.TimeZoneInfo:monotouch_timezone_get_names (int&)
  at System.TimeZoneInfo.GetMonoTouchNames () [0x00002] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System/TimeZoneInfo.MonoTouch.cs:53
  at System.TimeZoneInfo.GetSystemTimeZones () [0x00023] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System/TimeZoneInfo.cs:657

Xamarin Studio
Version 5.0 (build 878)
Installation UUID: ce0a6830-9a0d-4e63-a92f-a0979309f155
Runtime:
	Mono 3.4.0 ((no/c3fc3ba)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000204

Xamarin.Android
Version: 4.12.4 (Business Edition)
Android SDK: /Users/johnhair/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Apple Developer Tools
Xcode 5.1.1 (5085)
Build 5B1008

Xamarin.iOS
Version: 7.2.3.39 (Business Edition)
Hash: fc6f56b
Branch: 
Build date: 2014-05-19 19:10:29-0400

Xamarin.Mac
Xamarin.Mac: Not Installed

Build Information
Release ID: 500000878
Git revision: bcd66920d963483e7d638a2339c4022fe035b529
Build date: 2014-05-27 17:36:26-04
Xamarin addins: da9064ce55b0fa90930a7c437a4cc1ae0e5c778c

Operating System
Mac OS X 10.9.3
Darwin MyMac 13.2.0 Darwin Kernel Version 13.2.0
    Thu Apr 17 23:03:13 PDT 2014
    root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Comment 1 Sadik Ali 2014-06-09 06:49:54 UTC
I tried this issue but I am unable to reproduce this issue.

Steps to reproduce:

1. Create an iOS application on Xamarin Studio
2. Paste the following code inside the "Main(String[] args" method of  "Main.cs" file 
             "TimeZoneInfo.GetSystemTimeZones();"
3. Debug the application
4. Application is running successfully (not getting any exception)

I have checked this issue and when I write the following codes, it returns a list of time zones.
                    "TimeZoneInfo.GetSystemTimeZones();"
I am not getting any exception.

Screencast: http://www.screencast.com/t/7naeMiLW0SQ

Please let me know If I am missing anything?

Environment Info:

Xamarin Studio
Version 5.0 (build 878)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.4.0 ((no/63569a7)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000205

Xamarin.Android
Version: 4.12.4 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Apple Developer Tools
Xcode 5.1 (5084)
Build 5B130a

Xamarin.iOS
Version: 7.2.3.39 (Business Edition)
Hash: fc6f56b
Branch: 
Build date: 2014-05-19 19:10:29-0400

Xamarin.Mac
Xamarin.Mac: 1.8.0.8

Build Information
Release ID: 500000878
Git revision: bcd66920d963483e7d638a2339c4022fe035b529
Build date: 2014-05-27 17:36:26-04
Xamarin addins: da9064ce55b0fa90930a7c437a4cc1ae0e5c778c

Operating System
Mac OS X 10.9.2
Comment 2 John Hair 2014-06-09 07:14:53 UTC
You are correct, running it from Main.cs words fine.
However I am running it much later, can you try modifying an existing app and put it on a button click?
Comment 3 Sebastien Pouliot 2014-06-09 09:10:21 UTC
@John something as stripped the symbol from libmonotouch and that's likelyt related to your build options. 

Please attach a sample case that fails for you so we can see how this could happen/
Comment 4 John Hair 2014-06-09 10:40:08 UTC
As I said, it works if you call it in Main.cs. I just modified a simple hello world example, editing my controller added a button to it, then:

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            Button.TouchUpInside += (object sender, EventArgs e) => 
            {
                var t1 = TimeZoneInfo.GetSystemTimeZones();
            };
        }

Touch the button. Boom.
I'll attach the example anyway.
Comment 5 John Hair 2014-06-09 10:42:33 UTC
Actually ignore that for a sec, I'll get a better working example for you.
Comment 6 John Hair 2014-06-09 10:59:51 UTC
Thats just plain weird, I haven't made any changes but now the code works! At least you can see from the initial report it *did* actually fail. I haven't made any compiler changes at all, but I was flicking back and forth from/to my test app to build you an example.
Comment 7 Sebastien Pouliot 2014-06-10 10:22:38 UTC
A EntryPointNotFoundException happens for missing symbols and it will not vary depending on the call site. 

It looks like somehow some symbols were stripped from libmonotouch.a. Sadly without a test case (or at least a build log) I cannot say what went wrong.

Please re-open the bug if you're able to reproduce this again.