Primary partition disk shows unformatted - hard-drive

I have a problem with my hard disk, a few days ago my PC crashed and an error message appeared on the screen stating unable to read A disk, please press crtl atl del. After doing that it kept looping.
I need to recover my data on the disk therefore, I tried to slave the disk to another computer.
When I done that my primary partition disk shows as unformatted and im unable to read data off there.
Can someone please help and suggest me what I can do in order to read the disk and I can recover my data.
I am using windows XP 32bit (NTFS)
Any help or suggestions will be helpful
Thank you

I think you can easily recover your lost files from crashed hard drive on Windows XP 32bit (NTFS). As per of my experience I suggest you utility referred as Remo Recover. I recovered my lost data from crashed hard drive by using this tool. Just try it.

Related

Use log4j 2 for writing to data files or database table

I used log4j (v. 1) in the past and was glad to know that a major refactoring was done to the project, resulting in log4j 2, which solves the issues that plagued version 1.
I was wondering if I could use log4j 2 to write to data files, not only log files.
The application I will be soon developing will need to be able to receive many events from different sources and write them very fast either to a data file or to a database (I haven't decided which yet).
The thread that receives the events must not be blocked by I/O while attempting to write events, so log4j2's Asynchronous Loggers, based on the LMAX Disruptor library, will definitely fit this scenario.
Moreover, my application must be able to recover either from a 'not enough space on disk' or 'unable to reach database' conditions, when writing to a data file or to a database table, respectively. In other words, when the application runs out of disk space or the database is temporarily unavailable, my application needs to store events in memory and wait for storage to become available and when it does, write all waiting events to disk or database.
Do you think I can do this with log4j?
Many thanks for your help.
Regards,
Nuno Guerreiro
Yes.
I'm aware of at least one production implementation in a similar scenario, where in gathered events are written to disk at high throughput.
Write to a volume other than your system volume to minimize the chances of system crashes due to disk space overrun.
Upfront capacity planning can help in ensuring h/w configuration with adequate resources to handle projected average load and bursts, for a reasonable period of time.
Do not let the system run out of disk space :). Keep track of disk usage, and proactively drop older data in extreme circumstances.

Unity- Standalone build run out of memory

So I already asked this question on the unity forums but that didn't help me a lot :/. Today I decided to give my game a try with friends so basically I created a server so other clients/friends could connect to it. After about 20 minutes of playing my game crashed and I quickly checked task manager and my game was using about 3.5 GB of RAM! PHOTO HERE When I looked at the log it said something like this:
Unity Player [version: Unity 4.6.1f1_d1db7a1b5196]
mono.dll caused an Access Violation (0xc0000005)
in module mono.dll at 0023:101071a1.
Error occurred at 2016-07-04_163050.
C:\Users\Cooler Master\Desktop\TL\TL.exe, run by Cooler Master.
77% memory in use.
0 MB physical memory [1814 MB free].
0 MB paging file [1039 MB free].
0 MB user address space [68 MB free].
Write to location 00000000 caused an access violation.
So in my game there is something that keeps eating my RAM. It takes about 3MB per second of ram when the game is running. I found some information on internet about Resources.UnloadUnusedAssets but I don't know how to write a script like that! I knew how to write in c# but only the easy scripts like GUI,Newtorkinf,Physics etc.. Also I downloaded unity pro from kickasstorrent only to see profiler window but that didn't help me at all
Thank very much for any reply !
Also if you want to check out the game and see what's happening : http://gamejolt.com/games/thuglifealpha/61660
Thanks again! :)
Without seeing your code it is difficult to find exact issues. But I you should start from finding code where new objects are instantiated/destroyed. It causes GC to collect unused objects and allocate new memory. And soon your free memory becomes so fragmented that there is no suitable memory area to allocate new object.
I strongly recommend to read articles about optimization for Unity

Unmapping memory-mapped images that are created during processing

I have a pretty big issue, although I only have the symptoms, and a theory on the cause.
I have a C++ application under Windows 7x64 that uses system calls to FFMPEG 0.7.13 to extract frames from videos. When running, the parent application maintains a nice, predicable memory footprint in memory profilers (task manager, RAMMap) of about 2MB. I can see the individual calls to FFMPEG also come and go without incident. The trouble is, after about 100 calls to FFMPEG, and 70,000+ PNGs created (no one directory has more than 1500 pngs), the Windows memory page size raises gradually from about 2.5GB to over 7.0GB, and the system is brought to its knees. The sum of the processes for all users is no where near the reported Memory Page amount.
I thought it might be Windows Search indexing related, so I turned off the indexing for the output directories in question using SetFileAttributes() and FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, and while it seems to be working as advertised, it does not seem to combat the issue at hand. My current running theory is that all of these extracted PNGs are either fully or partially memory mapped, by FFMPEG or something else. I can also see the output PNGs under the RAMMap Physical Pages tab as standby mapped files.
Question:
- Is there enough information here to possibly diagnose the exact problem?
- Do I have a way to combat this issue?
Thanks in advance...

