EurekaLog newsgroups
Go Back   EurekaLog newsgroups > Support > Bugreports
Reply
 
Thread Tools Display Modes
  #1  
Old 27-Mar-2008, 07:42 AM
Fredrik
Guest
 
Posts: n/a
Thumbs down Eureka and FastMM

I saw the earlier post about Eureka and some error when using with FastMM.

I'am using 6.0.12 and also have a problem that raises when I use Eureka and FastMM in full debug mode and when i manually activate Eureka log with StandardEurekaError function. I then get an access violation for the line
RemoveLastSeparator(IP);
in the end of
procedure GetNetworkData(var IP, Submask, Gateway, DNS1, DNS2, DHCP: string);

if i remove the lines above concerning

GetAdapterInfo(Adapters);
Adapters := (Adapters^.Next);

I get no errors.

I dont now if Eureka or FastMM is the problem but since the only problem in full debug mode is in eureka I guess you are doing something wrong. Perhaps is it that you are using standard pascal strings in this situation.

Regards
/Fredrik

Last edited by admin; 19-Dec-2008 at 06:52 AM.
Reply With Quote
  #2  
Old 27-Mar-2008, 03:55 PM
admin admin is offline
Team Leader
 
Join Date: May 2005
Posts: 1,721
Default

Hi,

I'm sorry but after many and many try I cannot reproduce it.

Can you tell me more about the error raised, FastMM4 and Delphi versions and also send to me a little source demo able to reproduce it, please?

Also can you try to debug the GetAdapterInfo procedure so to can tell me more about the exact line that caused the problem, please?
__________________
Best regards...

Fabio Dell'Aria - Team Leader

http://www.eurekalog.com
Catch every bug, every time!
Reply With Quote
  #3  
Old 28-Mar-2008, 09:19 AM
Fredrik
Guest
 
Posts: n/a
Default

Hi!

I am using Delphi 2007 with latest updates and FastMM 4.78

I will try to set up a exampel but I think is more caused by environment than by code since my colegue dosnt have the problem and one difference is that he only have one network adapter and I have several.

But here is what I found out so far...will have try to get some more time on monday to test this but I have had difficulty to pinpoint the error but perhaps this will give you some idas.

This is the cpu window when it craschs...

@GetMem:
027F316C 85C0 test eax,eax
027F316E 7E13 jle $027f3183
027F3170 FF152C27C502 call dword ptr [$02c5272c]
027F3176 85C0 test eax,eax error is raised here...
027F3178 7402 jz $027f317c
027F317A F3C3 rep ret
027F317C B001 mov al,$01
027F317E E919020000 jmp $027f339c
027F3183 31C0 xor eax,eax
027F3185 F3C3 rep ret
027F3187 90 nop

And this is in the copy function in...RemoveLastSeparator;

1.
If I remove the call
//GetAdapterInfo(Adapters);
No exception.

2.
If I still have the above call removed and presets the variable
IP := 'test';
Then exception

3.
If I then make the below change
//Adapters_Start := AllocMem(Size);
GetMem(Adapters_Start,Size);
Then no exception

4.
If I change the call from GetAdapterInfo(Adapters);
to the below:

if (Adapters^.DhcpEnabled = 1) then
DHCP := (DHCP + 'ON - ')
else
DHCP := (DHCP + 'OFF - ');
Adapters := (Adapters^.Next);
Then exception:

5.
If I modify example 4 and put a break after Next so only one of my adapers i fetched
No exception.

6.
If I have the normal call to GetAdapterInfo but with a break so only on adapter is fetched
Then exception.

Conlusion there is some memory corruption when having multiple adapters but I cant say where or why.


Regards
/Fredrik
Reply With Quote
  #4  
Old 01-Apr-2008, 11:29 PM
Alf Christophersen
Guest
 
Posts: n/a
Default Re: Eureka and FastMM

> if i remove the lines above concerning
>
> GetAdapterInfo(Adapters);
> Adapters := (Adapters^.Next);


