unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.78k stars 707 forks source link

Fully templated `InPlace` `ContentDialog` control throws exception on creation when defined inline in XAML #4640

Open BrianDT opened 3 years ago

BrianDT commented 3 years ago

Current behavior

On calling ShowAsync the following exception is raised Java.Lang.IllegalStateException Message=The specified child already has a parent. You must call removeView() on the child's parent first.

Expected behavior

The content dialog should be displayed

How to reproduce it (as minimally and precisely as possible)

Can be reproduced by running the sample located here: https://github.com/BrianDT/UWPTemplatedContentDialogIssue.git

Workaround

A workaround for this issue is to define the ContentDialog in its own XAML file, and instanciate it from there. There's a "Uno Platform" ContentDialog template in Visual Studio (when the Uno Platform VSIX is installed).

Environment

Nuget Package: Not sure

Nuget Package Version(s): 3.3.0

Affected platform(s):

IDE:

Relevant plugins:

Anything else we need to know?

jeromelaban commented 3 years ago

Thanks for the report. This is an android limitation with regards to multiple popups.

Please see a workaround in https://github.com/unoplatform/uno/issues/2533, I'll close this issue.

BrianDT commented 3 years ago

Just noting that the workaround in #2533 does not resolve this issue. The sample has been updated to reflect this.

stefanolson commented 3 years ago

fyi; I have a similar issue. The workaround in #2533 didn't make any difference for me either.

JanKleprlik commented 3 years ago

Setting up the ContentDialog in code instead of XAML worked for me as a workaround.

BrianDT commented 3 years ago

Agreed in code definition is a workaround but I really wanted to use the InPlace option which the documentation suggests is now available. The example has been extended to include both inplace and in code dialogs for Uno.

jeromelaban commented 3 years ago

If you still have the exception stack, can you add it to the issue?

BrianDT commented 3 years ago

This is everything from the output window


[ViewRootImpl@5dd2d75[MainActivity]] Relayout returned: old=(0,0,1920,1200) new=(0,0,1920,1200) req=(1920,1200)0 dur=5 res=0x40001 s={true 489447141376} ch=false
**Java.Lang.IllegalStateException:** 'The specified child already has a parent. You must call removeView() on the child's parent first.'

[tentDialogIssu] Explicit concurrent copying GC freed 3944(359KB) AllocSpace objects, 2(36KB) LOS objects, 49% free, 2041KB/4082KB, paused 128us total 18.873ms
[Mono] GC_TAR_BRIDGE bridges 284 objects 38351 opaque 35181 colors 284 colors-bridged 284 colors-visible 284 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.19ms tarjan 44.07ms scc-setup 0.17ms gather-xref 0.01ms xref-setup 0.02ms cleanup 3.63ms
[Mono] GC_BRIDGE: Complete, was running for 26.37ms
[Mono] GC_MINOR: (Nursery full) time 96.45ms, stw 99.54ms promoted 2475K major size: 9168K in use: 8392K los size: 1024K in use: 594K
Thread finished: <Thread Pool> #8
The thread 0x8 has exited with code 0 (0x0).
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for 'java_interop_jnienv_throw'.
[Mono] Probing 'java_interop_jnienv_throw'.
[Mono] Found as 'java_interop_jnienv_throw'.
[tentDialogIssu] java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: JNI CallObjectMethodA called with pending exception java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
[tentDialogIssu] java_vm_ext.cc:577] (Throwable with no stack trace)
[tentDialogIssu] java_vm_ext.cc:577] 
[tentDialogIssu] java_vm_ext.cc:577]     in call to CallObjectMethodA
[tentDialogIssu] java_vm_ext.cc:577]     from void mono.java.lang.RunnableImplementor.n_run()
**Java.Lang.IllegalStateException:** 'Loading...'

