WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (2) [1] 2   ( Go to first unread post )

My program causes crashing, every time at a certain point in my program, it crashes the same way, and all I can do is hit the reset button on my computer.

Savage
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 88
Member No.: 1048
Joined: 27-February 05


My program was causing crashing.
The really hard type of crash.
Where your screen freezes and does not respond to user input.
Trying to get this fixed, I started tweaking a few things to get to the source of the problem.
Every time at a certain point in my program, it crashes the same way, and all I can do is hit the reset button on my computer.

At first, I noticed that I if I changed something and ran it, then if it crashed, after I restart my computer, my files were NOT saved, even though the EXE file was successfully compiled (which means they must be saved, right??).



So I decided to just exit all the way out of WinAsm when I wanted to save the file, and this worked...at first.

But after about 10 tries of tweaking, freezing, and restarting, something VERY strange happened.

I opened my WinAsm project, and nothing shows up. In the .WAP file, it shows nothing in the "[FILES]" section.
My .ASM and .INC files still existed, and my .INC file was still there and was fine, so I opened my .ASM file.

Here is what I saw in my hex editor for my .ASM file:
CODE

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000  .... etc.


A whole bunch of zeroes. NO text. If I open it in notepad it looks like a whole bunch of spaces. All the text in my file was completely zeroed. Infact, the file size was 14k. 14,175 bytes full of 0's.

The functions I was using that could have to do with the crashing are:
  • WaitForSingleObject
  • SetEvent
  • ResetEvent
  • CreateThread
Perhaps more, but I don't know, my file is wiped out.
I have no idea why it was freezing my computer; I was trying to figure this out. But instead, it deleted my source code. Most likely because WinAsm had it open and did not have time to back it up before the computer froze.

Does anyone know if it's possible for me to get the file back? Would it be stored anywhere? I don't even need the most recent save of it, if I had a way to get it from yesterday or something that would be great.


For what it's worth, I've attached what's left of the project.

Attached File ( Number of downloads: 28 )
 Login or Register to download

PMEmail PosterUsers Website
Top
icehole
Quote Post


Extremely Active Member
******

Group: Members
Posts: 168
Member No.: 1938
Joined: 12-January 06


That's some heavy self-modifying code you musta wrote.

It is not easy to reclaim files nowadays but there may be a tool or two or three that may be out there. Norton's unerase wizard can do it if you know the name or parts of the name or the filetype and such, but it's all a matter of luck as to whether any clusters got written over.

In the old FAT days we used to be able to undelete files pretty easy with a disk editor as that was a pretty sloppy file system and all you had to do was change the first letter of the file in the directory from a "?" to whatever it was or you wanted it to be. Clusters generally stayed intact. Not sure how NTFS does deletes.

As an aside, I had a modified game client I was trying to run in a local environment that Norton decided was 'suspicious'. Well, I could only run it one time as everytime I ran it Norton ended up deleting the exe so i had to restore it everytime I wanted to run it.

It's very hard to understand what is happening with your program as by the time it executes WinAsm should have already saved the source and the execute file. And unless you are doing something with the file system, those files should be safe.
PMEmail Poster
Top
Savage
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 88
Member No.: 1048
Joined: 27-February 05


Thanks Ice.

Well here's the facts about the program:

1) It was not self-modifying ;P
2) It didn't open any files, except it included a file in the resource script
3) I have no anti-virus programs whatsoever on my computer
PMEmail PosterUsers Website
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


i think it is impossible to restore such files sad.gif it is impossible to guess everything happend when system crashed...
anyway, frequent archiving is recommended. try inp2: setup once, then shift-ctrl-z without any thinking - that's all

Attached Image
Attached Image
PMEmail PosterUsers Website
Top
icehole
Quote Post


Extremely Active Member
******

Group: Members
Posts: 168
Member No.: 1938
Joined: 12-January 06


QUOTE (icehole @ Jun 30 2006, 01:18 PM)
That's some heavy self-modifying code you musta wrote.

Sorry, really meant that as a joke tongue.gif

My gut tells me shoorick is right. I have had no luck with the newer Windows when I have made a mistake.
The best chance you have is to find a file recovery program. There are a lot of them (free also). Some can also do partial recovers if the whole file is not intact (text is always easier to recover than data).

Only useful part of your project that is left is the execute itself and I would be leary of throwing it into a debugger unsure.gif much less just running it sad.gif

A basic analyze on the execute looks like a normal exe with nothing obviously strange about the import/export table.. Have you used those routines in winmm before? are you sure of the equates or data that is being used are correct and without bugs? Sure would love a look see at the source wink.gif

Last resort -> what about a disassembly listing of the execute to recover the basic code
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (2) [1] 2  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google