I am using MonoMac 3.0.6 with Mono Runtime 2.10.12 and I have created an app with it. So, I wanted to pack the MonoRuntime with it: went to it's options and selected to link "Framework SDKs Only". When I am building it I am getting this error:
Building: ThisSimpleApp (Debug|x86)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/2.10.12/bin/dmcs /noconfig "/out:/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/bin/Debug/ThisSimpleApp.exe" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Xml.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Core.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Xml.Linq.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Drawing.dll" "/r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 /platform:x86 "/define:DEBUG" /t:exe "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/MainWindow.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/MainWindowController.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/MainWindow.designer.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/Main.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/AppDelegate.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/AppDelegate.designer.cs"
Build complete -- 0 errors, 0 warnings
Updating application manifest
Merging Mono Runtime into app bundle
/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/mmp -linksdkonly "-minos=10.6" -o "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/bin/Debug" -n "ThisSimpleApp" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Xml.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Core.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Xml.Linq.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Drawing.dll" -a "/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/bin/Debug/ThisSimpleApp.exe"
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for MonoMac.Bundler.Driver ---> System.ComponentModel.Win32Exception: ApplicationName='pkg-config', CommandLine='--variable=prefix mono-2', CurrentDirectory=''
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in :0
at MonoMac.Bundler.Driver.RunCommand (System.String path, System.String args, System.String[] env, System.String& output) [0x00000] in :0
at MonoMac.Bundler.Driver..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for MonoMac.Bundler.Driver ---> System.ComponentModel.Win32Exception: ApplicationName='pkg-config', CommandLine='--variable=prefix mono-2', CurrentDirectory=''
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in :0
at MonoMac.Bundler.Driver.RunCommand (System.String path, System.String args, System.String[] env, System.String& output) [0x00000] in :0
at MonoMac.Bundler.Driver..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
mmp exited with code 1
---------------------- Done ----------------------
Build: 1 error, 0 warnings
and it exits...
I wanted to ask if anyone can help me as I have been struggling with this for a month now.
As the exception states the pkg-config tool could not be found.
It used to be copied into /usr/bin in older releases of Mono but was in conflict with other packages (e.g. macport) so it's not copied anymore.
One way to fix this is to create a symlink (from /usr/bin/pkg-config) to the pkg-config tool shipped with Mono, under /Library/Frameworks/Mono.framework/...
Related
I have updated Appcenter from 3.2.2 to 5.0.1. Now I am getting exception in IOS when app calling AppCenter.Start with link behaviour "Link frameworks SDKs only". When I downgraded Appcenter I am still getting this exception. Exception disappears only if you delete the application from the phone and reinstall it.
Stacktrace:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidUnarchiveOperationException Reason: *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MSACDeviceHistoryInfo) for key (NS.objects) because no class named "MSACDeviceHistoryInfo" was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target). If the class was renamed, use setClassName:forClass: to add a class translation mapping to NSKeyedUnarchiver
Native stack trace:
0 CoreFoundation 0x000000010e6928ab __exceptionPreprocess + 242
1 libobjc.A.dylib 0x0000000110c68ba3 objc_exception_throw + 48
2 Foundation 0x00000001150477d9 -[NSCoder __failWithException:] + 165
3 Foundation 0x00000001150479ab -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 384
4 Foundation 0x00000001150e2eb0 _decodeObjectBinary + 646
5 Foundation 0x00000001150e5662 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1752
6 Foundation 0x00000001150273ad -[NSArray(NSArray) initWithCoder:] + 161
7 Foundation 0x00000001150e3898 _decodeObjectBinary + 3182
8 Foundation 0x00000001150e22d2 _decodeObject + 163
9 Foundation 0x00000001150e21b2 -[NSKeyedUnarchiver decodeObjectForKey:] + 162
10 Foundation 0x00000001150e1110 +[NSKeyedUnarchiver unarchiveObjectWithData:] + 79
11 MyApp.iOS 0x0000000104de107b -[MSDeviceTracker init] + 177
12 MyApp.iOS 0x0000000104de0f59 __33+[MSDeviceTracker sharedInstance]_block_invoke + 41
13 libdispatch.dylib 0x000000011ac57a3a _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000011ac58db3 _dispatch_once_callout + 20
15 MyApp.iOS 0x0000000104de0f2d +[MSDeviceTracker sharedInstance] + 45
16 MyApp.iOS 0x0000000104dd0d22 +[MSAppCenter setWrapperSdk:] + 56
17 MyApp.iOS 0x0000000105362a69 xamarin_dyn_objc_msgSend + 217
18 ??? 0x000000015c3c67ec 0x0 + 5842429932
at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/i/Versions/16.1.1.27/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:460
at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/runtime/Delegates.generated.cs:398
at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)
at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr(intptr,intptr,intptr)
at Microsoft.AppCenter.iOS.Bindings.MSAppCenter.SetWrapperSdk (Microsoft.AppCenter.iOS.Bindings.MSWrapperSdk wrapperSdk) [0x00023] in <d384bd2ae92b44008630788986ca7bdf>:0
at Microsoft.AppCenter.AppCenter.SetWrapperSdk () [0x00017] in <df2ccd8a0b774ab79c869a1d3fbc3ad1>:0
at Microsoft.AppCenter.AppCenter.PlatformStart (System.String appSecret, System.Type[] services) [0x00000] in <df2ccd8a0b774ab79c869a1d3fbc3ad1>:0
at Microsoft.AppCenter.AppCenter.Start (System.String appSecret, System.Type[] services) [0x00000] in <df2ccd8a0b774ab79c869a1d3fbc3ad1>:0
at MyApp.App.OnStart () [0x00006] in /Users/username/Documents/GitHub/MyApp/MyApp/App.xaml.cs:112
at Xamarin.Forms.Application.SendStart () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Application.cs:346
at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.FinishedLaunching (UIKit.UIApplication uiApplication, Foundation.NSDictionary launchOptions) [0x00036] in D:\a\1\s\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:58
at MyApp.iOS.Core.AppDelegate.FinishedLaunching (UIKit.UIApplication nativeApp, Foundation.NSDictionary options) [0x000e4] in /Users/username/Documents/GitHub/MyApp/iOS/Core/AppDelegate.cs:100
at (wrapper managed-to-native) UIKit.UIApplication.xamarin_UIApplicationMain(int,string[],intptr,intptr,intptr&)
at UIKit.UIApplication.UIApplicationMain (System.Int32 argc, System.String[] argv, System.IntPtr principalClassName, System.IntPtr delegateClassName) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.1.1.27/src/Xamarin.iOS/UIKit/UIApplication.cs:57
at UIKit.UIApplication.Main (System.String[] args, System.Type principalClass, System.Type delegateClass) [0x0003b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.1.1.27/src/Xamarin.iOS/UIKit/UIApplication.cs:92
at MyApp.iOS.Application.Main (System.String[] args) [0x00000] in /Users/username/Documents/GitHub/MyApp/iOS/Main.cs:13
I tried to skip linking Microsoft.AppCenter but it did not help
I'm using Unity 2020.3.30f1 on Mac OS Monterey 12.1 and when I try to Build and Run my project, I get 4 errors :
FAILURE: Build failed with an exception. What went wrong: org.slf4j.impl.SimpleLogger cannot be cast to org.gradle.api.logging.Logger
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease". stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[main] INFO org.gradle.internal.nativeintegration.services.NativeServices - Initialized native services in: /Users/robindijoux/.gradle/native. FAILURE: Build failed with an exception. What went wrong:
org.slf4j.impl.SimpleLogger cannot be cast to org.gradle.api.logging.Logger Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org]stdout[]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[T] progress) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:123)
Build completed with a result of 'Failed' in 245 seconds (245038 ms)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:123)
And finally
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002be] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:123)
Any suggestion? Thank's.
Have a strange problem with g++ compiled programs when using the "-static" switch.
I ran into this issue cross compiling executables for embedded ARM systems (though it seems architecture independent). Static linking all the libraries is required for deployment because the libraries are not on the target system. So I need the "-static" switch.
It seems C++ exceptions thrown in a std::thread are not being caught and cause the process to crash. I have narrowed it down to the code below:
#include <thread>
#include <iostream>
void thread_throwing_exception() {
try {
//this is a bad conversion that throws exception
long val = std::stoull("bad");
}
catch (const std::exception& ex) {
std::cerr << "caught exception: " << ex.what() << std::endl;
}
}
int main() {
std::thread thread;
thread = std::thread(thread_throwing_exception);
thread.join();
std::cout << "exiting\n";
return 0;
}
If I build it without the -static switch:
g++- -std=c++11 test.cpp -o test_x64 -g -static-libstdc++ -static-libgcc -pthread
It executes as expected:
./test_x64
caught exception: stoull
exiting
Now with -static switch. (I know it is not required for this program because there are no external libraries, but I need it for my application)
g++ -std=c++11 test.cpp -o test_x64 -g -static-libstdc++ -static-libgcc -pthread -static
Output:
./test_x64
Segmentation fault
Stack trace from gdb:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7ff9700 (LWP 13007)]
Thread 1 "test_x64" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x0000000000401b27 in __gthread_equal (__t1=0, __t2=0) at /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:680
#2 0x0000000000401eeb in std::operator== (__x=..., __y=...) at /usr/include/c++/5/thread:84
#3 0x0000000000401fb4 in std::thread::joinable (this=0x7fffffffde80) at /usr/include/c++/5/thread:170
#4 0x0000000000401f32 in std::thread::operator=(std::thread&&) (this=0x7fffffffde80,
__t=<unknown type in /media/sf_code/ziposoft/tests/test_bad/test_x64, CU 0x0, DIE 0x7a82>) at /usr/include/c++/5/thread:158
#5 0x0000000000401d28 in main () at test.cpp:33
I have tried g++-5, g++-7, g++-8. Any help would be greatly appreciated.
From doing research, it seems "don't use static linking" is a popular sentiment, but for embedded deployment, static linking is very useful.
Answer is here. Actually had nothing to do with exceptions, I was confusing it with another issue I had.
when g++ static link pthread, cause Segmentation fault, why?
Hy,
while using the libxml++-2.36-library for my code I found out, that this library produces a "double free or corruption"-error, when exceptions of the basetype std::exception are thrown in the sax-parser-callbacks. (e.g. on_start_document, on_end_document, on_...)
But it behaves normally, this means, that the exception can be catched, if an exception of basetype xmlpp::exception is thrown.
Interestingly xmlpp::exception is based on std::exception.
To verify this, I have created a MWE:
#include <libxml++/libxml++.h>
#include <iostream>
class xml_parser : public xmlpp::SaxParser {
protected:
virtual void on_start_document() override;
};
void xml_parser::on_start_document() {
throw std::runtime_error("test-exception");
//throw xmlpp::internal_error("test-exception");
}
int main(void) {
xml_parser parser;
try {
parser.parse_memory(
u8"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
} catch (std::exception &e) {
std::cerr << "Caught exception: " << e.what() << std::endl;
}
}
It can be compiled by:
g++ main.cpp -o main `pkg-config --cflags --libs libxml++-2.6` -Wall -pedantic -Wextra -Werror -Wcast-qual -Wcast-align -Wconversion -fdiagnostics-color=auto -g -O2 -std=c++11
If I execute the file as it is, I get the following output:
*** Error in `./main': double free or corruption (!prev): 0x0000000000b35b30 ***
If I uncomment the second line and comment the first line of the on_start_document(), I get the following output:
Caught exception: test-exception
Compiler: g++ 4.9.2
libxml++: 2.6 - 2.36
Is there a way, to get std::exception based exceptions working, without creating special xmlpp::exception-Based Exceptions?
What's happening is that an _xmlSAXHandler object is being freed twice, once by delete and another by xmlFree(). This can be seen by setting a break point on the appropriate free() standard libc call. For example, on an Ubuntu 'trusty' machine, I set a breakpoint on _int_free and saw that the same pointer was being freed twice:
Breakpoint 2, _int_free (av=0x7ffff741f760 , p=0x610b80,
have_lock=0) at malloc.c:3814
3814 in malloc.c
(gdb) bt
#0 _int_free (av=0x7ffff741f760 , p=0x610b80, have_lock=0)
at malloc.c:3814
#1 0x00007ffff6d32a59 in xmlFreeParserCtxt ()
from /usr/lib/x86_64-linux-gnu/libxml2.so.2
#2 0x00007ffff7bc6be2 in xmlpp::Parser::release_underlying (
this=this#entry=0x7fffffffdd30) at libxml++/parsers/parser.cc:162
#3 0x00007ffff7bcc665 in xmlpp::SaxParser::release_underlying (
this=this#entry=0x7fffffffdd30) at libxml++/parsers/saxparser.cc:329
#4 0x00007ffff7bcc68c in xmlpp::SaxParser::~SaxParser (this=0x7fffffffdd30,
__in_chrg=) at libxml++/parsers/saxparser.cc:83
#5 0x0000000000401d80 in ~xml_parser (this=0x7fffffffdd30,
__in_chrg=) at so31969961_libxmlpp_double_free.cpp:7
#6 main () at so31969961_libxmlpp_double_free.cpp:24
...
Breakpoint 2, _int_free (av=0x7ffff741f760 , p=0x610b80,
have_lock=0) at malloc.c:3814
3814 in malloc.c
(gdb) bt
#0 _int_free (av=0x7ffff741f760 , p=0x610b80, have_lock=0)
at malloc.c:3814
#1 0x00007ffff7bcc69e in ~auto_ptr (this=0x7fffffffdd60,
__in_chrg=) at /usr/include/c++/4.8/backward/auto_ptr.h:170
#2 xmlpp::SaxParser::~SaxParser (this=0x7fffffffdd30,
__in_chrg=) at libxml++/parsers/saxparser.cc:81
#3 0x0000000000401d80 in ~xml_parser (this=0x7fffffffdd30,
__in_chrg=) at so31969961_libxmlpp_double_free.cpp:7
#4 main () at so31969961_libxmlpp_double_free.cpp:24
In this case, 0x610b80 corresponds to the _xmlSAXHandler object held by the SaxParser in its sax_handler_ auto_ptr member. It is first freed by libxml2's xmlFreeParserCtxt() routine. It is then deleted by the std::auto_ptr<_xmlSAXHandler> destructor.
If you look at the source of libxml++'s SaxParser class, in saxparser.cc, you will see that there are several try..catch statements. However, only const exception& is caught. This const exception is not std::exception but rather xmlpp::exception.
When you throw a std::runtime_error in the on_start_document() handler, it is not caught by SaxParserCallback::start_document(). Consequently, as the stack is unwound, the code in SaxParser::parse() that restores the original _xmlSAXHandler pointer in the _xmlParserCtxt is skipped.
The takeaway from this is that you should only throw exceptions deriving from xmlpp::exception within the SaxParser handler methods.
UPDATE: https://bugzilla.gnome.org/show_bug.cgi?id=753570
UPDATE2: Fixed in version 2.39.2.
I'm trying to run the iphonebackupextracter software on a MAC OSX 10.8.4. I downloaded the latest version from you web site. and when i run mono iPhoneBackupExtractor.exe I get an error. I tried searching for a solution on mono's support site with no luck. Below is the full error message.
Appreciate your help.
An unhandled error occurred creating the main form. If running under OS X, this is likely due to a problem with your X11 installation. Please contact support#iphonebackupextractor.com for help.
The error was as follows:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.ArgumentException: The requested FontFamily could not be found [GDI+ status: FontFamilyNotFound]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
at System.Drawing.FontFamily..ctor (GenericFontFamilies genericFamily) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.FontFamily:.ctor (System.Drawing.Text.GenericFontFamilies)
at System.Drawing.FontFamily.get_GenericSansSerif () [0x00000] in <filename unknown>:0
at System.Drawing.Font.CreateFont (System.String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical) [0x00000] in <filename unknown>:0
at System.Drawing.Font..ctor (System.String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont) [0x00000] in <filename unknown>:0
at System.Drawing.Font..ctor (System.String familyName, Single emSize, System.String systemName) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Font:.ctor (string,single,string)
at System.Drawing.SystemFonts.get_DefaultFont () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Theme..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ThemeWin32Classic..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ThemeVisualStyles..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ThemeEngine..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at...ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check).:.ctor ()
at . (System.String[] ) [0x00000] in <filename unknown>:0
Stacktrace:
at.. (bool) <0x00087>
at System.ComponentModel.Component.Finalize () <0x00013>
at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
0 mono 0x000959dc mono_handle_native_sigsegv + 284
1 mono 0x00004a48 mono_sigsegv_signal_handler + 248
2 libsystem_c.dylib 0x999758cb _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 ??? 0x0042c774 0x0 + 4376436
5 ??? 0x0383b154 0x0 + 58962260
6 ??? 0x01fe5fa1 0x0 + 33447841
7 mono 0x00122ee4 mono_gc_run_finalize + 964
8 mono 0x00264ab3 GC_invoke_finalizers + 179
9 mono 0x000eaea5 mono_gc_invoke_finalizers + 21
10 mono 0x00125073 finalizer_thread + 579
11 mono 0x001eef61 start_wrapper_internal + 641
12 mono 0x001ef057 start_wrapper + 23
13 mono 0x0023599e thread_start_routine + 206
14 mono 0x0026fd68 GC_start_routine + 120
15 libsystem_c.dylib 0x999895b7 _pthread_start + 344
16 libsystem_c.dylib 0x99973d4e thread_start + 34
Debug info from gdb:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Abort trap: 6
Logs show that there seems to be an issue with creation of UI window panel as the system font the application is trying to look up for could be found on your mac.
There could be 2 main reasons why this could happen:-
The latest version of mountain lion (as you point it out to be 10.8.4) does not have that font in their font library
The application was created only for windows and developer didn't port it to /tested on mac thoroughly.
if you need to extract your iphone data in urgency then its better to try using a different application which has made for mac and does not require mono
UPDATE
Have a look at Total Saver application. It works on mac and windows without the need for you to install any 3rd party frameworks (mono). You'll need JRE (Java Runtime Environment) though.
You can download if for free by simply googling the app name or click on the softpedia link below:-
http://www.softpedia.com/get/Mobile-Phone-Tools/IPhone/Total-Saver.shtml
Link to the product site:- http://www.myphonedata.com/iphone