Fresh IDE . Check-in [a3b7087956]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Some unsuccessful atempts to locate the bug caused crashes in the Linux version. :( These crashes are related to the size of the executable file and is not traceable. It is possibly in the elf generation, not in the code itself.
Timelines: family | ancestors | descendants | both | FreshLibDev
Files: files | file ages | folders
SHA1: a3b7087956a9744434ba2c350c57ad90a3c56028
User & Date: johnfound 2011-12-22 06:01:28
Context
2011-12-25
08:34
Some code refinement in FreshEdit in order to prepare it for future advance. Small bug fixes. check-in: 2c1b4d2f8f user: johnfound tags: FreshLibDev
2011-12-22
06:01
Some unsuccessful atempts to locate the bug caused crashes in the Linux version. :( These crashes are related to the size of the executable file and is not traceable. It is possibly in the elf generation, not in the code itself. check-in: a3b7087956 user: johnfound tags: FreshLibDev
2011-12-21
14:36
Work on FreshEdit. In this point it works in Win32 but crashes in Linux. :) check-in: f55f614f5e user: lhmnai0 tags: FreshLibDev
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to freshlib/FreshEdit/FreshEdit.asm.

616
617
618
619
620
621
622


623
624
625
626
627
628
629

630
631
632
633
634
635
636

; goto next line.
        cmp     byte [esi], 0
        jne     .lineloop

        mov     [edi+TFreshEdit._TopLine], 0
        mov     [edi+TFreshEdit._yCaret], 0



        stdcall TFreshEdit.__UpdateScrollBars, edi
        mov     [edi+TFreshEdit._fShadowValid], 0

        clc
        jmp     .finish
endp



;_________________________________________________________________________________________

; move commands
mvcMoveX   = 1
mvcMoveY   = 2







>
>







>







616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639

; goto next line.
        cmp     byte [esi], 0
        jne     .lineloop

        mov     [edi+TFreshEdit._TopLine], 0
        mov     [edi+TFreshEdit._yCaret], 0

        mov     eax, [edi+TFreshEdit._pLengths]

        stdcall TFreshEdit.__UpdateScrollBars, edi
        mov     [edi+TFreshEdit._fShadowValid], 0

        clc
        jmp     .finish
endp



;_________________________________________________________________________________________

; move commands
mvcMoveX   = 1
mvcMoveY   = 2
2575
2576
2577
2578
2579
2580
2581

2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594

2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605

2606
2607
2608
2609
2610
2611
2612
begin
        push    eax ecx edx esi

        mov     esi, [.editor]
        mov     edx, [esi+TFreshEdit._pLengths]

        mov     eax, [.oldlen]

        cmp     eax, -1
        je      .oldok

        cmp     eax, [edx+TArray.count]
        jae     .oldok  ; wrong arguments???

        cmp     [edx+TArray.array+4*eax], 0
        je      .oldok  ; wrong count.

        dec     dword [edx+TArray.array+4*eax]

.oldok:
        mov     ecx, [.newlen]

        cmp     ecx, -1
        je      .newok

        cmp     ecx, [edx+TArray.count]
        jb      .incr

        sub     ecx, [edx+TArray.count]
        inc     ecx

        stdcall AddArrayItems, edx, ecx
        mov     [esi+TFreshEdit._pLengths], edx


.incr:
        inc     dword [edx+TArray.array+4*ecx]

; then, shrink the array.
.newok:
        mov     ecx, [edx+TArray.count]







>













>











>







2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
begin
        push    eax ecx edx esi

        mov     esi, [.editor]
        mov     edx, [esi+TFreshEdit._pLengths]

        mov     eax, [.oldlen]

        cmp     eax, -1
        je      .oldok

        cmp     eax, [edx+TArray.count]
        jae     .oldok  ; wrong arguments???

        cmp     [edx+TArray.array+4*eax], 0
        je      .oldok  ; wrong count.

        dec     dword [edx+TArray.array+4*eax]

.oldok:
        mov     ecx, [.newlen]

        cmp     ecx, -1
        je      .newok

        cmp     ecx, [edx+TArray.count]
        jb      .incr

        sub     ecx, [edx+TArray.count]
        inc     ecx

        stdcall AddArrayItems, edx, ecx
        mov     [esi+TFreshEdit._pLengths], edx
        mov     ecx, [.newlen]

.incr:
        inc     dword [edx+TArray.array+4*ecx]

; then, shrink the array.
.newok:
        mov     ecx, [edx+TArray.count]

Changes to freshlib/GUI/Linux/TApplication.asm.

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
cXErrorMsg3 text 'Request: '
cXErrorMsg4 text 'Minor code: '
cXErrorMsg5 text 'ResourceID: $'

proc __FreshXErrorHandler, .display, .error
.buff rb 256
begin
if defined options.DebugMode & options.DebugMode
        cmp     [fGlobalTerminate], 0
        jne     .exit

        stdcall Output, cXErrorMsg
        mov      ebx, [.error]

        movzx    eax, [ebx+XErrorEvent.error_code]







|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
cXErrorMsg3 text 'Request: '
cXErrorMsg4 text 'Minor code: '
cXErrorMsg5 text 'ResourceID: $'

proc __FreshXErrorHandler, .display, .error
.buff rb 256
begin
if (defined options.DebugMode) & options.DebugMode
        cmp     [fGlobalTerminate], 0
        jne     .exit

        stdcall Output, cXErrorMsg
        mov      ebx, [.error]

        movzx    eax, [ebx+XErrorEvent.error_code]

Changes to freshlib/TestLib.asm.

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
include 'graphics/draw.asm'
include 'graphics/images.asm'
include 'graphics/backbuffer.asm'
include 'graphics/giflib.asm'
include 'graphics/fonts.asm'

include 'GUI/GUI.asm'
;include 'ForthScript/ForthScript.asm'
include 'FreshEdit/FreshEdit.asm'
include 'mouse/mouse.asm'


options.FastEnter         = 0           ; enter/leave or push ebp/pop ebp approach to the procedures.
options.ShowSkipped       = 0           ; shows the procedures skiped because of no use.
options.ShowSizes         = 1           ; enable/disable work of DispSize macro.







<







40
41
42
43
44
45
46

47
48
49
50
51
52
53
include 'graphics/draw.asm'
include 'graphics/images.asm'
include 'graphics/backbuffer.asm'
include 'graphics/giflib.asm'
include 'graphics/fonts.asm'

include 'GUI/GUI.asm'

include 'FreshEdit/FreshEdit.asm'
include 'mouse/mouse.asm'


options.FastEnter         = 0           ; enter/leave or push ebp/pop ebp approach to the procedures.
options.ShowSkipped       = 0           ; shows the procedures skiped because of no use.
options.ShowSizes         = 1           ; enable/disable work of DispSize macro.
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

.start_error:
        mov     eax, 1
        Message "Can't create application object."
        jmp      .terminate

; end of main program


_ImportSection

include 'imports/allimports.asm'

_DataSection
IncludeAllGlobals








<








90
91
92
93
94
95
96

97
98
99
100
101
102
103
104

.start_error:
        mov     eax, 1
        Message "Can't create application object."
        jmp      .terminate

; end of main program


_ImportSection

include 'imports/allimports.asm'

_DataSection
IncludeAllGlobals

Changes to freshlib/test_utf8.asm.

1
2
3
4
5
6
7
8
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111
00000000011111111112222222222333333333344444444445555555555666666666677777777778888888888999999999900000000001111111111222222222233333333334
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "Fresh artistic license."         |
;|_______________________________________________________________________________________|
;  Notes:
|







1
2
3
4
5
6
7
8
test00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111
00000000011111111112222222222333333333344444444445555555555666666666677777777778888888888999999999900000000001111111111222222222233333333334
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "Fresh artistic license."         |
;|_______________________________________________________________________________________|
;  Notes: