|
You should be able to track it down with GFlags
Don't let the documentation scare you, it's not only for device driver developers.
How to use Gflags
|
|
|
|
|
JoshWilliams wrote: The application has been running fine for years...taking up around 400 MB of memory and I have over 10 GB RAM...VisualBasic
First noting of course that a 32 bit application is not going to use 10 GB of memory even if it exists. Last time I looked into this (last year) the apps that had been built years ago required setting a flag explicitly to make them into 64 bit apps. There it a attribute somewhere that you can read (and log) to see exactly whether it is 32/64 bit. I suggest using that explicitly to check.
Second what is missing in your description is whether you have also been modifying that same application for years. If you haven't then the problem is with the environment or due to load. If you have been modifying then the problem could either be due to the modifications or to load.
You can test for load problems at least for memory by starting the application up with a reduced memory space. That artificially forces memory problems to show up. Of course you must still exercise the application after that.
JoshWilliams wrote: Here is the stack trace:
The stack trace for a resource exhaustion is generally almost worthless because the exhaustion is just telling you where it ran out.
It does NOT tell you, most of the time, where the code exists that is using it all up.
The entire application is responsible for the resources. So code completely un-associated with the code that you are looking at could be doing something that uses it up.
I will mention the following because the error occurs when loading an assembly. This unfortunately is very esoteric and not easy to follow (even when someone already knows something about memory handling.) But it is something that developers should be aware of.
Large object heap (LOH) on Windows | Microsoft Learn[^]
I think there might be a way to increase this. If you do change it and the error goes away you must keep in mind that you have put a bandaid on a gushing wound and you still need to find the actual problem.
|
|
|
|
|
This here is what I would guess is the most likely answer.
Look at the build configuration and explicitly make everything build x64.
There may exist scenarios where you would have to explicitly build x86, but explicit x64 is what's generally been the golden hammer for these things in my life.
It's not truly "out of memory". It's just confused.
Would lean toward this being near certainty if you hit it right upon app start or possibly the first shot at some specific app action.
|
|
|
|
|
I'm trying to paste a sub routine into an existing windows form project
|
|
|
|
|
What is your question?
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
|
If you want an answer that makes any sense at all, you're going to have to add a whole lot more detail to your "question."
|
|
|
|
|
If I want to publish an app for public consumption (in the Microsoft Store), in the past I just compiled it to AnyCpu, and targeted a low enough .NET Framework to not worry about the prerequisite runtime (that was probably wrong). But now I'm updating my app to .NET 7, and I have to assume most users won't already have it. Do I need to compile 3 separate packages, one each listing a prerequisite for the .NET 7 runtime for x64, x86, and ARM, or will it install only the correct version if I mark them all as prerequisites, or is there some way to set prerequisites conditionally? What is the right use and purpose of AnyCpu if you always need to confirm that the right, specific runtime is installed? I'm a self-taught, very amateur programmer, so I think I need to stick to the simple installers Visual Studio creates rather than some self-assembled command-line system that might be able to manually figure out what needs to be installed on every computer.
|
|
|
|
|
|
Yuppers wrote: Do I need to compile 3 separate packages,...
What you actually need to do specifically is test it in all of the environments you are going to claim to support. If it works (when tested) then you do not need to do anything differently. If it fails testing then you will need to decide what changes are needed.
|
|
|
|
|
You might consider whether .NET 7 is appropriate versus .NET 6. The pattern has generally been for every other .NET release to be an LTS (long-term service~3yrs) release versus an STS (~1.5yrs) release.
.NET 7 will hit end of support May 14, 2024.
.NET 6 will hit end of support November 12, 2024.
Meanwhile, we should see an LTS of .NET 8 in November.
|
|
|
|
|
Free code for Convert image pdf to text in c#
|
|
|
|
|
Are you looking for this, or offering it for others?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
"me too" means what? What EXACTLY are you looking for?
|
|
|
|
|
I suspect this might be an attempt to get enough rep points to display the link to his "cryptocurrency" site in his profile.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ah, yet another yahoo who calls himself "CEO".
|
|
|
|
|
There is no difference in type of PDF between a PDF with all text and a PDF with all images and a PDF with both text and images. I assume image PDF means image in a PDF. When an image is extracted from a PDF it is the same as if the image was not in the PDF.
|
|
|
|
|
Has anyone found that?
Just tried upgrading a hand-rolled ML console application from .NET 6 to .NET 7 and found it was slower. In my example it went from 0.55s to 0.7s. Tried this several times in each case.
Previously, the time had almost halved in going from .NET 4.8 to 6.0.
I'm not using any packages.
Kevin
|
|
|
|
|
If you want to learn more, add stopwatches to see which "parts" are slower. Startup? Shutdown? Something else? What's the footprint? Debug versus release?
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Gerry Schmitz wrote: What's the footprint? Debug versus release?
Release vs Release vs Release. No code changes apart from using top-level statements when I went from .NET 4.8 to .NET 6.
This is just a sample from a book. Not important, but just curious as it defied my expectations.
Kevin
|
|
|
|
|
It shouldn't be slower. I'd suggest reporting the problem on the .NET GitHub repo[^], along with the simplest reproduction of the problem you can get, and the relevant benchmarks from .NET 6 and 7.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Reported issue. They suggested running from console with DOTNET_TC_QuickJitForLoops=0 env var defined.
That speeds it up slightly, although 6.0 is still a bit faster. I read somewhere that in 6.0, setting that to 0 speeds things up but that in .NET 7 there's no difference. Though to me it looks like it might be the other way round!
So for 6.0 I get 0.53/0.54s (two successive runs). For 7.0 it is 0.57/0.58s.
Still, nothing worth bothering about.
Kevin
|
|
|
|
|
Just out of curiosity:
What is the reason, that the following code doesn't compile under Visual Studio:
int main(array<System::String ^> ^args)
{
array<int>^ l = {1,2,3};
for each (int a in l)
if (a % 2 == 1)
Console::WriteLine ("even");
else
Console::WriteLine ("odd");
return 0;
}
This results in the error "else without if".
One needs to use a compound statements around the if-else-statement.
Using a standard for-loop this works as expected, of course:
int main(array<System::String ^> ^args)
{
array<int>^ l = {1,2,3};
for (int i = 0; i < l->Length; ++i)
if (l[i] % 2 == 1)
Console::WriteLine ("even");
else
Console::WriteLine ("odd");
return 0;
}
|
|
|
|
|
Dunno, but odd/even appear to be transposed (or the if(%) incorrect).
%2 == 0 would be even?
|
|
|
|