Rozszerzona informacja o błędzie aplikacji

0

Witam,

Szanownych kolegów proszę o wskazanie "niekomercyjnego" sposobu na przechwycenie/uzupełnienie wyświetlanego przez aplikację napisaną rzecz jasna w Delphi. Z tego co czytałem są komponenty, które realizują to w ten sposób, że pokazują również linię w programie na której wystąpił błąd jak również zapisują stan "środowiska" - szczegółowy log debugera. Pytanie czy istnieje jakieś rozwiązanie którego implementacja pozwoli mi na analizę pojawiających problemów z aplikacją taki właśnie log który zawierał będzie komplet potrzebnych mi informacji.

Z góry dzięki,

0

Nauka obsługi wbudowanego debuggera - o ile nie masz wersji Personal - powinna w 100% wystarczyć.

0

pakiet JCL - dodaje do programu skompilowanego jakieś 15-20% ale pokazuje (w większości przypadków) nr lini, która kontrolka miała focusa, które były aktywne i jeszcze wiele innych.

tu maszopis co i jak

Installs IDE expert which assists to insert JCL Debug
information into executable files. This can be useful when use
source location routines from JclDebug unit. These routines
needs some kind of special information to be able to provide
source location for given address in the process.
Currently there are four options to get it work:

  1. Generate and deploy MAP file with your executable file. The
    file is generated by the linker. It needs to be set in
    Project|Options dialog->Linker page, Detailed checkbox.

  2. Generate and deploy JDBG file file with your executable
    file. This is binary file based on MAP file but its size is
    typically about 12% of original MAP file. You can generate
    it by MapToJdbg tool in jcl\examples\vcl\debugextension\tools
    folder. The advantage over MAP file is smaller size and better
    security of the file content because it is not a plain text
    file and it also contains a checksum.

  3. Generate Borland TD32 debug symbols. These symbols are
    stored directly in the executable file but usually adds
    several megabytes so the file is very large. The advantage
    is you don't have to deploy any other file and it is easy
    to generate it by checking Include TD32 debug info in
    Linker option page.

  4. Insert JCL Debug info into executable file by the IDE
    expert. The size of added data is similar to JDBG file but
    it will be inserted directly into the executable file. This
    is probably best option because it combines small size of
    included data and no requirement of deploying additional
    files.
    In case you use this option you need install the
    JclDebugIde expert.

The IDE expert will add new item to IDE Project menu.
It adds 'Insert JCL Debug data' check item at the end
of the Project menu. When the item is checked, everytime
the project is compiled by one of following commands:
Compile, Build, Compile All Projects, Build All Projects
or Run necessary JCL debug data are automatically
inserted into the executable. Moreover, for Build and
Build All commands dialog with detailed information of
size of these data will be displayed.

You can generate those debug data for packages and
libraries as well using the expert. Each executable file
in the project can use different option from those
listed above. It is not necessary to generate any debug
data for Borland runtime packages because the source
location code can use names of exported functions to get
procedure or method name. To get line number information
for Borland RTL and VCL/CLX units you have to check Use
Debug DCUs checkbox in Project|Options dialog -> Compiler tab.
Unfortunately it is not possible to get line number
information for Borland runtime packages because Borland
does not provide detailed MAP files for them so you get
procedure or method name only.

In case you have more than one data source for an executable
file by an accident the best one is chosen in following order:

  1. JCL Debug data in the executable file
  2. JDBG file
  3. Borland TD32 symbols
  4. MAP file
  5. Library or Borland package exports

It is also possible to insert JCL debug data programmatically
to the executable file by using MakeJclDbg command line tool
in jcl\examples\tools folder. You can study included makefiles
which uses this tool for building DelphiTools examples.

Short description of getting the JclDebug functionality
in your project:

  1. Close all running instances of Delphi
  2. Install JCL and IDE experts by the JCL Installer
  3. Run Delphi IDE and open your project
  4. Remove any TApplication.OnException handlers from
    your project (if any).
  5. Add new Exception Dialog by selecting
    File | New | Other ... | Dialogs tab,
    Select 'Exception Dialog' or
    'Exception Dialog with Send' icon, Click OK button,
    Save the form (use ExceptionDialog.pas name, for
    example)
  6. Check Project | Insert JCL Debug data menu item
  7. Do Project | Build

a tu masz przykładowy raport po błędzie

==============================================================================

28-03-2006 0041

==============================================================================
Table, file or directory does not exist.
File: D:!Projekty!Bazy\IgloLand\V2005.arc\MAT.DBF.

Exception class: EApolloError
Exception address: 00496096

