async Task timing out - xamarin

I am writing a page in Xamarin that displays a YouTube search using the YouTube Data API. It compiles fine but when I run it on my Android device it freezes and after awhile prompts to quit the application because it's not responding. I think it has something to do with establsihing the YouTubeService object.
This basically calls the data API and loads 50 of the videos for the given search term into the listview
private async Task Run()
{
videoList.Clear();
var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = DEVELOPER_KEY,
ApplicationName = "Xamarin-Basics"
});
var searchListRequest = youtubeService.Search.List("snippet");
searchListRequest.Q = "mkbhd";
searchListRequest.MaxResults = 50;
var searchListResponse = await searchListRequest.ExecuteAsync();
foreach(var searchResult in searchListResponse.Items)
{
if (searchResult.Id.Kind.Equals("youtube#video"))
{
videoList.Add(new VideoInfo(searchResult.Snippet.Title, searchResult.Snippet.Description));
}
}
}
Also, here is the stack trace which appears to be running the operation in the thread over and over again:
09-15 20:31:21.352 D/Mono ( 6831): Assembly Ref addref Newtonsoft.Json[0xb72c8210] -> System.Linq.Expressions[0xb72e98a0]: 3
Loaded assembly: Anonymously Hosted DynamicMethods Assembly [External]
09-15 20:31:21.562 D/Mono ( 6831): Assembly Ref addref Google.Apis.YouTube.v3[0xb72c7310] -> Newtonsoft.Json[0xb72c8210]: 4
09-15 20:31:22.127 D/Mono ( 6831): DllImport searching in: '__Internal' ('(null)').
09-15 20:31:22.127 D/Mono ( 6831): Searching for 'CloseZStream'.
09-15 20:31:22.127 D/Mono ( 6831): Probing 'CloseZStream'.
09-15 20:31:22.127 D/Mono ( 6831): Found as 'CloseZStream'.
09-15 20:31:31.950 D/Mono ( 6831): [0xb76fa5b0] worker finishing
Thread finished: <Thread Pool> #3
The thread 'Unknown' (0x3) has exited with code 0 (0x0).
09-15 20:31:57.148 D/Mono ( 6831): [0xb808e9b8] worker finishing
Thread finished: <Thread Pool> #7
The thread 'Unknown' (0x7) has exited with code 0 (0x0).
09-15 20:32:04.446 D/Mono ( 6831): [0xb77219d8] worker finishing
Thread finished: <Thread Pool> #4
The thread 'Unknown' (0x4) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #2
The thread 'Unknown' (0x2) has exited with code 0 (0x0).
09-15 20:32:49.051 D/Mono ( 6831): [0xb808de40] worker finishing
Thread finished: <Thread Pool> #8
The thread 'Unknown' (0x8) has exited with code 0 (0x0).
Thread started: <Thread Pool> #11
Thread started: <Thread Pool> #12
09-15 20:32:59.725 D/Mono ( 6831): [0xb81d8738] worker starting
09-15 20:33:30.573 D/Mono ( 6831): [0xb81d8738] worker finishing
Thread finished: <Thread Pool> #12
The thread 'Unknown' (0xc) has exited with code 0 (0x0).
09-15 20:33:46.394 D/Mono ( 6831): [0xb80a4790] worker finishing
Thread finished: <Thread Pool> #9
The thread 'Unknown' (0x9) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #11
The thread 'Unknown' (0xb) has exited with code 0 (0x0).
Thread started: <Thread Pool> #13
Thread started: <Thread Pool> #14
09-15 20:34:39.731 D/Mono ( 6831): [0xb81d8738] worker starting
Thread started: <Thread Pool> #15
09-15 20:34:39.749 D/Mono ( 6831): [0xb84d0f60] worker starting
09-15 20:34:52.494 D/Mono ( 6831): [0xb84d0f60] worker finishing
Thread finished: <Thread Pool> #15
The thread 'Unknown' (0xf) has exited with code 0 (0x0).

