Welcome, Guest
Username: Password: Remember me
General discussions, feature requests for CodeTyphon Project and discussions that don't fit in any of the other specific CodeTyphon forum categories.
  • Page:
  • 1

TOPIC:

Typhon leaks where Lazarus doesn't 8 years 9 months ago #9115

  • Avra
  • Avra's Avatar Topic Author
  • Visitor
  • Visitor
I have attached a minimalistic demo project where you can see that Typhon leaks but Lazarus doesn't leak. Please take a look and see if it can be fixed, because this is a show stopper for Typhon use with one of my projects. It is interesting to know that Typhon leaks on 'test2.json' but it doesn't leak on 'test1.json'. Lazarus does not leak on 'test1.json' and it does not leak on 'test2.json'.

Everything was tested on Win7SP1 64 bit (real pc, not virtual), with Lazarus and Typhon both 32 bit.

For Typhon, heap trace test results with leak were the same for CT5.5, CT5.6 and today built LAB CT5.6.4.1.
For Lazarus, heap trace test results without any leak were the same for both old Laz48732+FPC2.6.5 and for new Laz51535M+FPC3.1.1 built today.

[EDIT:]
Forum cuts attached file names in a strange way, so here in text I say that first picture is Typhon leaking, and second is Lazarus not leaking with the same code.

Please Log in or Create an account to join the conversation.

Last edit: by Avra.

Typhon leaks where Lazarus doesn't 8 years 9 months ago #9118

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
my suggestion is to use and Lab CT 5.7
I think we solve these problems
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Avra

Please Log in or Create an account to join the conversation.

Typhon leaks where Lazarus doesn't 8 years 9 months ago #9119

  • Michal
  • Michal's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 1
My test has given a different result:
Lazarus 1.6RC2 Win32 on Win32
CT56_57-current-32 on Win64
CT56_57-current-64 on Win64
Microsoft Windows [Wersja 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Wszelkie prawa zastrzeżone.

f:\Lazarus16rc2\ctleak>leakbugdemo.exe
test2.json
{
    Tick : -1,
    Now : "",
    PowerUpMoment : "",
    TotalDaysRunning : -1.0000000000000000E+000,
    DeviceID : -1,
    FirstPage : -1,
    LastPage : -1,
    CurrentPagePointer : -1,
    OverwriteOldEvents : false,
    MinLogLevelFilter : -1,
    StackFrameCorrupted : false,
    StackValid : [false, false, false, false, false, false, false],
    StackMinFree : [-1, -1, -1, -1, -1, -1, -1],
    FrameValid : [false, false, false, false, false, false, false],
    FrameMinFree : [-1, -1, -1, -1, -1, -1, -1],
    Sim : [false, false, false, false],
    DI : [false, false, false, false, false, false],
    DO : [false, false, false, false, false, false],
    AI : [false, false, false, false, false, false, false, false],
    AO : [false, false, false],
    MCUCSR : -1,
    ProcessScanCounters : [-1, -1, -1, -1, -1, -1, -1]
}
Heap dump by heaptrc unit
452 memory blocks allocated : 36263/37600
452 memory blocks freed     : 36263/37600
0 unfreed memory blocks : 0
True heap size : 163840 (96 used in System startup)
True free heap : 163744





Microsoft Windows [Wersja 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Wszelkie prawa zastrzeżone.

C:\CT56_57\ctleak32>leakbugdemo.exe
test2.json
{
    Tick : -1,
    Now : "",
    PowerUpMoment : "",
    TotalDaysRunning : -1.0000000000000000E+000,
    DeviceID : -1,
    FirstPage : -1,
    LastPage : -1,
    CurrentPagePointer : -1,
    OverwriteOldEvents : false,
    MinLogLevelFilter : -1,
    StackFrameCorrupted : false,
    StackValid : [false, false, false, false, false, false, false],
    StackMinFree : [-1, -1, -1, -1, -1, -1, -1],
    FrameValid : [false, false, false, false, false, false, false],
    FrameMinFree : [-1, -1, -1, -1, -1, -1, -1],
    Sim : [false, false, false, false],
    DI : [false, false, false, false, false, false],
    DO : [false, false, false, false, false, false],
    AI : [false, false, false, false, false, false, false, false],
    AO : [false, false, false],
    MCUCSR : -1,
    ProcessScanCounters : [-1, -1, -1, -1, -1, -1, -1]
}
Heap dump by heaptrc unit
663 memory blocks allocated : 41153/43200
663 memory blocks freed     : 41153/43200
0 unfreed memory blocks : 0
True heap size : 163840 (96 used in System startup)
True free heap : 163744






Microsoft Windows [Wersja 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Wszelkie prawa zastrzeżone.

C:\CT56_57\ctleak64>leakbugdemo.exe
test2.json
{
    Tick : -1,
    Now : "",
    PowerUpMoment : "",
    TotalDaysRunning : -1.0000000000000000E+000,
    DeviceID : -1,
    FirstPage : -1,
    LastPage : -1,
    CurrentPagePointer : -1,
    OverwriteOldEvents : false,
    MinLogLevelFilter : -1,
    StackFrameCorrupted : false,
    StackValid : [false, false, false, false, false, false, false],
    StackMinFree : [-1, -1, -1, -1, -1, -1, -1],
    FrameValid : [false, false, false, false, false, false, false],
    FrameMinFree : [-1, -1, -1, -1, -1, -1, -1],
    Sim : [false, false, false, false],
    DI : [false, false, false, false, false, false],
    DO : [false, false, false, false, false, false],
    AI : [false, false, false, false, false, false, false, false],
    AO : [false, false, false],
    MCUCSR : -1,
    ProcessScanCounters : [-1, -1, -1, -1, -1, -1, -1]
}
Heap dump by heaptrc unit
645 memory blocks allocated : 51957/54248
645 memory blocks freed     : 51957/54248
0 unfreed memory blocks : 0
True heap size : 196608 (160 used in System startup)
True free heap : 196448

Michal
The following user(s) said Thank You: Avra

Please Log in or Create an account to join the conversation.

Typhon leaks where Lazarus doesn't 8 years 9 months ago #9120

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir, where is the problem ?
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Typhon leaks where Lazarus doesn't 8 years 9 months ago #9140

  • Avra
  • Avra's Avatar Topic Author
  • Visitor
  • Visitor

Sternas Stefanos wrote: Sir
my suggestion is to use and Lab CT 5.7
I think we solve these problems

I thought I did use LAB 5.70. Shouldn't revision 005641 release be Lab CT 5.70?

Please Log in or Create an account to join the conversation.

Typhon leaks where Lazarus doesn't 8 years 9 months ago #9141

  • Avra
  • Avra's Avatar Topic Author
  • Visitor
  • Visitor

Michal wrote: My test has given a different result

Thank you very much for testing. It is strange that you do not have any leaks. I will test after pc restart and test on another pc...

Please Log in or Create an account to join the conversation.

Last edit: by Avra.
  • Page:
  • 1