Stack list, generated 28-03-2006 0040
[00496091] ApoDSet.TApolloTable.RaiseApollo (Line 1488, "ApoDSet.pas" + 2) + $F
[0049A2AD] ApoDSet.TApolloTable.OpenTable (Line 6689, "ApoDSet.pas" + 29) + $1F
[0049B1A4] ApoDSet.TApolloTable.InternalInitFieldDefs (Line 7125, "ApoDSet.pas" + 5) + $2
[0049A9B1] ApoDSet.TApolloTable.InternalOpen (Line 6875, "ApoDSet.pas" + 31) + $5
[00482371] DB.TDataSet.DoInternalOpen + $19
[0048242A] DB.TDataSet.OpenCursor + $1E
[004822E5] DB.TDataSet.SetActive + $55
[00482130] DB.TDataSet.Open + $4
[00545AAC] untDMImpExp.TDMImpExp.Connect (Line 152, "untDMImpExp.pas" + 12) + $3
[00549C82] untMain.TfrmMain.FormShow (Line 142, "untMain.pas" + 4) + $7
[004605ED] Forms.TCustomForm.DoShow + $15
[004635B9] Forms.TCustomForm.CMShowingChanged + $A9
[00447D64] Controls.TControl.WndProc + $188
[0044ACAF] Controls.TWinControl.WndProc + $157
[00460D79] Forms.TCustomForm.WndProc + $421
[00447B34] Controls.TControl.Perform + $24
[0044A803] Controls.TWinControl.UpdateShowing + $C7
[0044A86E] Controls.TWinControl.UpdateControlState + $36
[0044C5FE] Controls.TWinControl.CMVisibleChanged + $26
[00447D64] Controls.TControl.WndProc + $188
[0045FB8D] Forms.TCustomForm.AfterConstruction + $11
[00403AA3] System.@AfterConstruction + $7
[0045FB64] Forms.TCustomForm.Create + $174
[00431F40] MultiMon.xMonitorFromWindow (Line 284, "MultiMon.pas" + 4) + $2
[0044ACAF] Controls.TWinControl.WndProc + $157
[00460D79] Forms.TCustomForm.WndProc + $421
[004613D0] Forms.TCustomForm.GetMonitor + $4C
[00447B34] Controls.TControl.Perform + $24
[004468A3] Controls.TControl.SetVisible + $27
[0046086E] Forms.TCustomForm.SetVisible + $3A
[00467360] Forms.TApplication.Run + $80
[0055A9F1] Integracja.Integracja (Line 20, "D:!Projekty\IgloLand\Prog_Integrujacy\Integracja.dpr" + 6) + $7

System : Windows XP Professional, Version: 5.1, Build: A28, "Dodatek Service Pack 2"
Processor: AMD, AMD Athlon(tm) XP 1500+, 1333 MHz MMX
Display : 1024x768 pixels, 32 bpp