FlushFileBuffers as good as CloseHandle then CreateFile at saving data to disk?

For a file on disk, is the Win32 function FlushFileBuffers as reliable and certain as closing the file using CloseHandle then re-opening the file using CreateFile?
Are there circumstances where CloseHandle then CreateFile are better because they save the data correctly to disk when FlushFileBuffers does not?
It is better, CloseHandle() doesn't flush the file system cache write buffers. Beware of the cost, it can take a long time to get the data to the disk. The FILE_FLAG_NO_BUFFERING option for CreateFile allows you to avoid flushing. But it is very expensive and difficult to get right due to the limitations on the written data.
According to the documentation, FlushFileBuffers does write everything to the disk. However, it probably doesn't hurt to test it yourself. I've done BRS testing (big red switch ... well PCs used to have big red switches) in the past, and I found that it did cause everything to be written. After the call to FlushFileBuffers, turn the PC off without a clean shutdown. Turn it back on and see if the data is all there. The behavior may change by OS (in theory it shouldn't ... but you never know). It was quite some time ago that I did tests like that (it was on XP or possibly even Windows 2000).
And I suppose it goes without saying, but you probably don't want to do this testing on a workstation that you really care about.
Although this information is not related to Delphi, but the most deployed SQL-database on earth, sqlite (used for example in Firefox) takes care on such things and you can read a lot ot atomic operations here: http://www.sqlite.org/atomiccommit.html
Below is a quote from the article about FlushFileBuffers
9.2 Incomplete Disk Flushes
SQLite uses the fsync() system call on
Unix and the FlushFileBuffers() system
call on w32 in order to sync the file
system buffers onto disk oxide as
shown in step 3.7 and step 3.10.
Unfortunately, we have received
reports that neither of these
interfaces works as advertised on many
systems. We hear that
FlushFileBuffers() can be completely
disabled using registry settings on
some Windows versions. ...

first chance exception: system error 8: not enough storage space to perform the command

how do i debug something like this? i need the debugger to stop and show me where the problem is. don't just show it in the event log & then hang.
first chance exception: system error 8: not enough storage space to perform the command
i'm using delphi 2009. the problem doesn't happen regulary. i'm not eager to pepper my program with OutputDebugString calls to track this down!
thank you for your help!
You are looking at a resource leak on your server, more than likely... Either handle related, or memory related...
I've had this happen a lot, and it's always the case... There CAN be other causes, but I think a resource leak is your #1 cause...
You are going to have to either find it and fix it, or start putting debug checks in on all memory allocations, handle allocations, and log them anytime you can't get memory, or handles.
It's also possible that your CLIENT machine is out of resources, but usually, it's the server at fault...
Failing all that, give us some more idea of what you are doing, what the code looks like, etc, to help spot issues. Just based on the error alone, isn't a lot to go on...
If your program uses a lot of windows resources it could be a Resource Heap shortage.
There is a registry entry that can be increased to raise the heap size for XP. For Vista Microsoft already sets the default value higher. I recommend changing the default 3072 to at least 8192.
This information is documented in the Knowledge Base Article ID 126962 (or search for "Out of Memory"). Additional details concerning the parameter values may be found in the Knowledge Base Article ID 184802.
I suggest you read the knowledgebase article but the basic info on the change is:
1) Run Registry Editor (REGEDT32.EXE).
2) From the HKEY_ LOCAL_MACHINE subtree, go to the following folder:
\System\CurrentControlSet\Control\Session Manager\SubSystem
3) On the right hand side of the screen double-click on the key:
windows
4) On the pop-up window you will see a very long field selected. Move the cursor near the beginning of the string looking for this (values may vary):
SharedSection=1024,3072,512
5) SharedSection specifies the System and desktop heaps using the following format: SharedSection=xxxx,yyyy,zzz where xxxx defines the maximum size of the system-wide heap (in kilobytes), yyyy defines the size of the per desktop heap, and zzz defines the size of the desktop heap for a "noninteractive" window station.
6) Change ONLY the yyyy value to 8192 (or larger) and press OK.
7) Exit the Registry Editor and reboot the PC for the change to take effect.
Good Luck

Resources