I have been using the Windows GUI version of FASM since 1.44. In versions 1.45 and 1.46 sometimes when I try to save a file FASM will clear the contents of the file (very frustrating :-) and then close itself. Windows does not report a program crash. Has anyone else experienced this?

Michael Gallagher
Posted on 2003-04-26 20:38:56 by asmosprog
Yes, I have. I have not tried to reproduce it, but I remember it was when I just opened FASMW and tried to Run. It opened File Open dialog for me, I selected my file, it then cleared the file and quit. Fortunately I had backup of my source. :)
Posted on 2003-04-26 23:30:36 by comrade
Such behavior happens when you have some non-existing tab selected and you try to run the program thinking you are running the file you are currently seeing, while you see the asmedit window that is not currently selected (and it should be hidden beyond the window associated with the tab that is currenlty selected, but when such tab doesn't exist, no such window exists either. And that's why it asks you for the file name and then fails on the saving the contents of non-existing window into that file.
While this is clear for me what is happening in such situation, I have no idea how did you get to hae some non-existing tab to be selected. It'd happen when you have recently closed some file that was selected or assigned for compiler and the selection wasn't updated properly, but in all situations I've checked so far it's OK. Must be a kind of some "special" situation. If you find how to reproduce it, please let me know.
Posted on 2003-04-27 03:54:42 by Tomasz Grysztar
I've attached a zip with a few text files with dumps from the crash, from olly (haven't closed it yet, tell me if there's some dump you need that I forgott to attach).

What I did to crash it:
Don't know, I just wrote in a file, and hit ctrl-s and then it crashed. Only one file open, no other open files in that instance. (I run two other instances of fasm).

forgott to zip the call stack so here it is:
Call stack of main thread

Address Stack Procedure / arguments Called from Frame
0006FE2C 00408102 Includes work_Fas.0040B890 work_Fas.004080FF 0006FE28
0006FE44 00407C83 work_Fas.004080B6 work_Fas.00407C7E 0006FF00
0006FF04 77E11D0A Includes work_Fas.00407C83 USER32.77E11D07 0006FF00
0006FF24 77E11BC8 USER32.77E11CF2 USER32.77E11BC3 0006FF20
0006FFB0 77E172B4 USER32.77E11AC0 USER32.77E172AF 0006FFAC
0006FFBC 00409037 USER32.DispatchMessageA work_Fas.00409031 0006FFF0
0006FFC0 004056A4 pMsg = WM_KEYDOWN hw = 70182 (clas
0006FFC4 77E9CA90 Includes work_Fas.00409037 KERNEL32.77E9CA8D 0006FFF0

It looks like the file is save ok.

I've located the pice of code to the fasm_syntax proc
Posted on 2003-04-27 08:58:22 by scientica
Well, this is the one that comrade was reporting some time ago (so we've got two to hunt), but your dump is still incomplete - one of the lines has the bad pointers, but without the whole memory dump it'll be hard to say which one and why.
Posted on 2003-04-27 10:54:07 by Tomasz Grysztar
Is anyone able to reproduce that first bug (reported by asmosprog and comrade)? The second one is fixed, but I still have not enough information to hunt the first one.
Posted on 2003-05-14 13:00:36 by Tomasz Grysztar
I reproduced:

    [*]Open FASMW (will be with one Untitled blank file)
    [*]Goto Run->Compile, and point to a assembly source.
    [*]Compiled dialog will open (1 passes, etc) and asm file will be cleared.
Posted on 2003-05-14 17:12:29 by comrade
No, it's not that bug. Unfortunately this is an intended behaviour (when you try to compile unsaved source, FASMW asks you to save it somewhere, and when you point to existing sources then, it will be overwritten), but I'm sure asmosprog was reporting something else.
Posted on 2003-05-15 03:06:11 by Tomasz Grysztar

I have tried many times to reproduce it (under low memory, different compiler settings, ...) but it has not happened again. I am zipping my source after every save now just in case though. Another bug seems to have appeared where when I try to compile the file it saves the file OK but then crashes (Windows reports an error with this one). When it happens again I will post some information about the crash.

Michael Gallagher
Posted on 2003-05-15 05:39:54 by asmosprog
Here what I've been face :o
Ocurred 2 times in 2 days with the same location.
The error happened when do many cut&paste operation and press save.
Posted on 2003-05-30 22:34:28 by Bi_Dark
It's f*ck me off again :mad: (It flushs the content of file down to 0 from ~100kb damn!!!)

The same problem, cut&paste operation then press save.

:( No!!!!!!
Posted on 2003-05-31 08:05:09 by Bi_Dark
try this: (slow and not-sure-it-works methods (I've tried partially on an app I've been writing, it works in theory for most/all bugs and for some type of bugs like some stack issues))
launch fasmw, attach olly. (You can start the app via olly, but I've hade some problems with that, attaching after the apps has been loaded works the best (unless you're tracking some startup bug))
Choose "Trace into" (via Debug menu or hit Ctrl+F11) (waring!: it will slow things down, "a little", but you'll have atleast patrial backtrace abillity, you may need to increase the trace buffer (somewhere in the options/settinngs))
Attempt to re-produce the error, when it occurs pause olly, and press "-" to step backwards and debug the error your self (or right click in the run trace and choose "log to file", don't forget to check the two bottom most checkboxes (if you haven't got the run trace window open open it via View->run Trace)
Posted on 2003-05-31 11:49:12 by scientica