Sounds like getAdapterInfo may return NIL which you don't test for the
possibility of :-)

Maybe an "if Adaptors <> NIL then Adapters := (Adapters^.Next) else <do
something else>



Reply With Quote
  #5  
Old 02-Apr-2008, 07:32 AM
admin admin is offline
Team Leader
 
Join Date: May 2005
Posts: 1,721
Default

Hi,

thanks to all for this useful information.

I think to have finally fixed this issue.

The fix will be available shortly in the next 6.0.13 RC 4 version.
__________________
Best regards...

Fabio Dell'Aria - Team Leader

http://www.eurekalog.com
Catch every bug, every time!
Reply With Quote
  #6  
Old 02-Apr-2008, 07:46 AM
Fredrik
Guest
 
Posts: n/a
Default

Nice! I'am waiting to test it.

/Fredrik

Quote:
Originally Posted by admin View Post
Hi,

thanks to all for this useful information.

I think to have finally fixed this issue.

The fix will be available shortly in the next 6.0.13 RC 4 version.
Reply With Quote
  #7  
Old 02-Apr-2008, 12:31 PM
Ludek
Guest
 
Posts: n/a
Default

I'm also having big trouble with 6.0.12 and FastMM4 FullDebugMode. After some types of exceptions the program generates on termination a FastMM memoryleak file with 100 000's of eurekalog-object memory leaks. Do you mean, the 6.0.13 RC4 could help me? will it be available today? tomorrow? or this week?
Thanks, Ludek.
Reply With Quote
  #8  
Old 02-Apr-2008, 01:14 PM
Ludek
Guest
 
Posts: n/a
Default

default memory manager in delphi has no option "FullDebugMode". and this option is perfect for debugging, i can't imagine debugging random memory leaks without it.
Reply With Quote
  #9  
Old 02-Apr-2008, 01:21 PM
Ludek
Guest
 
Posts: n/a
Default

This is typical callstack for the eurekalog memory leak, that 'm getting hunderts thousands of them:

--------------------------------2008/4/2 14:27:24--------------------------------
A memory block has been leaked. The size is: 20

Stack trace of when this block was allocated (return addresses):
51F23BD6 [system.pas][System][System.@GetMem][2648]
51F26563 [system.pas][System][System.TObject.NewInstance][8824]
51F26966 [system.pas][System][System.@ClassCreate][9489]
405BE2 [EDebug.pas][EDebug][TELProcSymbolInfo.Create][2389]
406453 [EDebug.pas][EDebug][TELTD32InfoParser.Analyse][2545]
4062CD [EDebug.pas][EDebug][TELTD32InfoParser.Create][2511]
406F01 [EDebug.pas][EDebug][TELPeBorTD32Image.CheckDebugData][2912]
406E81 [EDebug.pas][EDebug][TELPeBorTD32Image.Create][2897]
4055DD [EDebug.pas][EDebug][TELDebugInfoTD32.InitializeSource][2243]
404F33 [EDebug.pas][EDebug][TELDebugInfoSource.Create][1995]

The block is currently used for an object of class: TELGlobalProcSymbolInfo

The allocation number is: 1131530