Your code looks basically right. I am assuming you are using the latest v3 api:
Google.Apis.YouTube.v3" version="1.16.0.582"
I would try wrapping the whole routine in a try/catch just to make sure that you are not getting a 403 or other access/auth error:
Xamarin.Android example:
try
{
var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = DEVELOPER_KEY,
ApplicationName = "com.sushihangover.youtubeapi",
});
var searchListRequest = youtubeService.Search.List("snippet");
searchListRequest.Q = "StackOverflow";
searchListRequest.MaxResults = 50;
var searchListResponse = await searchListRequest.ExecuteAsync();
foreach (var searchResult in searchListResponse.Items)
{
if (searchResult.Id.Kind.Equals("youtube#video"))
{
Console.WriteLine(searchResult.Snippet.Title);
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}

Related

Application Crash when using await Task.Run

My app is crashing at this line of code :
await Task.Run(() =>
{
bytes = page.AsPNG(72);
});
My code :
public async Task<string> GetBitmaps(string filePath)
{
//TODO -- WORK ON THIS
PdfRenderer pdfRenderer = new PdfRenderer(GetSeekableFileDescriptor(filePath));
var appDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
string fileName = System.IO.Path.GetFileNameWithoutExtension(filePath);
string directoryPath = System.IO.Path.Combine(appDirectory, "thumbnailsTemp", System.IO.Path.GetFileNameWithoutExtension(fileName));
var stream = new MemoryStream();
using (Stream resourceStream = new FileStream(filePath, FileMode.Open))
{
resourceStream.CopyTo(stream);
}
for (int i = 0; i < pdfRenderer.PageCount; i++)
{
TallComponents.PDF.Rasterizer.Page page = new TallComponents.PDF.Rasterizer.Page(stream, i);
byte[] bytes = null;
await Task.Run(() =>
{
bytes = page.AsPNG(72);
});
using (FileStream output = new FileStream(System.IO.Path.Combine(directoryPath, fileName + "Thumbnails" + i + ".png"), FileMode.Create, FileAccess.Write))
{
output.Write(bytes, 0, bytes.Length);
}
}
return directoryPath;
}
I tried to use Device.BeginInvokeOnMainThread but the page.AsPNG(dpi) method doesn't handle await.
Update
Here is the output message when Task.run is running :
And 1 min later if have the message : "pdf.android isn't responding".
03-13 20:46:19.862 D/Mono ( 4972): Loading reference 7 of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for System.Collections, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 03-13 20:46:19.863
D/Mono ( 4972): Image addref System.Collections[0xc69869c0] (asmctx
DEFAULT) -> System.Collections.dll[0xc91e0200]: 2 03-13 20:46:19.863
D/Mono ( 4972): Prepared to set up assembly 'System.Collections'
(System.Collections.dll) 03-13 20:46:19.863 D/Mono ( 4972):
Assembly System.Collections[0xc69869c0] added to domain RootDomain,
ref_count=1 03-13 20:46:19.863 D/Mono ( 4972): AOT: image
'System.Collections.dll.so' not found: dlopen failed: library
"System.Collections.dll.so" not found 03-13 20:46:19.864 D/Mono (
4972): AOT: image
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Collections.dll.so'
not found: (null) 03-13 20:46:19.864 D/Mono ( 4972): Config
attempting to parse: 'System.Collections.dll.config'. 03-13
20:46:19.864 D/Mono ( 4972): Config attempting to parse:
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Collections/System.Collections.config'.
03-13 20:46:19.864 D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] ->
System.Collections[0xc69869c0]: 2 03-13 20:46:19.864 D/Mono (
4972): Loading reference 0 of System.Collections.dll asmctx DEFAULT,
looking for mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e 03-13 20:46:19.864 D/Mono ( 4972):
Assembly Ref addref System.Collections[0xc69869c0] ->
mscorlib[0xe9ccb420]: 53 03-13 20:46:19.864 D/Mono ( 4972): Loading
reference 6 of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for System.Globalization, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 03-13 20:46:19.864
D/Mono ( 4972): Image addref System.Globalization[0xc6986960]
(asmctx DEFAULT) -> System.Globalization.dll[0xc91e1600]: 2 03-13
20:46:19.865 D/Mono ( 4972): Prepared to set up assembly
'System.Globalization' (System.Globalization.dll) 03-13 20:46:19.865
D/Mono ( 4972): Assembly System.Globalization[0xc6986960] added to
domain RootDomain, ref_count=1 03-13 20:46:19.865 D/Mono ( 4972):
AOT: image 'System.Globalization.dll.so' not found: dlopen failed:
library "System.Globalization.dll.so" not found 03-13 20:46:19.865
D/Mono ( 4972): AOT: image
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Globalization.dll.so'
not found: (null) 03-13 20:46:19.865 D/Mono ( 4972): Config
attempting to parse: 'System.Globalization.dll.config'. 03-13
20:46:19.865 D/Mono ( 4972): Config attempting to parse:
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Globalization/System.Globalization.config'.
03-13 20:46:19.865 D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] ->
System.Globalization[0xc6986960]: 2 03-13 20:46:19.866 D/Mono (
4972): Loading reference 0 of System.Globalization.dll asmctx DEFAULT,
looking for mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e 03-13 20:46:19.866 D/Mono ( 4972):
Assembly Ref addref System.Globalization[0xc6986960] ->
mscorlib[0xe9ccb420]: 54 Loaded assembly: System.Collections.dll
[External] Loaded assembly: System.Globalization.dll [External] 03-13
20:46:19.888 D/Mono ( 4972): Loading reference 4 of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for System.Threading, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 03-13 20:46:19.888
D/Mono ( 4972): Image addref System.Threading[0xc6986900] (asmctx
DEFAULT) -> System.Threading.dll[0xc91e1b00]: 2 03-13 20:46:19.888
D/Mono ( 4972): Prepared to set up assembly 'System.Threading'
(System.Threading.dll) 03-13 20:46:19.888 D/Mono ( 4972): Assembly
System.Threading[0xc6986900] added to domain RootDomain, ref_count=1
03-13 20:46:19.889 D/Mono ( 4972): AOT: image
'System.Threading.dll.so' not found: dlopen failed: library
"System.Threading.dll.so" not found 03-13 20:46:19.889 D/Mono (
4972): AOT: image
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Threading.dll.so'
not found: (null) 03-13 20:46:19.889 D/Mono ( 4972): Config
attempting to parse: 'System.Threading.dll.config'. 03-13 20:46:19.889
D/Mono ( 4972): Config attempting to parse:
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Threading/System.Threading.config'.
03-13 20:46:19.889 D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] ->
System.Threading[0xc6986900]: 2 03-13 20:46:19.889 D/Mono ( 4972):
Loading reference 0 of System.Threading.dll asmctx DEFAULT, looking
for mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e 03-13 20:46:19.890 D/Mono ( 4972):
Assembly Ref addref System.Threading[0xc6986900] ->
mscorlib[0xe9ccb420]: 55 03-13 20:46:19.890 D/Mono ( 4972): Loading
reference 8 of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for System.Text.Encoding, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 03-13 20:46:19.890
D/Mono ( 4972): Image addref System.Text.Encoding[0xc69868a0]
(asmctx DEFAULT) -> System.Text.Encoding.dll[0xc76c5000]: 2 03-13
20:46:19.890 D/Mono ( 4972): Prepared to set up assembly
'System.Text.Encoding' (System.Text.Encoding.dll) 03-13 20:46:19.890
D/Mono ( 4972): Assembly System.Text.Encoding[0xc69868a0] added to
domain RootDomain, ref_count=1 Loaded assembly: System.Threading.dll
[External]03-13 20:46:19.890 D/Mono ( 4972): AOT: image
'System.Text.Encoding.dll.so' not found: dlopen failed: library
"System.Text.Encoding.dll.so" not found
03-13 20:46:19.891 D/Mono ( 4972): AOT: image
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Text.Encoding.dll.so'
not found: (null) 03-13 20:46:19.891 D/Mono ( 4972): Config
attempting to parse: 'System.Text.Encoding.dll.config'. 03-13
20:46:19.891 D/Mono ( 4972): Config attempting to parse:
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Text.Encoding/System.Text.Encoding.config'.
03-13 20:46:19.891 D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] ->
System.Text.Encoding[0xc69868a0]: 2 03-13 20:46:19.891 D/Mono (
4972): Loading reference 0 of System.Text.Encoding.dll asmctx DEFAULT,
looking for mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e 03-13 20:46:19.891 D/Mono ( 4972):
Assembly Ref addref System.Text.Encoding[0xc69868a0] ->
mscorlib[0xe9ccb420]: 56 Loaded assembly: System.Text.Encoding.dll
[External] 03-13 20:46:20.007 D/Mono ( 4972): Loading reference 5
of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for System.Runtime.Extensions,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
03-13 20:46:20.007 D/Mono ( 4972): Image addref
System.Runtime.Extensions[0xc6986c60] (asmctx DEFAULT) ->
System.Runtime.Extensions.dll[0xc76c6400]: 2 03-13 20:46:20.007 D/Mono
( 4972): Prepared to set up assembly 'System.Runtime.Extensions'
(System.Runtime.Extensions.dll) 03-13 20:46:20.007 D/Mono ( 4972):
Assembly System.Runtime.Extensions[0xc6986c60] added to domain
RootDomain, ref_count=1 03-13 20:46:20.008 D/Mono ( 4972): AOT:
image 'System.Runtime.Extensions.dll.so' not found: dlopen failed:
library "System.Runtime.Extensions.dll.so" not found 03-13
20:46:20.008 D/Mono ( 4972): AOT: image
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Runtime.Extensions.dll.so'
not found: (null) 03-13 20:46:20.008 D/Mono ( 4972): Config
attempting to parse: 'System.Runtime.Extensions.dll.config'. 03-13
20:46:20.008 D/Mono ( 4972): Config attempting to parse:
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Runtime.Extensions/System.Runtime.Extensions.config'.
03-13 20:46:20.008 D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] ->
System.Runtime.Extensions[0xc6986c60]: 2 03-13 20:46:20.008 D/Mono
( 4972): Loading reference 0 of System.Runtime.Extensions.dll asmctx
DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e 03-13 20:46:20.008 D/Mono ( 4972):
Assembly Ref addref System.Runtime.Extensions[0xc6986c60] ->
mscorlib[0xe9ccb420]: 57 Loaded assembly:
System.Runtime.Extensions.dll [External] Thread started:
2 Thread started: #3 Thread started: #4 Thread started: #5 03-13 20:46:26.407 D/Mono ( 4972):
Loading reference 1 of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for Mono.Android, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=84e04ff9cfb79065 03-13 20:46:26.407
D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] -> Mono.Android[0xe9cccd40]:
44 03-13 20:46:26.850 D/Mono ( 4972): DllImport searching in:
'Internal' ('(null)'). 03-13 20:46:26.850 D/Mono ( 4972):
Searching for 'java_interop_jnienv_new_byte_array'. 03-13 20:46:26.850
D/Mono ( 4972): Probing 'java_interop_jnienv_new_byte_array'. 03-13
20:46:26.850 D/Mono ( 4972): Found as
'java_interop_jnienv_new_byte_array'. 03-13 20:46:26.854 D/Mono (
4972): DllImport searching in: '__Internal' ('(null)'). 03-13
20:46:26.854 D/Mono ( 4972): Searching for
'java_interop_jnienv_set_byte_array_region'. 03-13 20:46:26.854 D/Mono
( 4972): Probing 'java_interop_jnienv_set_byte_array_region'. 03-13
20:46:26.854 D/Mono ( 4972): Found as
'java_interop_jnienv_set_byte_array_region'. 03-13 20:46:26.857 D/Mono
( 4972): DllImport searching in: '__Internal' ('(null)'). 03-13
20:46:26.857 D/Mono ( 4972): Searching for
'java_interop_jnienv_get_byte_array_region'. 03-13 20:46:26.857 D/Mono
( 4972): Probing 'java_interop_jnienv_get_byte_array_region'. 03-13
20:46:26.857 D/Mono ( 4972): Found as
'java_interop_jnienv_get_byte_array_region'. 03-13 20:46:27.053 D/skia
( 4972): --- Failed to create image decoder with message
'unimplemented' 03-13 20:46:27.127 I/companyname.pd( 4972): Explicit
concurrent copying GC freed 16071(4MB) AllocSpace objects, 2(100KB)
LOS objects, 50% free, 2MB/4MB, paused 639us total 6.952ms 03-13
20:46:27.131 D/Mono ( 4972): GC_TAR_BRIDGE bridges 369 objects 9865
opaque 2897 colors 364 colors-bridged 364 colors-visible 364 xref 8
cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 1.13ms
scc-setup 0.05ms gather-xref 0.02ms xref-setup 0.02ms cleanup 1.70ms
03-13 20:46:27.131 D/Mono ( 4972): GC_BRIDGE: Complete, was running
for 12.47ms 03-13 20:46:27.131 D/Mono ( 4972): GC_MINOR: (Nursery
full) time 5.12ms, stw 6.23ms promoted 1312K major size: 2240K in use:
1560K los size: 3072K in use: 2386K 03-13 20:46:27.158 D/skia (
4972): --- Failed to create image decoder with message 'unimplemented'
03-13 20:46:27.187 D/Mono ( 4972): Loading reference 13 of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.__override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for System.Text.Encoding.Extensions,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
03-13 20:46:27.187 D/Mono ( 4972): Image addref
System.Text.Encoding.Extensions[0xe9d426e0] (asmctx DEFAULT) ->
System.Text.Encoding.Extensions.dll[0xc5db8900]: 2 03-13 20:46:27.187
D/Mono ( 4972): Prepared to set up assembly
'System.Text.Encoding.Extensions'
(System.Text.Encoding.Extensions.dll) Loaded assembly:
System.Text.Encoding.Extensions.dll [External]03-13 20:46:27.187
D/Mono ( 4972): Assembly
System.Text.Encoding.Extensions[0xe9d426e0] added to domain
RootDomain, ref_count=1
03-13 20:46:27.188 D/Mono ( 4972): AOT: image
'System.Text.Encoding.Extensions.dll.so' not found: dlopen failed:
library "System.Text.Encoding.Extensions.dll.so" not found 03-13
20:46:27.188 D/Mono ( 4972): AOT: image
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Text.Encoding.Extensions.dll.so'
not found: (null) 03-13 20:46:27.188 D/Mono ( 4972): Config
attempting to parse: 'System.Text.Encoding.Extensions.dll.config'.
03-13 20:46:27.188 D/Mono ( 4972): Config attempting to parse:
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.config'.
03-13 20:46:27.189 D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] ->
System.Text.Encoding.Extensions[0xe9d426e0]: 2 03-13 20:46:27.189
D/Mono ( 4972): Loading reference 0 of
System.Text.Encoding.Extensions.dll asmctx DEFAULT, looking for
mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e 03-13 20:46:27.189 D/Mono ( 4972):
Assembly Ref addref System.Text.Encoding.Extensions[0xe9d426e0] ->
mscorlib[0xe9ccb420]: 58 03-13 20:46:27.233 D/Mono ( 4972): Loading
reference 12 of
/storage/emulated/0/Android/data/com.companyname.pdf/files/.override/TallComponents.PDF.Rasterizer.dll
asmctx DEFAULT, looking for System.Reflection, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 03-13 20:46:27.233
D/Mono ( 4972): Image addref System.Reflection[0xe9d43640] (asmctx
DEFAULT) -> System.Reflection.dll[0xc76c9b00]: 2 03-13 20:46:27.233
D/Mono ( 4972): Prepared to set up assembly 'System.Reflection'
(System.Reflection.dll) 03-13 20:46:27.233 D/Mono ( 4972): Assembly
System.Reflection[0xe9d43640] added to domain RootDomain, ref_count=1
03-13 20:46:27.234 D/Mono ( 4972): AOT: image
'System.Reflection.dll.so' not found: dlopen failed: library
"System.Reflection.dll.so" not found 03-13 20:46:27.234 D/Mono (
4972): AOT: image
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Reflection.dll.so'
not found: (null) 03-13 20:46:27.234 D/Mono ( 4972): Config
attempting to parse: 'System.Reflection.dll.config'. 03-13
20:46:27.234 D/Mono ( 4972): Config attempting to parse:
'/Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Reflection/System.Reflection.config'.
03-13 20:46:27.234 D/Mono ( 4972): Assembly Ref addref
TallComponents.PDF.Rasterizer[0xe9ccb780] ->
System.Reflection[0xe9d43640]: 2 03-13 20:46:27.234 D/Mono ( 4972):
Loading reference 0 of System.Reflection.dll asmctx DEFAULT, looking
for mscorlib, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e 03-13 20:46:27.234 D/Mono ( 4972):
Assembly Ref addref System.Reflection[0xe9d43640] ->
mscorlib[0xe9ccb420]: 59 Loaded assembly: System.Reflection.dll
[External] 03-13 20:46:27.513 I/companyname.pd( 4972): Explicit
concurrent copying GC freed 1556(87KB) AllocSpace objects, 2(6MB) LOS
objects, 50% free, 1997KB/3MB, paused 632us total 6.975ms 03-13
20:46:27.513 D/Mono ( 4972): GC_TAR_BRIDGE bridges 3 objects 3
opaque 0 colors 3 colors-bridged 3 colors-visible 3 xref 0 cache-hit 0
cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 0.02ms scc-setup
0.02ms gather-xref 0.02ms xref-setup 0.02ms cleanup 0.16ms 03-13 20:46:27.513 D/Mono ( 4972): GC_BRIDGE: Complete, was running for
7.78ms 03-13 20:46:27.513 D/Mono ( 4972): GC_MINOR: (Concurrent start) time 1.03ms, stw 3.77ms promoted 126K major size: 2368K in use:
1719K los size: 16856K in use: 16154K 03-13 20:46:27.514 D/Mono (
4972): GC_MAJOR_CONCURRENT_START: (LOS overflow) 03-13 20:46:27.643
I/companyname.pd( 4972): Explicit concurrent copying GC freed
505(41KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1971KB/3MB,
paused 627us total 6.512ms 03-13 20:46:27.644 D/Mono ( 4972):
GC_TAR_BRIDGE bridges 205 objects 1700 opaque 503 colors 200
colors-bridged 200 colors-visible 200 xref 6 cache-hit 0 cache-semihit
0 cache-miss 0 setup 0.03ms tarjan 0.46ms scc-setup 0.04ms gather-xref
0.02ms xref-setup 0.02ms cleanup 0.03ms 03-13 20:46:27.644 D/Mono ( 4972): GC_BRIDGE: Complete, was running for 8.50ms 03-13 20:46:27.644
D/Mono ( 4972): GC_MAJOR_CONCURRENT_FINISH: (finishing) time
131.48ms, stw 4.30ms los size: 2048K in use: 606K 03-13 20:46:27.644 D/Mono ( 4972): GC_MAJOR_SWEEP: major size: 2704K in use: 1634K
Thread finished: #4 Le thread 0x4 s'est arrêté avec le
code 0 (0x0). Thread finished: #5 Le thread 0x5 s'est
arrêté avec le code 0 (0x0). Thread finished: #3 Thread
started: #6 Thread started: #7 Le thread
0x3 s'est arrêté avec le code 0 (0x0). Thread finished:
2 Thread started: #8 Le thread 0x2 s'est arrêté avec le code 0 (0x0).

Getting a NullReferenceException in Xamarin.Forms on Android when backing out of app

I'm using Xamarin Forms 4.2.0 and utilizing Xamarin.Forms Shell. Pressing the back button seems to work find when navigating through the various screens in my app, however, when I press back to exit the app when debugging I get a NullReferenceException:
09-30 14:49:52.866 D/Mono ( 1085): Loading reference 10 of /storage/emulated/0/Android/data/com.companyname.agentconnectmobile/files/.__override__/Xamarin.Forms.Platform.Android.dll asmctx DEFAULT, looking for System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.866 D/Mono ( 1085): Assembly Ref addref Xamarin.Forms.Platform.Android[0x799acc0e00] -> System.Runtime.Serialization[0x7935aa8d00]: 3
09-30 14:49:52.866 D/Mono ( 1085): Loading reference 1 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.866 D/Mono ( 1085): Assembly Ref addref System.Runtime.Serialization[0x7935aa8d00] -> System.Xml[0x799be73480]: 5
09-30 14:49:52.918 D/Mono ( 1085): Loading reference 2 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for System.ServiceModel.Internals, Version=0.0.0.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.920 D/Mono ( 1085): Image addref System.ServiceModel.Internals[0x7937f9df00] (asmctx DEFAULT) -> System.ServiceModel.Internals.dll[0x7935889800]: 2
09-30 14:49:52.920 D/Mono ( 1085): Prepared to set up assembly 'System.ServiceModel.Internals' (System.ServiceModel.Internals.dll)
09-30 14:49:52.920 D/Mono ( 1085): Assembly System.ServiceModel.Internals[0x7937f9df00] added to domain RootDomain, ref_count=1
09-30 14:49:52.922 D/Mono ( 1085): AOT: image 'System.ServiceModel.Internals.dll.so' not found: dlopen failed: library "System.ServiceModel.Internals.dll.so" not found
09-30 14:49:52.923 D/Mono ( 1085): AOT: image '/Users/builder/jenkins/workspace/archive-mono/2019-06/android/release/sdks/out/android-arm64-v8a-release/lib/mono/aot-cache/arm64/System.ServiceModel.Internals.dll.so' not found: (null)
09-30 14:49:52.923 D/Mono ( 1085): Config attempting to parse: 'System.ServiceModel.Internals.dll.config'.
09-30 14:49:52.923 D/Mono ( 1085): Config attempting to parse: '/Users/builder/jenkins/workspace/archive-mono/2019-06/android/release/sdks/out/android-arm64-v8a-release/etc/mono/assemblies/System.ServiceModel.Internals/System.ServiceModel.Internals.config'.
09-30 14:49:52.923 D/Mono ( 1085): Assembly Ref addref System.Runtime.Serialization[0x7935aa8d00] -> System.ServiceModel.Internals[0x7937f9df00]: 2
09-30 14:49:52.923 D/Mono ( 1085): Loading reference 0 of System.ServiceModel.Internals.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.923 D/Mono ( 1085): Assembly Ref addref System.ServiceModel.Internals[0x7937f9df00] -> mscorlib[0x7a3039be80]: 64
09-30 14:49:52.923 D/Mono ( 1085): Loading reference 2 of System.ServiceModel.Internals.dll asmctx DEFAULT, looking for System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.924 D/Mono ( 1085): Assembly Ref addref System.ServiceModel.Internals[0x7937f9df00] -> System.Xml[0x799be73480]: 6
Loaded assembly: System.ServiceModel.Internals.dll [External]09-30 14:49:52.924 D/Mono ( 1085): Loading reference 3 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.924 D/Mono ( 1085): Assembly Ref addref System.Runtime.Serialization[0x7935aa8d00] -> System[0x799acd1580]: 10
09-30 14:49:52.998 D/Mono ( 1085): Loading reference 1 of System.Xml.dll asmctx DEFAULT, looking for System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.999 D/Mono ( 1085): Assembly Ref addref System.Xml[0x799be73480] -> System[0x799acd1580]: 11
09-30 14:49:53.099 D/Mono ( 1085): Loading reference 1 of System.ServiceModel.Internals.dll asmctx DEFAULT, looking for System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:53.100 D/Mono ( 1085): Assembly Ref addref System.ServiceModel.Internals[0x7937f9df00] -> System[0x799acd1580]: 12
09-30 14:49:53.145 D/Mono ( 1085): Loading reference 19 of /storage/emulated/0/Android/data/com.companyname.agentconnectmobile/files/.__override__/Xamarin.Forms.Platform.Android.dll asmctx DEFAULT, looking for System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:53.146 D/Mono ( 1085): Assembly Ref addref Xamarin.Forms.Platform.Android[0x799acc0e00] -> System.Xml[0x799be73480]: 7
09-30 14:49:53.221 D/Mono ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.221 D/Mono ( 1085): Searching for 'SystemNative_Unlink'.
09-30 14:49:53.221 D/Mono ( 1085): Probing 'SystemNative_Unlink'.
09-30 14:49:53.222 D/Mono ( 1085): Found as 'SystemNative_Unlink'.
09-30 14:49:53.279 D/Mono ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.279 D/Mono ( 1085): Searching for 'SystemNative_LStat2'.
09-30 14:49:53.279 D/Mono ( 1085): Probing 'SystemNative_LStat2'.
09-30 14:49:53.279 D/Mono ( 1085): Found as 'SystemNative_LStat2'.
09-30 14:49:53.279 D/Mono ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.279 D/Mono ( 1085): Searching for 'SystemNative_Rename'.
09-30 14:49:53.279 D/Mono ( 1085): Probing 'SystemNative_Rename'.
09-30 14:49:53.280 D/Mono ( 1085): Found as 'SystemNative_Rename'.
09-30 14:49:53.553 D/Mono ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.553 D/Mono ( 1085): Searching for 'SystemNative_Link'.
09-30 14:49:53.553 D/Mono ( 1085): Probing 'SystemNative_Link'.
09-30 14:49:53.553 D/Mono ( 1085): Found as 'SystemNative_Link'.
09-30 14:49:53.563 D/Mono ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.563 D/Mono ( 1085): Searching for 'SystemNative_Stat2'.
09-30 14:49:53.563 D/Mono ( 1085): Probing 'SystemNative_Stat2'.
09-30 14:49:53.563 D/Mono ( 1085): Found as 'SystemNative_Stat2'.
09-30 14:49:53.564 D/Mono ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.564 D/Mono ( 1085): Searching for 'SystemNative_Symlink'.
09-30 14:49:53.564 D/Mono ( 1085): Probing 'SystemNative_Symlink'.
09-30 14:49:53.564 D/Mono ( 1085): Found as 'SystemNative_Symlink'.
09-30 14:49:53.588 W/com.companyname.agentconnectmobile( 1085): type=1400 audit(0.0:4414): avc: denied { link } for comm=54687265616420506F6F6C20576F72 name="PropertyStore.forms.tmp" dev="dm-6" ino=77573 scontext=u:r:untrusted_app_27:s0:c6,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c257,c512,c768 tclass=file permissive=0
09-30 14:49:53.597 D/Mono ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.598 D/Mono ( 1085): Searching for 'SystemNative_CopyFile'.
09-30 14:49:53.598 D/Mono ( 1085): Probing 'SystemNative_CopyFile'.
09-30 14:49:53.598 D/Mono ( 1085): Found as 'SystemNative_CopyFile'.
**System.NullReferenceException:** 'Object reference not set to an instance of an object.'
This is my first Xamarin application so I'm not sure if I am supposed to be handling exit on Android somehow? I haven't seen this issue on iOS.
EDIT: This NRE appears to be specific to a Xamarin.Forms 4.2 issue as shown in the answer.
Had a similar crash, now the issue seems to be that shell is pushing a null page into the NavStack in version 4.2.xxx and above which is very annoying but it is what it is. I was able to solve this btw by writing the following code in the OnBackButtonPressed of my Apps Shell class.
protected override bool OnBackButtonPressed()
{
if (Application.Current.MainPage.GetType() == typeof(AppShell) && Shell.Current.Navigation.NavigationStack.Where(x => x != null).Any())
{
return base.OnBackButtonPressed();
}
else
{
System.Diagnostics.Process.GetCurrentProcess().CloseMainWindow();
return true;
}
}
Where AppShell is my custom Shell class.
For the record, this has been identified in https://github.com/xamarin/Xamarin.Forms/issues/6640. The issue has been fixed in v4.3.0, but for those who are still using v4.2.0, the provided workaround is to
bypass the crash with the use of a custom renderer which dont null the shell in the dispose, like this.
[assembly: ExportRenderer(typeof(Shell), typeof(ShellRendererCustomDispose))]
namespace App.Droid.Renderers
{
public class ShellRendererCustomDispose : ShellRenderer
{
bool _disposed;
public ShellRendererCustomDispose(Context context)
: base(context)
{
}
protected override void Dispose(bool disposing)
{
if (_disposed)
{
return;
}
if (disposing)
{
Element.PropertyChanged -= OnElementPropertyChanged;
Element.SizeChanged -= (EventHandler)Delegate.CreateDelegate(typeof(EventHandler), this, "OnElementSizeChanged"); // OnElementSizeChanged is private, so use reflection
}
_disposed = true;
}
}
}

`gdb` unable to unwind a stack

Consider following (broken) code:
#include <iostream>
#include <memory>
using namespace std;
class Test {
public:
unique_ptr<string> s;
Test() : s(NULL) {
}
void update(string& st) {
s = unique_ptr<string>(&(st));
}
};
void update(Test& t) {
string s("Hello to you");
t.update(s);
}
int main() {
Test t;
update(t);
cout << *t.s << endl;
}
Here we have error in method Test::update() we do not make a uniq copy of an object. So when the program is run under macOS, you'll get:
$ ./test
Hello t��E]�
test(44981,0x7fff99ba93c0) malloc: *** error for object 0x7fff5d45b690: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[1] 44981 abort ./test
I've been able to to debug this case successfully using lldb. Even without setting a breakpoint in malloc_error_break, just running application until it gets caught in SIGABRT handler.
lldb ./test
(lldb) target create "./test"
Current executable set to './test' (x86_64).
(lldb) run
Process 44993 launched: './test' (x86_64)
Hello t��_�
test(44993,0x7fff99ba93c0) malloc: *** error for object 0x7fff5fbff680: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Process 44993 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00007fff90d6cd42 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
-> 0x7fff90d6cd42 <+10>: jae 0x7fff90d6cd4c ; <+20>
0x7fff90d6cd44 <+12>: movq %rax, %rdi
0x7fff90d6cd47 <+15>: jmp 0x7fff90d65caf ; cerror_nocancel
0x7fff90d6cd4c <+20>: retq
Target 0: (test) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
* frame #0: 0x00007fff90d6cd42 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fff90e5a457 libsystem_pthread.dylib`pthread_kill + 90
frame #2: 0x00007fff90cd2420 libsystem_c.dylib`abort + 129
frame #3: 0x00007fff90dc1fe7 libsystem_malloc.dylib`free + 530
frame #4: 0x0000000100001f7b test`Test::~Test() [inlined] std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::operator(this=0x00007fff5fbff730, __ptr="\a\x94\x99�\x7f\0\0��_�\x7f\0\0\x80�_�\x7f\0\00�_�\x7f\0\00�_�\x7f\0\00�_�\x7f\0\00�_�\x7f\0\00�_�\x7f\0\0��_�\x7f\0\0\x15\x1e\0\0\x01\0\0\0\x80�_�\x7f\0\n0")(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) const at memory:2397
frame #5: 0x0000000100001f46 test`Test::~Test() [inlined] std::__1::unique_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::reset(this=0x00007fff5fbff730, __p="") at memory:2603
frame #6: 0x0000000100001ef3 test`Test::~Test() [inlined] std::__1::unique_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::~unique_ptr(this=0x00007fff5fbff730) at memory:2571
frame #7: 0x0000000100001ef3 test`Test::~Test() [inlined] std::__1::unique_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::~unique_ptr(this=0x00007fff5fbff730) at memory:2571
frame #8: 0x0000000100001ef3 test`Test::~Test(this=0x00007fff5fbff730) at main.cpp:6
frame #9: 0x0000000100001e15 test`Test::~Test(this=0x00007fff5fbff730) at main.cpp:6
frame #10: 0x0000000100001ab6 test`main at main.cpp:28
frame #11: 0x00007fff90c3e235 libdyld.dylib`start + 1
Now I see that the problem is in Test destructor, and from here it's a piece of cake.
Unfortunately, trying to debug this case using gdb under macOS was a total failure. Here is what I've done:
$ gdb ./test
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin16.7.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from test...Reading symbols from /Users/bazhenov/Developer/linear-counter/tests/test/test.dSYM/Contents/Resources/DWARF/test...done.
done.
(gdb) run
Starting program: /Users/bazhenov/Developer/linear-counter/tests/test/test
[New Thread 0x1403 of process 45204]
warning: unhandled dyld version (15)
Hello tQ�_�
test(45204,0x7fff99ba93c0) malloc: *** error for object 0x7fff5fbff650: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Thread 2 received signal SIGABRT, Aborted.
0x00007fff90d6cd42 in ?? ()
(gdb) bt
#0 0x00007fff90d6cd42 in ?? ()
#1 0x00007fff90e5a457 in ?? ()
#2 0x00007fff5fbff590 in ?? ()
#3 0x0000030700000000 in ?? ()
#4 0x00007fff5fbff590 in ?? ()
#5 0x00007fff5fbff650 in ?? ()
#6 0x00007fff5fbff5a0 in ?? ()
#7 0x00007fff90cd2420 in ?? ()
#8 0xffffffff00000018 in ?? ()
#9 0x00007fff5fbff5b0 in ?? ()
#10 0x00007fffffffffdf in ?? ()
#11 0x00000001000c4000 in ?? ()
#12 0x00007fff5fbff5f0 in ?? ()
#13 0x00007fff90dc1fe7 in ?? ()
#14 0x378b45e65b700074 in ?? ()
#15 0x00007fff99ba00ac in ?? ()
#16 0x0000000000000000 in ?? ()
(gdb)
The question is: why gdb fails to unwind the stack correctly and what options do I have if I need to get correct backtrace using gdb?
why gdb fails to unwind the stack correctly
There are some problems on Mac OS X Sierra with gdb, see this post and gdb bug report.
what options do I have if I need to get correct backtrace using gdb
You can try to downgrade Mac OS (don't know whether is it possible) or try to apply temporary hack patch from above bug report.

Cocoa webview garbage collection, crashing when loading

I have this web view connected via IB in a garbage collected project. I can load a url perfectly fine in the web view one time, but then anytime after that one time it seems to crash randomly. I've got a couple different errors, a few specifically referencing garbage collection and saying EXC_BAD_ACCESS... the most recent and common though is this:
Thread 1, Queue : com.apple.main-thread
#0 0x00007fff8b4ffe90 in objc_msgSend ()
#1 0x00000004001ae2c0 in <????> ()
#2 0x00007fff97ab1313 in _NSURLConnectionDidReceiveData ()
#3 0x00007fff93e22388 in URLConnectionClient::_clientDidReceiveData(__CFArray const*, URLConnectionClient::ClientConnectionEventQueue*) ()
#4 0x00007fff93ed3c5b in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) ()
#5 0x00007fff93dfeb49 in URLConnectionClient::processEvents() ()
#6 0x00007fff93dfe9ee in MultiplexerSource::perform() ()
#7 0x00007fff8fd666e1 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#8 0x00007fff8fd65f4d in __CFRunLoopDoSources0 ()
#9 0x00007fff8fd8cd39 in __CFRunLoopRun ()
#10 0x00007fff8fd8c676 in CFRunLoopRunSpecific ()
#11 0x00007fff97a54f9f in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#12 0x00007fff954861a2 in WebCore::ResourceHandle::loadResourceSynchronously(WebCore::NetworkingContext*, WebCore::ResourceRequest const&, WebCore::StoredCredentials, WebCore::ResourceError&, WebCore::ResourceResponse&, WTF::Vector<char, 0ul>&) ()
#13 0x00007fff95485c1f in WebCore::FrameLoader::loadResourceSynchronously(WebCore::ResourceRequest const&, WebCore::StoredCredentials, WebCore::ResourceError&, WebCore::ResourceResponse&, WTF::Vector<char, 0ul>&) ()
#14 0x00007fff9548583b in WebCore::DocumentThreadableLoader::loadRequest(WebCore::ResourceRequest const&, WebCore::SecurityCheckPolicy) ()
#15 0x00007fff95485376 in WebCore::DocumentThreadableLoader::DocumentThreadableLoader(WebCore::Document*, WebCore::ThreadableLoaderClient*, WebCore::DocumentThreadableLoader::BlockingBehavior, WebCore::ResourceRequest const&, WebCore::ThreadableLoaderOptions const&, WTF::String const&) ()
#16 0x00007fff95485220 in WebCore::DocumentThreadableLoader::loadResourceSynchronously(WebCore::Document*, WebCore::ResourceRequest const&, WebCore::ThreadableLoaderClient&, WebCore::ThreadableLoaderOptions const&) ()
#17 0x00007fff95485076 in WebCore::XMLHttpRequest::createRequest(int&) ()
#18 0x00007fff95484d07 in WebCore::XMLHttpRequest::send(WTF::String const&, int&) ()
#19 0x00007fff95484807 in WebCore::XMLHttpRequest::send(int&) ()
#20 0x00007fff954844e7 in WebCore::JSXMLHttpRequest::send(JSC::ExecState*) ()
#21 0x00007fff95484432 in WebCore::jsXMLHttpRequestPrototypeFunctionSend(JSC::ExecState*) ()
#22 0x00004f57b12011e8 in <????> ()
#23 0x00007fff900b778b in JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::ScopeChainNode*, JSC::JSObject*) ()
#24 0x000000010c2e4da0 in <????> ()
#25 0x000000010a3f76a0 in <????> ()
#26 0x00007fff90286700 in JSC::JSFunction::~JSFunction() ()
#27 0x4810c08348eba9ab in <????> ()
I really don't know what to do. The crashing is sporadic and sometimes I can load the web view a few times before it crashes the app...
Also I've been getting this one a lot:
Thread 10, Queue : Garbage Collection Work Queue
#0 0x00007fff90168f6f in auto_fatal ()
#1 0x00007fff9017713b in Auto::Zone::handle_overretained_garbage(void*, int, int) ()
#2 0x00007fff90177844 in Auto::Zone::free_garbage(unsigned long, void**, unsigned long, void**, unsigned long&, unsigned long&) ()
#3 0x00007fff90164837 in auto_collect_internal(Auto::Zone*, unsigned int) ()
#4 0x00007fff9016021a in __auto_zone_collect_block_invoke_0 ()
#5 0x00007fff954098ba in _dispatch_call_block_and_release ()
#6 0x00007fff9540b10a in _dispatch_queue_drain ()
#7 0x00007fff9540af66 in _dispatch_queue_invoke ()
#8 0x00007fff9540a760 in _dispatch_worker_thread2 ()
#9 0x00007fff91adf3da in _pthread_wqthread ()
#10 0x00007fff91ae0b85 in start_wqthread ()

what's the meaning of this coredump?

got this coredump when the application started.
Core was generated by `/opt/SURGE/bin/SIM.run 0 0 1'.
Program terminated with signal 7, Bus error.
#0 0xf79d7ddb in __gxx_personality_v0 () from /opt/SURGE/lib/libTsdThreadedInput_ix86-linux-sles9-mt.so
(gdb) bt
#0 0xf79d7ddb in __gxx_personality_v0 () from /opt/SURGE/lib/libTsdThreadedInput_ix86-linux-sles9-mt.so
#1 0x32709808 in ?? ()
#2 0xeecb6414 in ?? ()
#3 0xeecb6418 in ?? ()
#4 0x00000000 in ?? ()
(gdb)
what does it mean?
and where does the problem happen?
looks like it is trying to access memory location at the address 0x00000000. but it is not saying which routine does that.

Resources