[tentDialogIssu] runtime.cc:642] Runtime aborting...
[tentDialogIssu] runtime.cc:642]   native: #02 pc 00000000004dc3e4  /apex/com.a03-29 12:37:59.836 F/tentDialogIssu( 8336): runtime.cc:642] Dumping all threads without mutator lock held
[tentDialogIssu] runtime.cc:642] All threads:
[tentDialogIssu] runtime.cc:642] DALVIK THREADS (25):
[tentDialogIssu] runtime.cc:642] "main" prio=10 tid=1 Runnable
[tentDialogIssu] runtime.cc:642]   | group="" sCount=0 dsCount=0 flags=0 obj=0x72b55948 self=0x73021ab000
[tentDialogIssu] runtime.cc:642]   | sysTid=8336 nice=-10 cgrp=default sched=0/0 handle=0x730371cee8
[tentDialogIssu] runtime.cc:642]   | state=R schedstat=( 9056805259 821009689 6293 ) utm=825 stm=80 core=2 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7ffae15000-0x7ffae17000 stackSize=8192KB
[tentDialogIssu] runtime.cc:642]   | held mutexes= "abort lock" "mutator lock"(shared held)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 0000000000412bfc  /apex/com.android.runtime/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
[tentDialogIssu] 3-29 12:37:59.836 F/tentDialogIssu( 8336): runtime.cc:642]   native: #01 pc 00000000004fa380  /apex/com.android.runtime/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+504)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 00000000005147c4  /apex/com.android.runtime/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+820)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 000000000050db30  /apex/com.android.runtime/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+528)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 000000000050cef0  /apex/com.android.runtime/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+1792)
[tentDialogIssu] runtime.cc:642]   native: #05 pc 00000000004b9e70  /apex/com.android.runtime/lib64/libart.so (art::Runtime::Abort(char const*)+1352)
[tentDialogIssu] runtime.cc:642]   native: #06 pc 000000000000c650  /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+608)
[tentDialogIssu] runtime.cc:642]   native: #07 pc 00000000003783a4  /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1604)
[tentDialogIssu] runtime.cc:642]   native: #08 pc 0000000000378564  /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+108)
[tentDialogIssu] runtime.cc:642]   native: #09 pc 000000000036a928  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+136)
[tentDialogIssu] runtime.cc:642]   native: #10 pc 0000000000369390  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+1144)
[tentDialogIssu] runtime.cc:642]   native: #11 pc 0000000000368760  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*)+624)
[tentDialogIssu] runtime.cc:642]   native: #12 pc 000000000036d864  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CheckCallArgs(art::ScopedObjectAccess&, art::(anonymous namespace)::ScopedCheck&, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, art::InvokeType, art::(anonymous namespace)::VarArgs const*)+132)
[tentDialogIssu] runtime.cc:642]   native: #13 pc 000000000036e2ec  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodA(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, jvalue const*, art::Primitive::Type, art::InvokeType)+692)
[tentDialogIssu] runtime.cc:642]   native: #14 pc 00000000000053dc  /data/app/TemplatedContentDialogIssue.TemplatedContentDialogIssue-AiV5N9cTu64W_SBOEme22Q==/lib/arm64/libxa-internal-api.so (java_interop_jnienv_call_object_method_a+48)
[tentDialogIssu] runtime.cc:642]   native: #15 pc 00000000000054e8  <anonymous:7266dd3000> (???)
[tentDialogIssu] runtime.cc:642]   at mono.java.lang.RunnableImplementor.n_run(Native method)
[tentDialogIssu] runtime.cc:642]   at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
[tentDialogIssu] runtime.cc:642]   at android.os.Handler.handleCallback(Handler.java:883)
[tentDialogIssu] runtime.cc:642]   at android.os.Handler.dispatchMessage(Handler.java:100)
[tentDialogIssu] runtime.cc:642]   at android.os.Looper.loop(Looper.java:237)
[tentDialogIssu] runtime.cc:642]   at android.app.ActivityThread.main(ActivityThread.java:8167)
[tentDialogIssu] runtime.cc:642]   at java.lang.reflect.Method.invoke(Native method)
[tentDialogIssu] runtime.cc:642]   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
[tentDialogIssu] runtime.cc:642]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Jit thread pool worker thread 0" prio=10 tid=2 Native
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0000 self=0x726c602000
[tentDialogIssu] runtime.cc:642]   | sysTid=30449 nice=-20 cgrp=default sched=0/0 handle=0x726fed1d40
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 69995994 2331770 96 ) utm=5 stm=1 core=6 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x726fdd3000-0x726fdd5000 stackSize=1023KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30449/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 000000000008033c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000014c094  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 0000000000516254  /apex/com.android.runtime/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*)+260)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 00000000005155c8  /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Run()+144)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 000000000051507c  /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+148)
[tentDialogIssu] r03-29 12:37:59.837 F/tentDialogIssu( 8336): runtime.cc:642]   native: #05 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:642]   native: #06 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Signal Catcher" prio=10 tid=7 WaitingInMainSignalCatcherLoop
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0078 self=0x7275265800
[tentDialogIssu] runtime.cc:642]   | sysTid=30454 nice=-20 cgrp=default sched=0/0 handle=0x726cdccd50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 296114 475885 7 ) utm=0 stm=0 core=6 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x726ccd6000-0x726ccd8000 stackSize=991KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30454/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 00000000000cf0e8  /apex/com.android.runtime/lib64/bionic/libc.so (__rt_sigtimedwait+8)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 00000000000905bc  /apex/com.android.runtime/lib64/bionic/libc.so (sigwait+68)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 00000000004dac48  /apex/com.android.runtime/lib64/libart.so (art::SignalCatcher::Run(void*)+304)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:642]   native: #05 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "ADB-JDWP Connection Control Thread" prio=10 tid=8 WaitingInMainDebuggerLoop
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc00f0 self=0x726c686800
[tentDialogIssu] runtime.cc:642]   | sysTid=30455 nice=-20 cgrp=default sched=0/0 handle=0x726cccfd50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 581924 3494576 9 ) utm=0 stm=0 core=7 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x726cbd9000-0x726cbdb000 stackSize=991KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30455/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 00000000000cefe8  /apex/com.android.runtime/lib64/bionic/libc.so (__ppoll+8)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000008dea8  /apex/com.android.runtime/lib64/bionic/libc.so (poll+88)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 0000000000008c98  /apex/com.android.runtime/lib64/libadbconnection.so (adbconnection::AdbConnectionState::RunPollLoop(art::Thread*)+816)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 0000000000007094  /apex/com.android.runtime/lib64/libadbconnection.so (adbconnection::CallbackFunction(void*)+1076)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:642]   native: #05 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "FinalizerWatchdogDaemon" prio=10 tid=9 Waiting
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0168 self=0x7275287000
[tentDialogIssu] runtime.cc:642]   | sysTid=30460 nice=4 cgrp=default sched=0/0 handle=0x721b98bd50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 686153 5583848 13 ) utm=0 stm=0 core=0 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x721b889000-0x721b88b000 stackSize=1039KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30460/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 000000000008033c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000014c094  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 000000000040df6c  /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, long, int, bool, art::ThreadState)+620)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 000000000040f9f8  /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+288)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Native method)
[tentDialogIssu] runtime.cc:642]   - waiting on <0x0c49b98b> (a java.lang.Daemons$FinalizerWatchdogDaemon)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Object.java:442)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Object.java:568)
[tentDialogIssu] runtime.cc:642]   at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded(Daemons.java:339)
[tentDialogIssu] runtime.cc:642]   - locked <0x0c49b98b> (a java.lang.Daemons$FinalizerWatchdogDaemon)
[tentDialogIssu] runtime.cc:642]   at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:319)
[tentDialogIssu] runtime.cc:642]   at java.lang.Daemons$Daemon.run(Daemons.java:137)
[tentDialogIssu] runtime.cc:642]   at java.lang.Thread.run(Thread.java:919)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "ReferenceQueueDaemon" prio=10 tid=10 Waiting
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc01e0 self=0x7302255000
[tentDialogIssu] runtime.cc:642]   | sysTid=30458 nice=4 cgrp=default sched=0/0 handle=0x721bb9dd50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 4943694 4079501 23 ) utm=0 stm=0 core=0 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x721ba9b000-0x721ba9d000 stackSize=1039KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30458/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 000000000008033c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000014c094  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 000000000040df6c  /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, long, int, bool, art::ThreadState)+620)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 000000000040f9f8  /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+288)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Native method)
[tentDialogIssu] runtime.cc:642]   - waiting on <0x0e6e8a68> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Object.java:442)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Object.java:568)
[tentDialogIssu] runtime.cc:642]   at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:215)
[tentDialogIssu] runtime.cc:642]   - locked <0x0e6e8a68> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
[tentDialogIssu] runtime.cc:642]   at java.lang.Daemons$Daemon.run(Daemons.java:137)
[tentDialogIssu] runtime.cc:642]   at java.lang.Thread.run(Thread.java:919)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "FinalizerDaemon" prio=10 tid=11 Waiting
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0258 self=0x7302256c00
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 4375656 1815078 18 ) utm=0 stm=0 core=0 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x721b992000-0x721b994000 stackSize=1039KB
[tentDialogIssu] ru03-29 12:37:59.838 F/tentDialogIssu( 8336): runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30459/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 000000000008033c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000014c094  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 000000000040df6c  /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, long, int, bool, art::ThreadState)+620)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 000000000040f9f8  /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+288)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Native method)
[tentDialogIssu] runtime.cc:642]   at java.lang.Object.wait(Object.java:442)
[tentDialogIssu] runtime.cc:642]   - locked <0x07acce81> (a java.lang.Object)
[tentDialogIssu] runtime.cc:642]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:211)
[tentDialogIssu] runtime.cc:642]  03-29 12:37:59.838 F/tentDialogIssu( 8336): runtime.cc:642]   at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:271)
[tentDialogIssu] runtime.cc:642]   at java.lang.Daemons$Daemon.run(Daemons.java:137)
[tentDialogIssu] runtime.cc:642]   at java.lang.Thread.run(Thread.java:919)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "HeapTaskDaemon" prio=10 tid=12 WaitingForTaskProcessor
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc02d0 self=0x7302329c00
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 102974919 200156888 365 ) utm=9 stm=0 core=0 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7266c7a000-0x7266c7c000 stackSize=1039KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000592ac  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+6003-29 12:37:59.838 F/tentDialogIssu( 8336): runtime.cc:642]   kernel: (couldn't read /proc/self/task/30457/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 000000000008033c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000014c094  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 000000000028ee74  /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+508)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 000000000028f6f4  /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+92)
[tentDialogIssu] runtime.cc:642]   at dalvik.system.VMRuntime.runHeapTasks(Native method)
[tentDialogI03-29 12:37:59.838 F] runtime.cc:642]   at java.lang.Daemons$HeapTaskDaemon.runInternal(Daemons.java:523)
[tentDialogIssu] runtime.cc:642]   at java.lang.Daemons$Daemon.run(Daemons.java:137)
[tentDialogIssu] runtime.cc:642]   at java.lang.Thread.run(Thread.java:919)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Binder:8336_1" prio=10 tid=13 Native
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0348 self=0x727537e800
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 6980961 5459501 35 ) utm=0 stm=0 core=6 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x721768e000-0x7217690000 stackSize=991KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30462/stack)
[tentDialogIssu] runtime.cc:642]   n03-29 12:37:59.838 F/tentDialogIssu( 8336): runtime.cc:642]   native: #00 pc 00000000000cefa4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000008bde4  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 0000000000058904  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+260)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 0000000000058ae0  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000592ac  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+60)
[tentDialogIssu] runtime.cc:642]   (no managed03-29 12:37:59.838 F/tentDialogIssu( 8336): runtime.cc:642]   native: #05 pc 000000000007fa30  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
[tentDialogIssu] runtime.cc:642]   native: #06 pc 000000000001380c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
[tentDialogIssu] runtime.cc:642]   native: #07 pc 00000000000f1524  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
[tentDialogIssu] runtime.cc:642]   native: #08 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:642]   native: #09 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Binder:8336_2" prio=10 tid=14 Native
[tentDialogIssu] runtime.cc:642]   native: #00 pc 0000000000080340  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)03-29 12:37:59.838 F/tentDialogIssu( 8336): runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc03c0 self=0x7266933000
[tentDialogIssu] runtime.cc:642]   | sysTid=30464 nice=0 cgrp=default sched=0/0 handle=0x7216687d50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 9968729 4456154 28 ) utm=0 stm=0 core=1 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7216591000-0x7216593000 stackSize=991KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30464/stack)
[tentDialogIssu] 3-29 12:37:59.839 F/tentDialogIssu( 8336): runtime.cc:642]   native: #00 pc 00000000000cefa4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000008bde4  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 0000000000058904  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+260)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 0000000000058ae0  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000592ac  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+60)
[tentDialogIssu] runtime.cc:642]   native: #05 pc 000000000007fa30  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
[tentDialogIssu] runtime.cc:642]   native: #06 pc 000000000001380c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
[tentDialogIssu] runtime.cc:642]   native: #07 pc 00000000000f1524  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
[tentDialogIssu] runtime.cc:642]   native: #08 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:6403-29 12:37:59.839 F/tentDialogIssu( 8336): runtime.cc:642]   native: #09 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Binder:8336_3" prio=10 tid=15 Native
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0438 self=0x72753ce000
[tentDialogIssu] runtime.cc:642]   | sysTid=30548 nice=-10 cgrp=defaul03-29 12:37:59.839 F/tentDialogIssu( 8336): runtime.cc:642]   | sysTid=30466 nice=0 cgrp=default sched=0/0 handle=0x721558ad50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 17951384 42536001 35 ) utm=1 stm=0 core=4 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7215494000-0x7215496000 stackSize=991KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30466/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 00000000000cefa4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000008bde4  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 0000000000058ae0  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000592ac  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+60)
[tentDialogIssu] runtime.cc:642]   native: #05 pc 000000000007fa30  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
[tentDialogIssu] runtime.cc:642]   native: #06 pc 000000000001380c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
[tentDialogIssu] runtime.cc:642]   native: #07 pc 00000000000f1524  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
[tentDialogIssu] runtime.cc:642]   native: #08 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:642]   native: #09 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Binder:8336_4" prio=10 tid=16 Native
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc04b0 self=0x7266944800
[tentDialogIssu] runtime.cc:642]   | sysTid=30473 nice=0 cgrp=default sched=0/0 handle=0x721448dd50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 7696309 7541193 10 ) utm=0 stm=0 core=1 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7214397000-0x7214399000 stackSize=991KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30473/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 00000000000cefa4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000008bde4  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 0000000000058904  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+260)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 0000000000058ae0  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000592ac  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+60)
[tentDialogIssu] runtime.cc:642]   native: #05 pc 000000000007fa30  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
[tentDialogIssu] runtime.cc:642]   native: #06 pc 000000000001380c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
[tentDialogIssu] runtime.cc:642]   native: #07 pc 00000000000f1524  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
[tentDialogIssu] runtime.cc:642]   native: #08 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:642]   native: #09 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Profile Saver" prio=10 tid=17 Native
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0528 self=0x72753f4800
[tentDialogIssu] runtime.cc:642]   | sysTid=30509 nice=9 cgrp=default sched=0/0 handle=0x7213057d50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 9985041 21526614 63 ) utm=0 stm=0 core=5 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7212f61000-0x7212f63000 stackSize=991KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30509/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 0000000000080340  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 000000000014c4d0  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::TimedWait(art::Thread*, long, int)+168)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 0000000000347e34  /apex/com.android.runtime/lib64/libart.so (art::ProfileSaver::Run()+620)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 000000000034b9b0  /apex/com.android.runtime/lib64/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+88)
[tentDialogIssu] runtime.cc:642]   native: #04 pc 00000000000e3b24  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
[tentDialogIssu] runtime.cc:642]   native: #05 pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Thread-6" prio=10 tid=18 Native
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc05a0 self=0x72669b1000
[tentDialogIssu] runtime.cc:642]   | sysTid=30546 nice=-10 cgrp=default sched=0/0 handle=0x720a07bd50
[tentDialogIssu] runtime.cc:642]   | state=S schedstat=( 46494955 19170346 254 ) utm=2 stm=1 core=1 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7209e7d000-0x7209e7f000 stackSize=2047KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[tentDialogIssu] runtime.cc:642]   kernel: (couldn't read /proc/self/task/30546/stack)
[tentDialogIssu] runtime.cc:642]   native: #00 pc 000000000008033c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
[tentDialogIssu] runtime.cc:642]   native: #01 pc 0000000000083f3c  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+140)
[tentDialogIssu] runtime.cc:642]   native: #02 pc 000000000008f41c  /apex/com.android.runtime/lib64/bionic/libc.so (sem_wait+116)
[tentDialogIssu] runtime.cc:642]   native: #03 pc 00000000002187f8  /data/app/TemplatedContentDialogIssue.TemplatedContentDialogIssue-AiV5N9cTu64W_SBOEme22Q==/lib/arm64/libmonosgen-2.0.so (finalizer_thread+320)
[tentDialogIssu] runtime.cc:642]   (no managed stack frames)
[tentDialogIssu] runtime.cc:642] 
[tentDialogIssu] runtime.cc:642] "Thread-7" prio=10 tid=19 Native
[tentDialogIssu] runtime.cc:642]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12fc0618 self=0x7275288c00
[tentDialogIssu] runtime.cc:642]   | sysTid=30548 nice=-10 cgrp=default sched=0/0 handle=0x7208e76d50
[tentDialogIssu] runtime.cc:642]   | state=R schedstat=( 414354188 32571773 787 ) utm=15 stm=25 core=6 HZ=100
[tentDialogIssu] runtime.cc:642]   | stack=0x7208c78000-0x7208c7a000 stackSize=2047KB
[tentDialogIssu] runtime.cc:642]   | held mutexes=
[libc] Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 8336 (tentDialogIssue), pid 8336 (tentDialogIssue)
``
BrianDT commented 3 years ago

