I am trying to make a text reader, but I found that when scrolling a large document, at some point whenever the texture memory reaches around 15000 the app just exits with code -2147220978 (0x8004020e).
What does it mean? Is there any work around? I really need to be able to read large text documents.
The 8 means "error". The "004" means "this error is specific to the interface that the object was using at the time it failed". The "020e" means... well, it means whatever the author of that interface intended it to mean. (All error codes above 0200 are author-defined.)
These are the hardest errors to track down because their meaning is entirely dependent on what the author of the code that failed intended; there is no universal standard. Some subsystem, perhaps developed by a third party, is failing. If you can figure out what subsystem that is, then you can ask the makers of that subsystem what their error number 020e means.
Can you share minimal and relevant repro code? Just one snippet of XAML And one snippet of C# should be enough.
From what you're saying it really might be overloading the GPU with surfaces until the app crashes. It shouldn't ever happen, so I'm not sure this is the real cause.
In the meanwhile, have you tried virtualizng your ItemsControl? If you're using a ListBox have you tried switching to the new LongListSelector? If just switching to LongListSelector isn't enough, try using ItemRealized and add some prefetching logic. If that doesn't work, you might have to create your own virtualizing logic either by manaully removing the Template from the visual tree once it goes out of view or creating a whole new 3rd party virtualized custom control. Maybe one of the 3rd party control vendors has something that would work here.
User contributions licensed under CC BY-SA 3.0