Home > Software engineering >  Very strange, why the program appears after the long running "insufficient system resources, un
Very strange, why the program appears after the long running "insufficient system resources, un

Time:10-01

A VC program, the function is continuously to send and receive a USB device command, a long time after the operation, will appear:
1 PC into a large font of that kind of screen display,
2 open at this time, such as online neighbors, task manager, the device manager, etc., will appear the pop-up dialog "insufficient system resources, was unable to complete the requested service";
During the program is running, since task management: look, there is no exception, memory, handles, process is stable now, and computer memory use and found no abnormal;
I use a bound check check code, also found no special leak or something!
You have met? Or is there any screening ideas? thank you

CodePudding user response:

Check whether specific handle after being used, such as: network communication SOCKET handle, handle to a GDI growing... Such loss of resources caused by
And your VC program is written by yourself, have a source? If you have the source code, check if there is any abnormal situation when sending and receiving data processing, such as abnormal data block, properly handle packet data parsing process?

CodePudding user response:

Task manager in a column is "gdi objects", see if it is become large

CodePudding user response:

Task manager check the memory and GDI handle without exception

CodePudding user response:

Handle to a GDI, users handle upstairs said

CodePudding user response:

The task manager, see the GDI handle,,,

CodePudding user response:



reference 5 floor shen_wei reply:
task manager, see the GDI handle,,,


reference hushoubo reply: 3/f
task manager check whether there is any abnormal on memory and GDI handle


refer to the second floor mayudong1 response:
task manager in a column is "gdi objects" and see if it is become large


Give special attention to the GDI objects, thank you, I didn't change;
The user object, thread data has not changed much, too!
Heel just began to run about!

CodePudding user response:

reference 1st floor jianghandaxue response:
check whether specific handle after being used, such as: network communication SOCKET handle, handle to a GDI growing... Such loss of resources caused by
And your VC program is written by yourself, have a source? If you have the source code, check if there is any abnormal situation when sending and receiving data processing, such as abnormal data block, properly handle packet data parsing process?


Send that piece of code to write their own actually very simple, does not receive data sending data, use ReadFile, WriteFile operation!
I use BoundCheck check is no exception!

CodePudding user response:

What is your USB, if there is a driver, this problem may occur if anything goes wrong with the driver,

The task manager can see how much core memory increase

CodePudding user response:

refer to 7th floor vc_learner response:
Quote: refer to 1st floor jianghandaxue response:

Check whether specific handle after being used, such as: network communication SOCKET handle, handle to a GDI growing... Such loss of resources caused by
And your VC program is written by yourself, have a source? If you have the source code, check if there is any abnormal situation when sending and receiving data processing, such as abnormal data block, properly handle packet data parsing process?


Send that piece of code to write their own actually very simple, does not receive data sending data, use ReadFile, WriteFile operation!
I use BoundCheck check is no exception!


That if such a situation, it is very headache, especially need to test for a long time to see problem program...
In look like sendmessge postmessage have such hair message, all using postmessage processing

CodePudding user response:

Oneself see increased memory changes,,,

CodePudding user response:

refer to the eighth floor zzz3265 response:
what are your USB drive, this problem may occur if anything goes wrong with the driver,

The task manager can see core memory increase how much


Well, I saw, the core memory increases,
From 14:21 -- -- -- -- --
"186048-203820
Is the increasing trend;
Thank you, I just from the hands to screen;

CodePudding user response:

Done yet? The building Lord, I also met the same problem

CodePudding user response:

One way to check whether resource leaks:
In the process of the task manager to see inside the column selection: memory, virtual memory size, handle number, number of threads, the USER object, GDI objects
Make your program (process) don't quit, cycle through main process many times, the more the better, like 1000000 times or even an infinite loop, record the above numerical, it through at least one hour, as long as possible, such as a month, to record more than the value, if the above two groups of numerical differential is bigger or increasing over time, will certainly have a corresponding resources resource leaks!

Search "GDI leak detection"
  • Related