Bug 12179 - [6.3.4] btouch error reporting doesn't work
Summary: [6.3.4] btouch error reporting doesn't work
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 6.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2013-05-09 08:46 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2013-06-06 09:29 UTC (History)
2 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 FIXED

Description Rolf Bjarne Kvinge [MSFT] 2013-05-09 08:46:15 UTC
(Broken) sample code:

using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;

[BaseType (typeof (NSObject))]
public interface Dummy
{
}

Build like this:

/Developer/MonoTouch/usr/bin/btouch ApiDefinition.cs

and the process exits with no output, but exit code 1.

Logging exceptions:

MONO_ENV_OPTIONS=--trace=E:all /Developer/MonoTouch/usr/bin/btouch ApiDefinition.cs

shows this:

[0xac3e3a28:] EXCEPTION handling: System.NullReferenceException: Object reference not set to an instance of an object

"<unnamed thread>" tid=0x0xac3e3a28 this=0x0x628f20 thread handle 0x103 state : not waiting owns ()
  at Generator.Generate (System.Type) <0x0032c>
  at Generator.Go () <0x02027>
  at BindingTouch.Main2 (string[]) <0x01877>
  at BindingTouch.Main (string[]) <0x0001f>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

[0xac3e3a28:] EXCEPTION handling: System.EntryPointNotFoundException: monotouch_log

"<unnamed thread>" tid=0x0xac3e3a28 this=0x0x628f20 thread handle 0x103 state : not waiting owns ()
  at (wrapper managed-to-native) System.Console/NSLogWriter.monotouch_log (string) <0xffffffff>
  at System.Console/NSLogWriter.Flush () <0x00023>
  at System.Console/NSLogWriter.WriteLine () <0x00016>
  at System.IO.TextWriter.WriteLine (string) <0x00027>
  at System.IO.SynchronizedWriter.WriteLine (string) <0x00040>
  at ErrorHelper.ShowInternal (System.Exception) <0x0016c>
  at ErrorHelper.Show (System.Exception) <0x0008b>
  at BindingTouch.Main (string[]) <0x0003b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

[0xac3e3a28:] EXCEPTION handling: System.EntryPointNotFoundException: monotouch_log

"<unnamed thread>" tid=0x0xac3e3a28 this=0x0x628f20 thread handle 0x103 state : not waiting owns ()
  at (wrapper managed-to-native) System.Console/NSLogWriter.monotouch_log (string) <0xffffffff>
  at System.Console/NSLogWriter.Flush () <0x00023>
  at System.Console/NSLogWriter.WriteLine () <0x00016>
  at System.IO.TextWriter.WriteLine (string) <0x00027>
  at System.IO.SynchronizedWriter.WriteLine (string) <0x00040>
  at ErrorHelper.ShowInternal (System.Exception) <0x00193>
  at ErrorHelper.Show (System.Exception) <0x0008b>
  at BindingTouch.Main (string[]) <0x0003b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-05-09 08:46:50 UTC
Sebastien, this looks like a regression with the reflection-less Console.
Comment 2 Sebastien Pouliot 2013-05-09 11:21:10 UTC
hmm... that's why mscorlib.dll and mscorlib-runtime.dll are still needed.

and the tool's script still has a direct reference to /Developer/MonoTouch/...
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-05-09 17:41:07 UTC
This might in fact be a local issue, I'll check.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2013-05-09 18:29:07 UTC
Nope, not a local issue (not the one I thought it could be at least).
Comment 5 Sebastien Pouliot 2013-05-09 18:58:22 UTC
I did not meant something local. The change I did assumed a single mscorlib.dll (only used in iOS) but we can't have that if we need to run btouch using monotouch's own 2.1 mscorlib (at least not without further changes).

There's an easy fix and a good fix. Will start with the easy one...
Comment 6 Sebastien Pouliot 2013-05-09 20:39:57 UTC
Easy fix committed as c370370f285e9e20689190269c3230da50a65563

Not closing yet, we need the good fix (e.g. using cecil) and also update the script not to depend on /Developer/MonoTouch prefix