I've updated Xamarin Forms in my Xamarin project. Now this code doesn't work any more.
var view = (View)ItemTemplate.CreateContent();
if (view != null) {
var bindableObject = view as BindableObject;
if (bindableObject != null)
bindableObject.BindingContext = newItem;
_imageStack.Children.Add(view);
}
The problem is (View)ItemTemplate.CreateContent() goes in error:
Message:
Can't resolve name on Element
Source: Xamarin.Forms.Xaml
Stack:
at Xamarin.Forms.Xaml.ReferenceExtension.ProvideValue
(System.IServiceProvider serviceProvider) [0x000b6] in
[...]
In the Debug window I can see the following info
02-20 17:44:04.450 I/art (13331): Starting a blocking GC Explicit
02-20 17:44:04.482 I/art (13331): Explicit concurrent mark sweep GC freed 436(24KB) AllocSpace objects, 0(0B) LOS objects, 21% free, 14MB/18MB, paused 762us total 31.310ms
02-20 17:44:04.482 I/System (13331): FinalizerDaemon: finalize objects = 48
02-20 17:44:04.484 D/Mono (13331): GC_TAR_BRIDGE bridges 20 objects 20 opaque 0 colors 20 colors-bridged 20 colors-visible 20 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.11ms tarjan 0.06ms scc-setup 0.08ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.30ms
02-20 17:44:04.484 D/Mono (13331): GC_BRIDGE: Complete, was running for 34.10ms
02-20 17:44:04.484 D/Mono (13331): GC_MINOR: (Nursery full) time 4.22ms, stw 4.53ms promoted 32K major size: 3504K in use: 2748K los size: 6404K in use: 5406K
My function save an image in memory from the camera in ImageSource format, byte[] and the length in byte of this image.
This indicates that the XAML you are loading contains a {x:Reference foo} markup extension and, at runtime, no element defined with a x:Name="foo" was found in the hierarchy.
Without seeing your XAML, it's impossible to figure if the issue is in your code, or if it's a bug in Xamarin.Forms.
Related
I just downloaded SceneBuilder-15.0.0-RC1.msi from gluon website, installed it. When starting, nothing happens, no message whatsoever. When starting as administrator, basically the same, but I discovered in the installation folder a file is created named hs_err_pidxxxxx.log, containing the following
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=16520, tid=3752
#
# JRE version: (15.0.1+9) (build )
# Java VM: OpenJDK 64-Bit Server VM (15.0.1+9, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C 0x0000000000000000
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
#
--------------- S U M M A R Y ------------
Command Line: --add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED --module-path=C:\Program Files\SceneBuilder\app\mods com.oracle.javafx.scenebuilder.app.SceneBuilderApp
Host: Intel(R) Core(TM) i7-4790K CPU # 4.00GHz, 8 cores, 15G, Windows 10 , 64 bit Build 19041 (10.0.19041.662)
Time: Sun Jan 10 15:57:12 2021 Mitteleuropäische Zeit elapsed time: 0.051742 seconds (0d 0h 0m 0s)
--------------- T H R E A D ---------------
Current thread (0x000001fee94fb5f0): JavaThread "Unknown thread" [_thread_in_vm, id=3752, stack(0x000000f58ac00000,0x000000f58ad00000)]
Stack: [0x000000f58ac00000,0x000000f58ad00000], sp=0x000000f58acfea98, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), data execution prevention violation at address 0x0000000000000000
Registers:
RAX=0x000001fee9c0fe08, RBX=0x000001fe86f28090, RCX=0x000001fee9c0fe08, RDX=0x000000000000034b
RSP=0x000000f58acfea98, RBP=0x000000f58acfebb0, RSI=0x000001fee9c0fdeb, RDI=0x000001fee9c0fdeb
R8 =0x000001fe86f28090, R9 =0x00000000000005ce, R10=0x000000f58acfeb10, R11=0x45f1c7cf10132c67
R12=0x00000000000005ce, R13=0x000001fee94fd810, R14=0x000001fee94fdb50, R15=0x000001fee94fdb50
RIP=0x0000000000000000, EFLAGS=0x0000000000010246
Top of Stack: (sp=0x000000f58acfea98)
0x000000f58acfea98: 00007fff44431833 000001fe86f28090
0x000000f58acfeaa8: 00007fff44431877 00000000000005ce
0x000000f58acfeab8: 0000000000000000 000000f58acfeaf8
0x000000f58acfeac8: 0000000000000000 000001fee9c0fdeb
0x000000f58acfead8: 00007fff44431495 000001fe86f28090
0x000000f58acfeae8: 000000f58acfebb0 000001fee9c0fdeb
0x000000f58acfeaf8: 0000000000000000 000000f58acfebb0
0x000000f58acfeb08: 00007fff0471f74a 000000f5cafefafa
0x000000f58acfeb18: 000000000000034b 00000000000005ce
0x000000f58acfeb28: ffffffff00000007 0000000086183d01
0x000000f58acfeb38: 00005831f7a63934 00000000000005ce
0x000000f58acfeb48: 000001fee94fdb50 000001fee94fbac0
0x000000f58acfeb58: 000001fee738cef0 0000000000525f03
0x000000f58acfeb68: 0000000000000368 000001fee9c0fdeb
0x000000f58acfeb78: 00007fff44431ed7 000001fe86717450
0x000000f58acfeb88: 0000000000000016 0000000000000001
Instructions: (pc=0x0000000000000000)
0xffffffffffffff00:
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x00007fff04affa50, length=0, elements={
}
Java Threads: ( => current thread )
Other Threads:
0x000001fee954ee10 GCTaskThread "GC Thread#0" [stack: 0x000000f58ad00000,0x000000f58ae00000] [id=1668]
0x000001fee9560520 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000f58ae00000,0x000000f58af00000] [id=1408]
0x000001fee9561020 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000f58af00000,0x000000f58b000000] [id=684]
0x000001fe865a40e0 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000f58b000000,0x000000f58b100000] [id=10684]
0x000001fe865a4bf0 ConcurrentGCThread "G1 Young RemSet Sampling" [stack: 0x000000f58b100000,0x000000f58b200000] [id=572]
=>0x000001fee94fb5f0 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=3752, stack(0x000000f58ac00000,0x000000f58ad00000)]
Threads with active compile tasks:
VM state: not at safepoint (not fully initialized)
VM Mutex/Monitor currently owned by a thread: None
Heap address: 0x0000000700e00000, size: 4082 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
CDS disabled.
Compressed class space mapped at: 0x0000000800000000-0x0000000840000000, size: 1073741824
Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x40000000
GC Precious Log:
CPUs: 8 total, 8 available
Memory: 16322M
Large Page Support: Disabled
NUMA Support: Disabled
Compressed Oops: Enabled (Zero based)
Heap Region Size: 2M
Heap Min Capacity: 8M
Heap Initial Capacity: 256M
Heap Max Capacity: 4082M
Pre-touch: Disabled
Parallel Workers: 8
Concurrent Workers: 2
Concurrent Refinement Workers: 8
Periodic GC: Disabled
Heap:
garbage-first heap total 262144K, used 0K [0x0000000700e00000, 0x0000000800000000)
region size 2048K, 1 young (2048K), 0 survivors (0K)
Metaspace used 4K, capacity 4480K, committed 4480K, reserved 1056768K
class space used 3K, capacity 384K, committed 384K, reserved 1048576K
'''
(skipping rest of log file)
any ideas?
I am experimenting with Vivante GPU GC2000 Series, where the clinfo produced the below result.
CL_DEVICE_GLOBAL_MEM_SIZE: 64 MByte
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 32 MByte
CL_DEVICE_GLOBAL_MEM_CACHE_TYPE: Read/Write
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 4096
CL_DEVICE_LOCAL_MEM_SIZE: 1 KByte
CL_DEVICE_LOCAL_MEM_TYPE: Global
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 4 KByte
CL_DEVICE_MAX_CONSTANT_ARGS: 9
From above output, it is clear that 64MByte is the limit for Global Memory allocation.
Now, when I tried allocating 900Mbytes global size, i have not received any error and it is successful.
int noOfBytes = (900 * 1024 * 1024);
memPtr = clCreateBuffer(context, CL_MEM_READ_WRITE, noOfBytes, NULL, &err);
if ( err != CL_SUCESS) {
printf ("Ooops.. Failed");
}
Sounds this experiment is show proving what the clinfo claims. Am i missing any theory or something else ?
Because buffers and images are allocated on an OpenCL context (not an OpenCL device) the actual device allocation is often deferred until the buffer is used on a specific device. So while this allocation seemed to work, if you try to actually use that buffer on your device, you'll get an error.
Please Help My Minecraft Crashes When I join A World. BTW I am using mods. Here Is My Crash Report
---- Minecraft Crash Report ----
WARNING: coremods are present: Java8CheckerCoremod
(Pixelmon-1.8-4.1.1-universal.jar) Contact their authors BEFORE
contacting forge
// Ooh. Shiny.
Time: 1/17/16 11:44 AM Description: Exception in server tick loop
java.lang.NullPointerException: Exception in server tick loop at
com.pixelmonmod.pixelmon.worldGeneration.structure.towns.ComponentTownPart.func_74875_a(ComponentTownPart.java:55)
at
net.minecraft.world.gen.structure.StructureStart.func_75068_a(StructureStart.java:45)
at
net.minecraft.world.gen.structure.MapGenStructure.func_175794_a(MapGenStructure.java:93)
at
net.minecraft.world.gen.ChunkProviderGenerate.func_73153_a(ChunkProviderGenerate.java:415)
at
net.minecraft.world.gen.ChunkProviderServer.func_73153_a(ChunkProviderServer.java:269)
at net.minecraft.world.chunk.Chunk.func_76624_a(Chunk.java:1126) at
net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:52)
at
net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:12)
at
net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:344)
at
net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302)
at
net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12)
at
net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:117)
at
net.minecraft.world.gen.ChunkProviderServer.func_73158_c(ChunkProviderServer.java:92)
at
net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:302)
at
net.minecraft.server.integrated.IntegratedServer.func_71247_a(IntegratedServer.java:112)
at
net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:126)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438)
at java.lang.Thread.run(Thread.java:745)
A detailed walkthrough of the error, its code path and all known
details is as follows:
-- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_25,
Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM
(mixed mode), Oracle Corporation Memory: 876196800 bytes (835 MB) /
2034081792 bytes (1939 MB) up to 2134114304 bytes (2035 MB) JVM
Flags: 6 total;
-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
-Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M IntCache: cache: 11, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.10 FML v8.0.99.99 Minecraft
Forge 11.14.4.1577 7 mods loaded, 7 mods active States: 'U' =
Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' =
Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E'
= Errored UCHIJAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAA FML{8.0.99.99} [Forge Mod Loader]
(forge-1.8-11.14.4.1577.jar) UCHIJAA Forge{11.14.4.1577} [Minecraft
Forge] (forge-1.8-11.14.4.1577.jar) UCHIJAA customnpcs{1.8.0}
[CustomNPCs] (CustomNPCs_1.8.0.jar) UCHIJAA cfm{3.5.1}
[§9MrCrayfish's Furniture Mod] (MrCrayfishFurnitureModv3.5.1(1.8).jar)
UCHIJAA pixelmon{4.1.1} [Pixelmon] (Pixelmon-1.8-4.1.1-universal.jar)
UCHIJAA worldedit{6.1} [WorldEdit] (worldedit-forge-mc1.8-6.1.jar)
Loaded coremods (and transformers): Java8CheckerCoremod
(Pixelmon-1.8-4.1.1-universal.jar)
GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count:
0 / 8; [] Type: Integrated Server (map_client.txt) Is Modded:
Definitely; Client brand changed to 'fml,forge'
You need to delete all the mods and start again as you have installed some that have overlapped.
I am trying to diagnose a memory leak, and I'm getting some strange numbers, perhaps someone can point out why I'm seeing what I'm seeing.
The first step that I performed, was attempting to see where the leak was occurring, in managed or unmanaged space.
I profiled the process, and got the following chart
According to the various documentation on leak diagnostics, I should see either, the private bytes run away while the "all heaps" don't (indicating an unmanaged leak) or they both run away in parallel, indicating a managed one.
It appears I do have a leak - (chart is CPU+Private Bytes+Managed Heaps).
What is puzzling me - is - why do my managed heaps consume only about 30MB between 9am and just before 5pm (but private bytes grow), then all of a sudden - BOOM my managed heaps jump to 3 gigs consumed?
Why would this happen?
UPDATE:
654cf3d8 199671 6389472 System.Web.HttpCacheValidateHandler
719c25e8 559507 6714084 System.Object
654b82e8 95499 6875928 System.Web.HttpServerVarsCollection
05e90a24 253641 7101948 System.Web.Mvc.NameValueCollectionValueProvider+ValueProviderResultPlaceholder+<>c__DisplayClass8
654e42e4 97208 7776640 System.Web.HttpWriter
04c2a5c8 264802 8473664 Castle.MicroKernel.BurdenReleaseDelegate
04c2ab68 264813 9533268 Castle.MicroKernel.Burden
06bde0a8 507282 10145640 System.Lazy`1[[System.Web.Mvc.ValueProviderResult, System.Web.Mvc]]
6fb5348c 267697 10707880 System.Collections.Generic.HashSet`1[[System.String, mscorlib]]
654e9388 160209 11535048 System.Web.HttpHeaderCollection
654ad44c 194416 12442624 System.Web.HttpCookieCollection
6fd1abbc 170480 14202840 System.Collections.Generic.HashSet`1+Slot[[System.String, mscorlib]][]
654b2204 95203 15613292 System.Web.HttpCachePolicy
06bde010 507282 16233024 System.Func`1[[System.Web.Mvc.ValueProviderResult, System.Web.Mvc]]
719c3a6c 469961 18106904 System.Int32[]
654e87e4 97208 18275104 System.Web.Hosting.IIS7WorkerRequest
654e2590 97208 19441600 System.Web.HttpRequest
654e285c 97208 19830432 System.Web.HttpResponse
715fbc80 422170 20264160 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Object, mscorlib]]
654e2160 97208 23329920 System.Web.HttpContext
654e9614 388836 23330160 System.Web.HttpValueCollection
719c45c8 919071 47791692 System.Collections.Hashtable
654d5220 4808083 115393992 System.Web.HttpServerVarsCollectionEntry
719bfc20 4849839 116396136 System.Collections.ArrayList
719c4584 105080 119191278 System.Byte[]
70d45bec 9064979 145039664 System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry
719afe88 5391401 175028320 System.Object[]
719c5ed4 919078 237147240 System.Collections.Hashtable+bucket[]
719c2248 7055089 454532758 System.String
Ok, so I've run windbg over the crash dump, (!dumpheap -live -stat) and I've found that there are LOT of objects relating to the Http context, which are still held in memory (98,000 after a typical work day in fact).
Can anyone confirm... I shouldn't be seeing this right? There are Types occurring 97,208 times in the log - This means that the HttpRequest/HttpResponse, etc are being held in memory, causing ALOT of leakage.
What could be causing this? I know they're not being stored in the session..my session is set to default timeout, and when inspecting, it only contains 3 small string objects.
Figured it out. Running GCroot highlighted the problem. See how there is a Castle.MicroKernel.Releasers.LifecycledComponentsReleasePolicy in the reference list?
Castle wasn't being told to release the controller after the request had completed. Mystery solved.
0:000> !gcroot 95963d2c
HandleTable:
00bb12f0 (pinned handle)
-> 03062490 System.Object[]
-> 021501dc Castle.Windsor.WindsorContainer
-> 02150200 Castle.MicroKernel.DefaultKernel
-> 02150304 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[Castle.MicroKernel.ISubSystem, Castle.Windsor]]
-> 02150af8 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Castle.MicroKernel.ISubSystem, Castle.Windsor]][]
-> 02150b74 Castle.Windsor.Diagnostics.DefaultDiagnosticsSubSystem
-> 02150b8c System.Collections.Generic.List`1[[Castle.Windsor.Diagnostics.IContainerDebuggerExtension, Castle.Windsor]]
-> 02150d00 System.Object[]
-> 02150d30 Castle.Windsor.Diagnostics.Extensions.ReleasePolicyTrackedObjects
-> 02150d3c Castle.Windsor.Diagnostics.TrackedComponentsDiagnostic
-> 02150e04 System.EventHandler`1[[Castle.Windsor.Diagnostics.TrackedInstancesEventArgs, Castle.Windsor]]
-> 02150d54 Castle.MicroKernel.Releasers.LifecycledComponentsReleasePolicy
-> 02150d84 System.Collections.Generic.Dictionary`2[[System.Object, mscorlib],[Castle.MicroKernel.Burden, Castle.Windsor]]
-> 038da530 System.Collections.Generic.Dictionary`2+Entry[[System.Object, mscorlib],[Castle.MicroKernel.Burden, Castle.Windsor]][]
-> 9596f3a4 WebController
-> 9596f9cc System.Web.Mvc.ControllerContext
-> 95965b5c System.Web.HttpContextWrapper
-> 95964078 System.Web.HttpContext
-> 95963d2c System.Web.Hosting.IIS7WorkerRequest
Does someone know how can I fix the problem below? I'm not familiar with UNIX/Solaris in deep. I've googled it and I've found some information.
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xFF2B44E4
Function=strlen+0x80
Library=/usr/lib/libc.so.1
Current Java thread:
at com.tertio.tome.Tome.init0(Native Method)
at com.tertio.tome.TomeConfig.<init>(TomeConfig.java:42)
at com.tertio.tome.Tome.initConfig(Tome.java:124)
at com.tertio.tome.Tome.initConfig(Tome.java:118)
at com.tertio.provident.rmi.server.ServerConfig.<init>(ServerConfig.java:28)
at com.tertio.provident.cli.Cli.connect(Cli.java:38)
at com.tertio.provident.cli.Admin.main(Admin.java:23)
Dynamic libraries:
0x10000 /oracle/product/home0/jre/1.4.2/bin/java
0xff370000 /usr/lib/libthread.so.1
0xff3fa000 /usr/lib/libdl.so.1
0xff280000 /usr/lib/libc.so.1
0xff3a0000 /usr/platform/SUNW,Sun-Fire/lib/libc_psr.so.1
0xfec00000 /oracle/product/home0/jre/1.4.2/lib/sparc/client/libjvm.so
0xff230000 /usr/lib/libCrun.so.1
0xff210000 /usr/lib/libsocket.so.1
0xff100000 /usr/lib/libnsl.so.1
0xff1c0000 /usr/lib/libm.so.1
0xff0e0000 /usr/lib/libsched.so.1
0xff0b0000 /usr/lib/libmp.so.2
0xff070000 /oracle/product/home0/jre/1.4.2/lib/sparc/native_threads/libhpi.so
0xfebd0000 /oracle/product/home0/jre/1.4.2/lib/sparc/libverify.so
0xfeb90000 /oracle/product/home0/jre/1.4.2/lib/sparc/libjava.so
0xff040000 /oracle/product/home0/jre/1.4.2/lib/sparc/libzip.so
0xfe3b0000 /ACS/DEV/users/dvprv02/prov52/lib/libjtome.so
0xfcbb0000 /ACS/DEV/users/dvprv02/prov52/lib/libtome.so
0xfe390000 /ACS/DEV/users/dvprv02/prov52/lib/libtome_ev.so
0xfcad0000 /oracle/product/home0/jre/1.4.2/lib/sparc/libnet.so
Heap at VM Abort:
Heap
def new generation total 2112K, used 476K [0xf1c00000, 0xf1e20000, 0xf2310000)
eden space 2048K, 23% used [0xf1c00000, 0xf1c77230, 0xf1e00000)
from space 64K, 0% used [0xf1e00000, 0xf1e00000, 0xf1e10000)
to space 64K, 0% used [0xf1e10000, 0xf1e10000, 0xf1e20000)
tenured generation total 1408K, used 0K [0xf2310000, 0xf2470000, 0xf5c00000)
the space 1408K, 0% used [0xf2310000, 0xf2310000, 0xf2310200, 0xf2470000)
compacting perm gen total 4096K, used 1223K [0xf5c00000, 0xf6000000, 0xf9c00000)
the space 4096K, 29% used [0xf5c00000, 0xf5d31c80, 0xf5d31e00, 0xf6000000)
Local Time = Wed Jan 23 18:03:25 2013
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
#
# An error report file has been saved as hs_err_pid11057.log.
# Please refer to the file for further information.
#
Abort (core dumped)