The above was running version 3.5.1 Also confirmed as still an issue on 3.7.0-dev.62

jeromelaban commented 3 years ago

A workaround for this issue is to define the ContentDialog in its own XAML file, and instanciate it from there. There's a "Uno Platform" ContentDialog template in Visual Studio (when the Uno Platform VSIX is installed).

BrianDT commented 1 year ago

Exception from 4.6.19

[OpenGLRenderer] Davey! duration=9223241691997ms; Flags=0, FrameTimelineVsyncId=-1, IntendedVsync=130344856787825, Vsync=130344856809440, InputEventId=375673294, HandleInputStart=130344856889596, AnimationStart=130344856903607, PerformTraversalsStart=130344856908659, DrawStart=130344870601680, FrameDeadline=9223372036854775807, FrameInterval=130344856809440, FrameStartTime=16666666, SyncQueued=130344879321367, SyncStart=130344879507721, IssueDrawCommandsStart=130344880617305, SwapBuffers=130344889787669, FrameCompleted=9223372036854775807, DequeueBufferDuration=115572, QueueBufferDuration=3169843, GpuCompleted=9223372036854775807, SwapBuffersCompleted=130344895188346, DisplayPresentTime=0, Java.Lang.IllegalStateException: 'The specified child already has a parent. You must call removeView() on the child's parent first.'

