View Full Version : Eureka and FastMM
Fredrik
27-Mar-2008, 07:42 AM
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
admin
27-Mar-2008, 03:55 PM
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?
Fredrik
28-Mar-2008, 09:19 AM
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
Alf Christophersen
01-Apr-2008, 11:29 PM
> 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>
admin
02-Apr-2008, 07:32 AM
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. :)
Fredrik
02-Apr-2008, 07:46 AM
Nice! I'am waiting to test it.
/Fredrik
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. :)
Ludek
02-Apr-2008, 12:31 PM
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.
Ludek
02-Apr-2008, 01:14 PM
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.
Ludek
02-Apr-2008, 01:21 PM
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 @ . . . . . . . . . . . . . . . . . . . . .
Loris Luise
02-Apr-2008, 01:32 PM
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.
admin
02-Apr-2008, 01:53 PM
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.
Do you think to can create and send to me a little source demo able to reproduce this issue, please? :)
Unregistered
02-Apr-2008, 02:01 PM
the whole log hat approx. 500MB... I could try to compress it.
admin
02-Apr-2008, 02:02 PM
No, try simply to create a source demo able to reproduce this issue, please.
Ludek
02-Apr-2008, 02:21 PM
That's the bad on the whole thing. the error is not so simple reproducible :-( i'll send you the log and a screenshot with the summarized leaks, i think, it could also make it clear.
Ludek
02-Apr-2008, 02:43 PM
did you get my email? i think, the line TELTD32Infoscanner x 1 in the summary picture could be a good clue for you :-)
admin
02-Apr-2008, 03:14 PM
Hi,
I haven't received your email.
Please sent it to support@eurekalog.com compressing all the files in a ZIP file (password protected).
Ludek
02-Apr-2008, 04:16 PM
I've sent it to correct address now :-)
admin
02-Apr-2008, 04:23 PM
Hi,
I continue to not receive email.
If the compressed file is no more of 2Mb can you send it to me via http://www.eurekalog.com/support.php form, please?
admin
02-Apr-2008, 04:29 PM
Hi,
I've sent it to correct address now :-)
OK, I have just received it but is full clocked by our Anti Visur/Spam service.
So please can you recompress it using the .7z compressor (http://www.7-zip.org), please?
PS: excuse me for this problems! :(
Ludek
02-Apr-2008, 05:42 PM
News: my bug happens only, when I delete the generated map file. When the map file is present on the drive in the same directory, no leak appears. No leak also appers, if I compile without TD32 info. It seems to be a bug in analyzing the TD32 info, is it possible?
Ludek
04-Apr-2008, 05:33 AM
Or, at least, could I deactivate this scanning of TD32 debug info somehow? I think, I don't need it, the exception report is good enough also in executables compiled without TD32.
admin
04-Apr-2008, 05:28 PM
Hi,
I have just released the EurekaLog 6.0.13 RC 4 that fix all your issues.
Try it and tell back to me your results, OK? :)
Ludek
06-Apr-2008, 07:34 PM
Superb! works great now. thanks much!
admin
07-Apr-2008, 01:30 PM
You're welcome! :)
Fredrik
08-Apr-2008, 07:11 AM
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. :)
Hi!
I have tried RC4 and unfortunately I still get exceptions for the call to RemoveLastSeparator in GetNetworkData function. Did you do some fixes in this area in RC4?
Regards
/Fredrik
admin
15-Apr-2008, 10:51 AM
Hi,
try the last 6.0.13 RC 6 and tell back to me your results, OK? :)
vBulletin® v3.8.2, Copyright ©2000-2013, Jelsoft Enterprises Ltd.