error after upgrading to 4.2
#1
Posted 14 October 2007 - 11:17 AM
date/time : 2007-10-13, 17:29:43, 609ms
computer name : name-IBU7GUC4J4
user name : name <admin>
registered owner : name
operating system : Windows XP Service Pack 2 build 2600
system language : Hebrew
system up time : 15 days 18 hours
program up time : 1 hour 44 minutes
processors : 2x Intel® Pentium® 4 CPU 2.60GHz
physical memory : 330/1023 MB (free/total)
free disk space : (Csmile 15.84 GB
display mode : 1280x1024, 16 bit
process id : $cbc
allocated memory : 36.69 MB
executable : app.exe
exec. date/time : 2007-10-13 15:44
compiled with : BCB 2006
madExcept version : 3.0d
application version : 3.0.0e
callstack crc : $def96eb1, $6f184827, $6f184827
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 7C918FEA in module 'ntdll.dll'. Write of address 00000010.
main thread ($10b8):
7c918fea +5b ntdll.dll RtlpWaitForCriticalSection
00462efa +1e app.exe Graphics 2520 +4 TCanvas.Lock
0046326f +2f app.exe Graphics 2672 +4 TCanvas.TryLock
00482afd +41 app.exe Controls 3319 +5 FreeDeviceContexts
00489130 +3c app.exe Controls 7042 +5 TWinControl.MainWndProc
00433e4c +14 app.exe Classes 11583 +8 StdWndProc
00487473 +5f app.exe Controls 6043 +10 TWinControl.Destroy
0048e525 +1d app.exe Controls 10099 +2 TCustomControl.Destroy
004049fc +08 app.exe System 8832 +1 TObject.Free
005fffe1 +11 app.exe NxScrollControl 925 +1 TNxScrollControl.Destroy
0060bb94 +64 app.exe NxCustomGridControl 665 +9 TNxCustomGridControl.Destroy
00613d80 +5c app.exe NxCustomGrid 300 +8 TNxCustomGrid.Destroy
00679054 +30 app.exe NxDBGrid 534 +4 TNextDBGrid.Destroy
004874a1 +8d app.exe Controls 6049 +16 TWinControl.Destroy
0048e525 +1d app.exe Controls 10099 +2 TCustomControl.Destroy
005dc6e0 +28 app.exe NxPageControl 628 +3 TNxTabSheet.Destroy
004049fc +08 app.exe System 8832 +1 TObject.Free
00413c84 +08 app.exe SysUtils 16957 +2 FreeAndNil
005dc41a +06 app.exe NxPageControl 522 +1 TNxCustomNotebook.DeletePage
005dbf44 +28 app.exe NxPageControl 374 +1 TNxCustomNotebook.Destroy
005dcd30 +28 app.exe NxPageControl 892 +3 TNxPageControl.Destroy
004874a1 +8d app.exe Controls 6049 +16 TWinControl.Destroy
0049590c +28 app.exe Forms 2349 +3 TScrollingWinControl.Destroy
00496599 +e1 app.exe Forms 2924 +14 TCustomForm.Destroy
0043302b +47 app.exe Classes 10464 +9 TComponent.DestroyComponents
00494732 +32 app.exe Forms 1563 +3 DoneApplication
0040c49e +26 app.exe SysUtils 3449 +6 DoExitProc
0040586d +21 app.exe System 11901 +19 @Halt0
thread $11e4:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($10b8) at:
02d04224 nl_msgc.dll
thread $468:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($10b8) at:
02c81b67 nl_lsp.dll
thread $17d8:
7c90eb94 +000 ntdll.dll KiFastSystemCallRet
>> created by main thread ($10b8) at:
71aa3a0c +191 WS2HELP.dll WahOpenHandleHelper
thread $120c:
7c90eb94 ntdll.dll KiFastSystemCallRet
thread $4b4:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($10b8) at:
02c812e9 nl_lsp.dll
thread $156c: <priority:1>
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($10b8) at:
71a5dbb3 mswsock.dll
thread $1e8:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($10b8) at:
42c32a65 wininet.dll
thread $1598:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by thread $778 at:
77e8760d RPCRT4.dll
thread $1268:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by thread $1598 at:
77e8760d RPCRT4.dll
thread $f68:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($10b8) at:
7750cc4a ole32.dll
the error happens ONLY when i exit the app
and AFTER formdestroy has finished
not sure what might cause this
but as u can see from the report, it happens
when destroying the nxPageControl and the dbgrid inside
i have 1 critical section global var
which i use several times, all of them are in try finally clause
it happens after installing version 4.2
mayb its sth i did wrong
but i dont know where to start looking
plz advice
#2
Posted 14 October 2007 - 01:10 PM
This may be anything. How do you have solve problem from this topic before:
http://www.bergsoft....mp;hl=madexcept
I only may hint that you try to disable line for setting HintWindowClass := TntHintWindow; I know that this have made me problems before, but now works all fine. I have also build now one huge demo with grids on NxPageControls and all worked fine.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 14 October 2007 - 01:17 PM
dont remember what it was exactly
this problem seems to be related to critical section
but i have all .leave; under try finally clause
i wanted to get an advice on where to look
i will try to remove the hint thing and see if it works
#4
Posted 14 October 2007 - 01:42 PM
If you may add break points inside TNxPageControl.Destroy or TNxCustomNotebook.Destroy maybe you can send me a line where AV happens?
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 14 October 2007 - 03:35 PM
i tried to look in google about this error:
7c918fea +5b ntdll.dll RtlpWaitForCriticalSection
but usually it was either criticalsection or synchronize
the thing is that the problem occurs after everything is executed
even after formdestroy (main form)
so i dont understand where can it come from
#6
Posted 14 October 2007 - 03:44 PM
This may be everything. Does it happen every time when you close app?
I have look for ntdll.dll on google, and there are some other problems related to it.
Again, you may try to temporally replace NxPageControl with TPageControl and do some tests. Also, try to test it again with old version of NextSuite.
I hope that this may help you in some kind.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#7
Posted 14 October 2007 - 07:50 PM
i just remembered that this problem:
http://www.bergsoft....mp;hl=madexcept
was fixed after i told u to fix back this:
http://www.bergsoft....?showtopic=1691
#8
Posted 14 October 2007 - 09:03 PM
I am not sure that this problem is related to this.
Problem from topic: http://www.bergsoft....?showtopic=1691 was created after you have suggest adding one line at the start of SetActivePageIndex
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#9
Posted 14 October 2007 - 09:10 PM
first i suggested to add 1 line to setactivepageindex
but then i realize it made more problems than anything else = the problem from that topic
that's why i told u to remove it
the currently problem is not related, im sure
i just answered your question from b4 :-)
#10
Posted 14 October 2007 - 09:22 PM
I suggest that you defintelly try some steps from my 2nd post above.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#11
Posted 14 October 2007 - 11:51 PM
it can work X times (it happens after my app is fully closed so i dont have a place i can put a breakpoint) with no problem
and without notice, X+1 will fail....
if i open the app and do exactly as i did b4 again it doesnt happen
until it does... only god (and delphi) knows why
#12
Posted 15 October 2007 - 10:54 AM
Maybe memory is leaking somewhere. Do you have try to add FastMM4 (fasy memory) to check leaks?
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#13
Posted 15 October 2007 - 04:40 PM
usually i do that b4 releasing the final version
it seems to be a problem with a critical section (according to the error)
after all/some objects are freed
but i dont know why
and since it happens after all my code is executed
i dont have a place to put a breakpoint
i will try to put a breakpoint on all criticalsection.enter; code and see
though again, it can work good for long time... until it doesnt suddenly
#14
Posted 15 October 2007 - 07:49 PM
Try to test it with previous release of NextSuite. Maybe some bug is fixed in last release, but you have a workaround for it in previous releases.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#15
Posted 15 October 2007 - 08:17 PM
but i guess i dont have a choice
main problem is that it doesnt happen all the time even with this version
so i dont know how many times i should try with previous release b4 knowing it doesnt happen there
not sure i understood this line:
"Maybe some bug is fixed in last release, but you have a workaround for it in previous releases."
#16
Posted 19 October 2007 - 01:11 AM
procedure FreeDeviceContexts;
var
I: Integer;
begin
with CanvasList.LockList do
try
for I := Count-1 downto 0 do
with TControlCanvas(Items[I]) do
if TryLock then <----
try
FreeHandle;
finally
Unlock;
end;
finally
CanvasList.UnlockList;
end;
end;
here is trylock function (graphics.pas)
function TCanvas.TryLock: Boolean;
begin
EnterCriticalSection(CounterLock);
try
Result := FLockCount = 0; <----
if Result then Lock;
finally
LeaveCriticalSection(CounterLock);
end;
end;
the problem happens when FLockCount is not 0
any idea what might cause this?
does grid.DisableControls also affects FLockCount?
according to the bug report it seems to occur when releasing TnxScrollControl
but mayb im missing sth
#17
Posted 19 October 2007 - 10:35 AM
I am still not sure what may cause this problem. I have look inside EnableControls (TDataSet) and didn't find any Canvas locking.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#18
Posted 19 October 2007 - 01:06 PM
is it the scrollbar of the grid?
#19
Posted 19 October 2007 - 05:53 PM
the error occurs here
function TCanvas.TryLock: Boolean;
begin
EnterCriticalSection(CounterLock); <----
try
Result := FLockCount = 0;
if Result then Lock;
finally
LeaveCriticalSection(CounterLock);
end;
end;
when it tries to enter into criticalsection, it fails
mayb the problem is with CounterLock?
#20
Posted 19 October 2007 - 07:16 PM
I am sorry but this don't help. I suggest that you try with some of my advices from previous posts.
TNxScrollControl is a ancestor of NextGrid and NextDBGrid. This class is didn't changed in last several versions.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











