flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
JohnFound 30 Oct 2012, 21:12
This version contains new, important features:
1. One of the oldest problems of Fresh IDE was solved - auto completion for local labels was implemented. (as a result of sudden inspiration ![]() It should accelerate the working speed of the programmer simply by reducing typing. 2. Of course FASM updated to 1.71.05 3. For the first time - FreshLib, with KolibriOS port included. (well, the port is not finished yet...) 4. Faster compilation by optimization of the cross reference processing - it is 10..20 times faster now. Download it from: Fresh IDE download page and enjoy the new PHP-free and plain ASM-driven web site. Regards. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 Last edited by JohnFound on 03 Nov 2012, 00:41; edited 1 time in total |
|||
![]() |
|
Bargest 06 Nov 2012, 18:37
Quote: One of the oldest problems of Fresh IDE was solved - auto completion for local labels was implemented. That's great! Thank you. ![]() When I press "compile", or Ctrl+F9, FreshIDE stops working without any errors. It works properly only if I press first F9, then Ctrl+F9, then F9 again and so on. If I change order of hot-keys, it stops. This bug occurs only if there are errors in code. |
|||
![]() |
|
JohnFound 06 Nov 2012, 20:53
Bargest wrote: When I press "compile", or Ctrl+F9, FreshIDE stops working without any errors. This is very strange. Actually F9 will try to run the compiled executable in the internal debugger if possible (i.e. only if the executable is Windows PE). As long as the internal debugger is buggy ![]() I always compile the source with Ctrl+F9 and run it with Shift+F9 (direct run) or Shift+F8 (external debugger which works for Windows and Linux as well). Please, provide some more information: What program you try to compile. Is it project file or single .asm file. What happens when you try to compile from the menu (Project|Compile, or Debug|Run direct)? What is the memory settings for the compiler? (possible undetected out of memory) What it means "stops working"? Hanging? What is the CPU load in this moment? (possible thread deadlocks) What is the OS? (Fresh is very poorly tested in Windows Vista, 7 and ![]() Also, it will be useful if you can provide some source that reveals this bug. Regards. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
![]() |
|
Bargest 06 Nov 2012, 23:08
I'm thrying to compile my OS. It can't run, so I always use Ctrl+F9 and then a batch-file to write OS to virtual disk. F9 I tried just several times for test.
![]() But if I have errors in code then bug occurs. If I try to compile from Menu I have the same bug. IDE crashes with default windows error or witout error output at all. OS is Windows 7 x64. Settings are all default. Tried to set memory-size to 64 MB - nothing changes. Now I'm testing this way: put a random character at a random place in the source, then press Ctrl+F9 twice. |
|||
![]() |
|
JohnFound 06 Nov 2012, 23:32
Are you willing to send these sources to me? Although I am almost sure that the bug is related to the x64 Windows 7 environment.
Unfortunately I can't test on x64. Try to catch at least what is the exception and the address where it happens. Another way is to run Fresh in a debugger and when it crashes to make a stack dump and to send it to me. It is definitely a bug, but I can't provide adequate test by myself. ![]() |
|||
![]() |
|
Bargest 07 Nov 2012, 15:31
I started Fresh under debugger (IDA), then executed the bug.
![]() Code: .code:0040114E ; int __stdcall sub_40114E(LPVOID lpMem) .code:0040114E sub_40114E proc near ; CODE XREF: sub_4011BC+46p .code:0040114E ; sub_401253+98p ... .code:0040114E .code:0040114E lpMem= dword ptr 8 .code:0040114E .code:0040114E push ebp .code:0040114F mov ebp, esp .code:00401151 push eax .code:00401152 push ecx .code:00401153 push edx .code:00401154 push [ebp+lpMem] ; lpMem .code:00401157 push 0 ; dwFlags .code:00401159 push hHeap ; hHeap .code:0040115F call ds:HeapFree .code:00401165 test eax, eax .code:00401167 jnz short loc_40116A .code:00401169 int 3 ; Trap to Debugger <----------------------- Here!!! .code:0040116A .code:0040116A loc_40116A: ; CODE XREF: sub_40114E+19j .code:0040116A pop edx .code:0040116B pop ecx .code:0040116C pop eax .code:0040116D leave .code:0040116E retn 4 .code:0040116E sub_40114E endp Call Stack: Code: sub_401861+39 sub_401707+1A sub_4265AB+2F sub_4265EE+A StartAddress+13D ( == 0x418540 + 13D) So the bug occurs when Fresh is trying to free memory. This memory region begins like Code: 13 00 00 00 0E 00 00 00 08 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 38 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 50 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 60 00 00 00 00 00 00 00 68 00 00 00 00 00 00 00 00 00 00 00 70 00 00 00 00 00 00 00 78 00 00 00 00 00 00 00 00 00 00 00 ... I can send the source in critical situation, if nothing else helps. ![]() UPD: I noticed an interesting thing. When I open Fresh, then load project and make this bug, application crashes inside HeapFree. Then I have no error output, Fresh just closes. When I open Fresh with project name in command line, application executes this "int 3" instruction after HeapFree, and I catch default windows error. |
|||
![]() |
|
JohnFound 07 Nov 2012, 16:29
Thank you for this information.
It is a trap in the FreeMem procedure of FreshLib that to catch when HeapFree fails. ("freshlib/system/Win32/memory.asm : line 183) As a quick and dirty fix you can change it to "nop" or simply to delete 4 lines from "test eax, eax" to "@@:" and to recompile Fresh IDE (source/Fresh.fpr). It is possible Fresh to continue to crash, but on another place, or simply to work with some small memory leaks... The actual bug is somewhere else and I will try to find it ASAP. Anyway as long as I think the bug manifestation is because of 64bit Windows, the source code will be useless. The silent dead is probably because of Windows - it simply ignores "int3" exceptions. You may try to set some JIT debugger that to catch them. |
|||
![]() |
|
JohnFound 07 Nov 2012, 18:45
Bargest, please check whether this bug appears at the very first compilation after Fresh IDE start, or only on second and later compilations?
|
|||
![]() |
|
Bargest 07 Nov 2012, 19:04
JohnFound wrote: Bargest, please check whether this bug appears at the very first compilation after Fresh IDE start, or only on second and later compilations? Only on second and next. _________________ jmp $ ; Happy end! |
|||
![]() |
|
JohnFound 07 Nov 2012, 19:10
Can you provide the content of the registers when it crashes?
|
|||
![]() |
|
Bargest 07 Nov 2012, 19:36
One of "snapshots":
Code: eax = 0x00000000 ebx = 0x0000001E ecx = 0x77AF6244 edx = 0x0000000C esi = 0x0445D428 edi = 0x0043A4FE ebp = 0x000CF570 esp = 0x000CF564 eip = 0x00401169 efl = 0x00000246 Unfortunately, ebx, esi, edi, and of course ebp, esp and eip are different each time I reproduce the bug. Only eax, ecx, edx and efl have the same value. |
|||
![]() |
|
JohnFound 07 Nov 2012, 20:13
Bargest, did you tried to replace this int3 with nop? What happened?
Tomorrow I will try to find some x64 Win7 computer in order to check this nasty bug more closely. |
|||
![]() |
|
Bargest 07 Nov 2012, 20:55
Quote: Bargest, did you tried to replace this int3 with nop? What happened? It works, but with memory leaks. But if project is opened not as a parameter of command line, it still crashes in NTDLL. Also I tried to re-compile Fresh with an error in Fresh.asm: Code: ;| Contact the authors: http:/board.flatassembler.net/ | ;| FASM main site: http://www.flatassembler.net/ | ;| | ;|_____________________________________________________________________________________________| ; d include '%lib%/freshlib.inc' As you see, there is an illegal character. Fresh crashed after second attempt to compile. |
|||
![]() |
|
JohnFound 07 Nov 2012, 22:07
Thanks for the example.
Unfortunately it never crashes on my computers (WinXP and Linux 32bit). Tomorrow, on work, I will try to reproduce it on 64bit Windows 7. |
|||
![]() |
|
JohnFound 08 Nov 2012, 21:58
Hi Bargest.
I made some attempt to fix the discussed bug. Please, test the fixed version. It has several bug fixed, but I am not sure your bug is in this group. ![]() |
|||
![]() |
|
idle 09 Nov 2012, 11:06
|
|||||||||||||||||||
![]() |
|
JohnFound 09 Nov 2012, 11:39
Idle, thanks for the report.
It is easy and I think I found it. The most strange thing is that it works on my computer, because there is a mismatched register. The instruction, pointed on your screenshot must be " push [esi+TArray.array+4*edi]". I will fix it in the next release. |
|||
![]() |
|
idle 09 Nov 2012, 13:49
JohnFound wrote: strange thing is that it works on my computer i use win xp pro sp2 x64 |
|||
![]() |
|
Bargest 09 Nov 2012, 16:14
JohnFound, thanks. It works good.
![]() |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.