Current memory dump of 256 bytes starting at pointer address 348F0010:
44 2F 40 00 05 02 00 00 3C 08 01 00 94 F8 8C 00 2E 00 00 00 0F 0C C6 D3 00 00 00 00 80 FF 8E 34
00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 0B 44 11 00 D6 3B F2 51 63 65 F2 51 66 69 F2 51
E2 5B 40 00 53 64 40 00 CD 62 40 00 01 6F 40 00 81 6E 40 00 DD 55 40 00 33 4F 40 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 14 00 00 00 00 00 00 00 81 F4 39 2C 44 2F 40 00 05 02 00 00 79 07 00 00 1C 85 01 00
20 00 00 00 7E 0B C6 D3 00 00 00 00 80 FF 8E 34 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00
0C 44 11 00 D6 3B F2 51 63 65 F2 51 66 69 F2 51 9A 60 40 00 53 64 40 00 CD 62 40 00 01 6F 40 00
81 6E 40 00 DD 55 40 00 33 4F 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D / @ . . . . . < . . . ř Ś . . . . . . . Ć . . . . ˙ 4
. . . . . . . . ˙ ˙ ˙ ˙ . . . . . D . . ; ň Q c e ň Q f i ň Q
[ @ . S d @ . b @ . . o @ . n @ . U @ . 3 O @ . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 9 , D / @ . . . . . y . . . . . .
. . . ~ . Ć . . . . ˙ 4 . . . . . . . . ˙ ˙ ˙ ˙ . . . .
. D . . ; ň Q c e ň Q f i ň Q ` @ . S d @ . b @ . . o @ .
n @ . U @ . 3 O @ . . . . . . . . . . . . . . . . . . . . .
Reply With Quote
  #10  
Old 02-Apr-2008, 01:32 PM
Loris Luise
Guest
 
Posts: n/a
Default Re: Eureka and FastMM

Fredrik ha scritto:
> Hi!
>
> I am using Delphi 2007 with latest updates and FastMM 4.78
>
> I will try to set up a exampel but I think is more caused by
> environment than by code since my colegue dosnt have the problem and one
> difference is that he only have one network adapter and I have several.
>
> But here is what I found out so far...will have try to get some more
> time on monday to test this but I have had difficulty to pinpoint the
> error but perhaps this will give you some idas.
>
> This is the cpu window when it craschs...
>
> @GetMem:
> 027F316C 85C0 test eax,eax
> 027F316E 7E13 jle $027f3183
> 027F3170 FF152C27C502 call dword ptr [$02c5272c]
> 027F3176 85C0 test eax,eax error is raised here...
> 027F3178 7402 jz $027f317c
> 027F317A F3C3 rep ret
> 027F317C B001 mov al,$01
> 027F317E E919020000 jmp $027f339c
> 027F3183 31C0 xor eax,eax
> 027F3185 F3C3 rep ret
> 027F3187 90 nop
>
> And this is in the copy function in...RemoveLastSeparator;
>
> 1.
> If I remove the call
> //GetAdapterInfo(Adapters);
> No exception.
>
> 2.
> If I still have the above call removed and presets the variable
> IP := 'test';
> Then exception
>
> 3.
> If I then make the below change
> //Adapters_Start := AllocMem(Size);
> GetMem(Adapters_Start,Size);
> Then no exception
>
> 4.
> If I change the call from GetAdapterInfo(Adapters);
> to the below:
>
> if (Adapters^.DhcpEnabled = 1) then
> DHCP := (DHCP + 'ON - ')
> else
> DHCP := (DHCP + 'OFF - ');
> Adapters := (Adapters^.Next);
> Then exception:
>
> 5.
> If I modify example 4 and put a break after Next so only one of my
> adapers i fetched
> No exception.
>
> 6.
> If I have the normal call to GetAdapterInfo but with a break so only on
> adapter is fetched
> Then exception.
>
> Conlusion there is some memory corruption when having multiple adapters
> but I cant say where or why.
>
>
> Regards
> /Fredrik
>
>

Hello,

why are u using FASTMM with D2007?

D2007 has a very very good memorymanager, written by Pierre LaRiche,
FastMM author. So, i think FastMM is redundant or destabilizing.

Bye.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fastmm Clyde General 1 11-Feb-2009 05:21 AM
EurekaLog and FastMM Thomas Steinmaurer General 2 16-Oct-2008 06:52 AM
Bringing a Eureka 4 project up to Eureka 6 Tony Jackson General 3 04-Feb-2008 07:21 AM
Eurekalog 5.04 And FastMM add directive damien chrismann Bugreports 1 24-Oct-2005 07:57 AM

All times are GMT. The time now is 08:38 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright EurekaLab s.a.s. - VAT ID: IT05554520824