flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Bug in FasmW's paste

Author
Thread Post new topic Reply to topic
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 29 Nov 2004, 19:23
When pasting an entire line with exact length of 248 chars (home=1; end=249) with its terminating line break (0Dh,0Ah) included (so, exactly 1 full line-buffer of 256bytes; 248+8bytes), FasmW version 1.56 crashes.

I've tested this undre Windows 98SE, and will test it soon under WinXP.

OllyDbg showed me an "Access violation error" because of writing something to [0] and [4]. Further reverse analysing showed me, that in this special case, the first DWORD of the 8byte-header is not a pointer to the next string-buffer, but a NULL. I guess that this must have been forgetten somewhere.

The error lies somewhere within "EDIT.INC" in the insert_into_line routine.

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 29 Nov 2004, 19:23
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 29 Nov 2004, 19:32
Now tested, this problems also occurs under WinXP (as expected).

The only bugfix I know is the following (in edit.inc):

replace this
Code:
insert_into_line:
       or      ecx,ecx
     jz      void_insert
 push    esi ecx
     call    get_caret_segment
   test    [editor_mode],AEMODE_OVERWRITE
      jnz     overwrite_in_line
   cmp     edx,SEGMENT_DATA_LENGTH
     jae     attach_after_line_end
       mov     eax,[esp]
   push    edx
 xor     edx,edx
     mov     ecx,SEGMENT_DATA_LENGTH
     div     ecx
 mov     ebx,esi
     push    esi
 or      edx,edx
     jnz     find_last_segment_to_shift
  call    store_segment_for_undo
      mov     esi,[esi]
   btr     esi,0
       jnc     following_segments_shifted
  call    store_segment_for_undo
      jmp     following_segments_shifted
    find_last_segment_to_shift:
    


by this
Code:
insert_into_line:
    or      ecx,ecx
     jz      void_insert
 push    esi ecx
     call    get_caret_segment
   test    [editor_mode],AEMODE_OVERWRITE
      jnz     overwrite_in_line
   cmp     edx,SEGMENT_DATA_LENGTH
     jae     attach_after_line_end
       mov     eax,[esp]
   push    edx esi
     xor     edx,edx
     mov     ecx,SEGMENT_DATA_LENGTH
     div     ecx
 mov     ebx,esi
    find_last_segment_to_shift:
    


But I guess that this may introduce another bug? Not encountered yet.

What's your opinion, Privalov

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 29 Nov 2004, 19:32
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 29 Nov 2004, 19:51
Another small, not critical, but dumb thing in "NAVIGATE.INC".

Code:
move_page_up:
       mov     eax,[caret_line_number]    ;superfluous, isn't it?
 mov     eax,[caret_line_number]
    


and a bit later
Code:
move_page_down:
        mov     eax,[caret_line_number]
     mov     eax,[caret_line_number]
    


There are lots of small things like this, but I don't have exact file/label and lines right now, so I won't disturb you with them right now
Post 29 Nov 2004, 19:51
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 07 Dec 2004, 20:10
Somebody should read this.
Post 07 Dec 2004, 20:10
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 07 Dec 2004, 20:33
that bug is really there, it makes an exception when pasting 248 byte string,

but MCD, i think you'd get more respect if you 'd think over and test your codes before posting, i'm sure noone appreciates buggy / freezing codes.
Post 07 Dec 2004, 20:33
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 07 Dec 2004, 20:42
Matrix, what do you mean with
Quote:

but MCD, i think you'd get more respect if you 'd think over and test your codes before posting, i'm sure noone appreciates buggy / freezing codes.


I have tested my code, and there no paste bug occured since.

Or is there really a bug?
This is possible since my changes are all based upon only analysing the FasmW's code, without any documentation.

Please tell me the specific simptoms of it.
Post 07 Dec 2004, 20:42
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 07 Dec 2004, 20:45
i was quoting all of your codes that wasn't working so far, you really should take the time and make corrections or something.
Post 07 Dec 2004, 20:45
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 07 Dec 2004, 20:48
I have no idea how to fix it right now. I guess we need some help of the maker. Privalov? JohnFound?
Post 07 Dec 2004, 20:48
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 12 Dec 2004, 10:19
The fasmw 0.92.4 has it all fixed.
Post 12 Dec 2004, 10:19
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 16 Dec 2004, 18:06
Thanks, Privalov! Finally, somebody listened to me
Post 16 Dec 2004, 18:06
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.