[MIUIScout App] Enter APP_SCOUT_WARNING State [MIUIScout App] Event:APP_SCOUT_WARNING Thread:main backtrace: [MIUIScout App] at mono.java.lang.RunnableImplementor.n_run(Native Method) [MIUIScout App] at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30) [MIUIScout App] at android.os.Handler.handleCallback(Handler.java:938) [MIUIScout App] at android.os.Handler.dispatchMessage(Handler.java:99) [MIUIScout App] at android.os.Looper.loopOnce(Looper.java:210) [MIUIScout App] at android.os.Looper.loop(Looper.java:299) [MIUIScout App] at android.app.ActivityThread.main(ActivityThread.java:8168) [MIUIScout App] at java.lang.reflect.Method.invoke(Native Method) [MIUIScout App] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556) [MIUIScout App] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037) [MIUIScout App] Enter APP_SCOUT_HANG state [MIUIScout App] Event:APP_SCOUT_HANG Thread:main backtrace: [MIUIScout App] at mono.java.lang.RunnableImplementor.n_run(Native Method) [MIUIScout App] at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30) [MIUIScout App] at android.os.Handler.handleCallback(Handler.java:938) [MIUIScout App] at android.os.Handler.dispatchMessage(Handler.java:99) [MIUIScout App] at android.os.Looper.loopOnce(Looper.java:210) [MIUIScout App] at android.os.Looper.loop(Looper.java:299) [MIUIScout App] at android.app.ActivityThread.main(ActivityThread.java:8168) [MIUIScout App] at java.lang.reflect.Method.invoke(Native Method) [MIUIScout App] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556) [MIUIScout App] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037) [libc] Requested dump for tid 12909 (tentDialogIssue) [MIUIScout ANR] AnrScout only want msg within 20s, so stop here [MIUIScout ANR] There is no history msgs within 20s [MIUIScout ANR] get period history msg: (Current message: duration=20404ms seq=152 binder=83005ms late=60ms h=android.os.Handler c=mono.java.lang.RunnableImplementor) [MIUIScout ANR] get period history msg:In recent 20s, total historyMsgCount=0