Why is Exception StackTrace null in MonoTouch 4 running on device? - xamarin.ios

I've just updated to MT 4.0.1 from 3.2.6. Now it seems that exception reports no longer contain stack traces when running on the device.
I have an exception handler attached to AppDomain.CurrentDomain.UnhandledException that I use to save an exception report to a file. On the simulator in both Debug & Release modes, UnhandledExceptionEventArgs.ExceptionObject.StackTrace is set. On the device in both Debug & Release modes that property is null.
I have tried checking "Emit debugging information" in the "Compiler" section of the project options. I have tried adding "--nosymbolstrip" to the MT build args. I have tried LLVM both enabled and disabled.
Any ideas? We will not be able to update in the App Store until we're confident that any exception reports we receive contain the necessary diagnostic info.

What information does ExceptionObject.ToString() provide? It should include the error message and stack trace. I know this has been working for me, b/c I recently used it to submit a bug to Novell.
Also, you might want to wrap a try-catch around your app startup in static void Main(), as AppDomain.UnhandledException is meant to be used for off-thread exceptions.

This would seem to be fixed in MonoTouch 4.0.4.1, though I didn't see that mentioned in the update description. Perhaps someone from Xamarin can confirm it was fixed on purpose.
For the record, it was stack traces in general that were broken on device, not just those associated with an exception. Formerly if you did new StackTrace() then its frames would be incomplete.

Related

How to configure the log cat when developing for flutter

When flutter has an error, the stacktrace is printed in the console however for subsequent errors I only get:
Another exception was thrown: short description of my error
Is there a way to configure android studio to display every error in its entirety with a full stack trace? Thanks
Well, https://flutter.io/docs/resources/bug-reports explains how to modify flutter to use Verbose mode in producing logs and where to locate them. According to the flutter website:
All Flutter commands accept the --verbose flag. If attached to the
issue, the output from this command may aid in diagnosing the issue.
The explanation was done using xcode, but it should not be a concern since since Flutter configuration are independent from IDEs'.
When that happens, it means that the error is exactly like the one before. There's no need to see it again, as it would just clutter the logs.
If flutter showed you all of the errors everytime, there's a high chance your output log would be big, incomprehensible, and impractical to use, specially because sometimes if you just touch something, move something, rebuild a screen, some errors can happen multiple times.
So I don't see that as something necessary, much less advisable.

AdroidStudio 2.2.2 Empty Activity Error on phone

I just started learning about Android development, so this one is a serious issue for me: I launch Android Studio (2.2.2, but had the issue since 2.2.1) on Win10, make a New project, just keep clicking Next without changing anything (selecting Empty Activity as the template), Finish, try to Run 'app' on my phone and consistently get this error:
Error while executing: am start -n "com.example.android.myapplication/com.example.android.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.myapplication/.MainActivity }
Error type 3
Error: Activity class {com.example.android.myapplication/com.example.android.myapplication.MainActivity} does not exist.
Error while Launching activity
Being a complete newbie who was just supposed to change some text in XML and run the app on a phone, I have no idea what to do or edit to make a pregenerated app actually work. I searched StackOverflow for a more general approach to these errors and tried:
Restarting AS/computer
Disabling InstantRun
Messing with Clean/Rebuild/Synchronize/Sync with Gradle
Deleting .gradle and .idea folders and Syncing with Gradle
Some other obscure shenanigans with build.gradle and AndroidManifest
Various combinations of the above.
... None of which worked (or affected the problem in any way, in fact).
Other observations:
The app isn't even installed (checked All apps, there isn't any com.example.android.myapplication or MyApplication app on my device)
On the development course forum, it was suggested that com.example.android.myapplication/com.example.android.myapplication.MainActivity should only read com.example.android.myapplication/MainActivity. So far I haven't been able to figure out how to change that.
Update 1 New attempted fixes (neither of which worked):
Specified activity directy in Run/Debug window.
Specified no activity whatsoever (doesn't show that error, but doesn't run anything either).
Did File/Invalidate Caches
Changed android.intent.category.MAIN to all-lowercase and back.
Added "category android:name="android.intent.category.DEFAULT"/" to Manifest
Update 2 Managed to run the app on emulator. It seems to be working there, so the error will likely be somewhere between AS and the phone (Android 5.1.1, API 22).
Developer options and USB debugging are on (confirmed the pop-up message, too)
Driver is up to date (AS can see the phone without problem)
Phone is on (and not asleep) while I'm trying to run the app
Any suggestions why the phone won't download and run the app?
In your manifest file edit
with android:name="com.example.android.myapplication.MainActivity"
Make sure that your code doesn't mean any nonsense and that it wouldn't cause the app to crash, which is sometimes the problem. Try finding a problem in code which could crash the app. Maybe in your crash log you can find what causes the crash. Good luck fixing that.
According with your error log I suppose you did not delete previously installed app. See my accepted answer on the same question for details.

Application crashes in mfc71u.dll

My application uses VC++ 2003. While executing in the Unicode release mode it crashes at
CMDIFrameWnd* pFrame = new CMainFrame;
in InitInstance() of startup project. The error message shows that the application crashes at mfc71u.dll
Click the link to see the error message
The same application runs well on other systems.
Please suggest me what could be the reason for the crash.
Thanks
Shyam
It would help if you posted more information such as:
A stack trace to the fault.
The source code around the crash.
The exception generated.
This is the bare minimum information you should automatically include with any crash.

Problem with Azure SDK 1.3 Tracing

I'm having an apparent AppDomain issue with tracing from within web pages (as opposed to the WebRole). Basically, if I invoke one of the tracing methods (i.e. Trace.TraceWarning("Ooops!")) the trace message doesn't show up in the Windows Azure Compute Emulator. The message does, however, show up just fine in the Output window.
Any help in this regard would be greatly appreciated.....
I think that for now this is just a limitation of the Compute Emulator... it only shows trace messages from your RoleEntryPoint code.

Writing the Windows Event Log using Visual Studio C++ 6

I am attempting to write a simple function using VC++6 to write to the event log. It must be in this version of studio because it is being added to a legacy application. The problem that I am having is that it writes the message similar to below. The only thing that is valid here is the "This is a test" string. I don't need this to be very complicated. I just need to be able to write to the event log for a specific application. Any thoughts? I have seen a few articles but they appear to be a lot more than I need.
The description for Event ID 3 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
This is a test
the message resource is present but the message is not found in the string/message table
It's been a very long time, but I seem to remember that you might need to create a *Message Resource Dll" to fix this. Or at least have some message resources somewhere.
This article seems like it might be able to help (and it support VC6): Using MC.exe, message resources and the NT event log in your own projects

Resources