List of loaded modules:
[00400000] D:!Projekty!EXE\Prog_Integrujacy\Integracja.exe
1.0.2.56 - 1.0.2.56
[005C0000] D:!Projekty!EXE\Prog_Integrujacy\FrmUtils.dll
<00400000> 1.0.0.6 - 1.0.0.6
[00680000] D:!Projekty!EXE\Prog_Integrujacy\Utils.dll
<00400000> 1.0.0.31 - 1.0.0.31
[10000000] C:\WINDOWS\system32\SDE61.DLL
6.1.0.17 - 6.1.0.17
SDE
[1B000000] C:\WINDOWS\System32\msjet40.dll
4.0.8618.0 - 4.00.8618.0
Microsoft Jet Engine Library
[1B2C0000] C:\WINDOWS\System32\msjter40.dll
4.0.6508.0 - 4.00.6508.0
Microsoft Jet Database Engine Error DLL
[1B2D0000] C:\WINDOWS\System32\MSJINT40.DLL
4.0.8905.0 - 4.00.8905.0
Microsoft Jet Database Engine International DLL
[1B570000] C:\WINDOWS\System32\msjetoledb40.dll
4.0.8227.0 - 4.00.8227.0
Microsoft OLE DB Provider for Jet
[1B5D0000] C:\WINDOWS\System32\mswstr10.dll
4.0.8905.0 - 4.00.8905.0
Biblioteka sortowania Microsoft Jet
[20000000] C:\WINDOWS\system32\xpsp2res.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Komunikaty pakietu Service Pack 2
[4DD80000] C:\Program Files\Common Files\System\ado\msado15.dll
2.81.1117.0 - 2.81.1117.0 (xpsp_sp2_rtm.040803-2158)
Microsoft Data Access - ActiveX Data Objects
[5B1D0000] C:\WINDOWS\system32\uxtheme.dll
6.0.2900.2180 - 6.00.2900.2180 (xpsp_sp2_rtm.040803-2158)
Biblioteka Microsoft UxTheme
[65780000] C:\Program Files\Avast4\AhJsctNs.dll
4.6.753.0 - 4, 6, 753, 0
avast! Script Blocking library for Netscape/Mozilla
[6FF40000] C:\WINDOWS\system32\NETAPI32.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Net Win32 API DLL
[71A40000] C:\WINDOWS\system32\WS2HELP.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Windows Socket 2.0 Helper dla Windows NT
[71A50000] C:\WINDOWS\system32\WS2_32.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Windows Socket 2.0 32-Bit DLL
[71A70000] C:\WINDOWS\system32\wsock32.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
32-bitowa biblioteka Windows Socket
[73F60000] C:\Program Files\Common Files\System\Ole DB\oledb32.dll
2.81.1117.0 - 2.81.1117.0 (xpsp_sp2_rtm.040803-2158)
Microsoft Data Access - OLE DB Core Services
[75060000] C:\WINDOWS\system32\RESUTILS.DLL
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Microsoft Cluster Resource Utility DLL
[750A0000] C:\WINDOWS\system32\MTXCLU.DLL
2001.12.4414.308 - 2001.12.4414.308
MS DTC amd MTS clustering support DLL
[750E0000] C:\WINDOWS\system32\colbact.DLL
2001.12.4414.308 - 2001.12.4414.308
[75AD0000] C:\Program Files\Common Files\System\Ole DB\OLEDB32R.DLL
2.81.1117.0 - 2.81.1117.0 built by: (_sqlbld)
Microsoft Data Access - Zasoby podstawowych usług baz danych OLE
[760C0000] C:\WINDOWS\system32\comsvcs.dll
2001.12.4414.308 - 2001.12.4414.308
[76360000] C:\WINDOWS\system32\imm32.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Windows XP IMM32 API Client DLL
[76380000] C:\WINDOWS\system32\comdlg32.dll
6.0.2900.2180 - 6.00.2900.2180 (xpsp_sp2_rtm.040803-2158)
Plik DLL wspólnych okien dialogowych
[765F0000] C:\WINDOWS\system32\MSDART.DLL
2.81.1117.0 - 2.81.1117.0 (xpsp_sp2_rtm.040803-2158)
Microsoft Data Access - OLE DB Runtime Routines
[769A0000] C:\WINDOWS\system32\USERENV.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Userenv
[76BE0000] C:\WINDOWS\system32\PSAPI.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Process Status Helper
[76D90000] C:\WINDOWS\system32\CLUSAPI.DLL
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Cluster API Library
[76FC0000] C:\WINDOWS\system32\CLBCATQ.DLL
2001.12.4414.308 - 2001.12.4414.308
[77040000] C:\WINDOWS\system32\COMRes.dll
2001.12.4414.258 - 2001.12.4414.258
[77110000] C:\WINDOWS\system32\oleaut32.dll
5.1.2600.2180 - 5.1.2600.2180
[773C0000] C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
6.0.2900.2180 - 6.0 (xpsp_sp2_rtm.040803-2158)
User Experience Controls Library
[774D0000] C:\WINDOWS\system32\ole32.dll
5.1.2600.2726 - 5.1.2600.2726 (xpsp_sp2_gdr.050725-1528)
Microsoft OLE for Windows
[77BF0000] C:\WINDOWS\system32\version.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Version Checking and File Installation Libraries
[77C00000] C:\WINDOWS\system32\msvcrt.dll
7.0.2600.2180 - 7.0.2600.2180 (xpsp_sp2_rtm.040803-2158)
Windows NT CRT DLL
[77D30000] C:\WINDOWS\system32\user32.dll
5.1.2600.2622 - 5.1.2600.2622 (xpsp_sp2_gdr.050301-1519)
Biblioteka DLL klienta Windows XP USER API
[77DC0000] C:\WINDOWS\system32\advapi32.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Advanced Windows 32 Base API
[77E70000] C:\WINDOWS\system32\RPCRT4.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Remote Procedure Call Runtime
[77F10000] C:\WINDOWS\system32\GDI32.dll
5.1.2600.2818 - 5.1.2600.2818 (xpsp_sp2_gdr.051228-1427)
GDI Client DLL
[77F60000] C:\WINDOWS\system32\SHLWAPI.dll
6.0.2900.2781 - 6.00.2900.2781 (xpsp_sp2_gdr.051020-1730)
Biblioteka dodatkowych narzędzi powłoki
[77FE0000] C:\WINDOWS\system32\Secur32.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Security Support Provider Interface
[7C800000] C:\WINDOWS\system32\kernel32.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Biblioteka DLL klienta Windows NT BASE API
[7C900000] C:\WINDOWS\system32\ntdll.dll
5.1.2600.2180 - 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Biblioteka NT Layer DLL
[7C9C0000] C:\WINDOWS\system32\shell32.dll
6.0.2900.2763 - 6.00.2900.2763 (xpsp_sp2_gdr.050922-1642)
Wspólna biblioteka DLL Powłoki systemu Windows

0

Właśnie o taką odpowiedź mi chodziło. Misiekd - dzięki,

0

i to rozwiązuje mój problem, jeszcze raz dzięki

1 użytkowników online, w tym zalogowanych: 0, gości: 1