Ошибки в Дельфи
Delphi — среда быстрой разработки, где в качестве языка программирования используется Object Pascal. На сегодняшний день позволяет разрабатывать ПО для Microsoft Windows, Mac OS, iOS и Android и входит в состав Embarcadero RAD Studio
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi.feed
2022-09-13T04:44:54+07:00
Delphi help
info@delphi-hlp.ru
Joomla! - Open Source Content Management
Data segment too large error
2012-09-25T17:43:45+07:00
2012-09-25T17:43:45+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/data-segment-too-large-error.html
Super User
toto44@inbox.ru
<p> <span style="color: #000000; font-size: 11pt; font-weight: bold;">Data segment too large error</span></p>
<p> </p>
<p><span style="color: #000000;">Typed constants are added to the Program's data segment. Untyped constants are added to the code segment of the application only if they are used. Unless you are going to reassign the value of a typed constant, you should use an untyped constant instead. Typed constants should be replaced with initialized variables to be compatible with future versions of the compiler.</span></p>
<p> </p>
<p><span style="color: #000000;">Example:</span></p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{This adds the constant to the data segment}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeTypedString : </span><span class="f_CodeExample" style="color: #008000; font-weight: bold;">string</span><span class="f_CodeExample" style="color: #000000;"> = </span><span class="f_CodeExample" style="color: #ff0000;">'Test'</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeTypedInt : integer = </span><span class="f_CodeExample" style="color: #800000;">5</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> </p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{This adds the constant to the code segment if used}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeUnTypedString = </span><span class="f_CodeExample" style="color: #ff0000;">'Test'</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeUnTypedInt = </span><span class="f_CodeExample" style="color: #800000;">5</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p style="text-align: right;"><span style="font-family: 'Arial Unicode MS', 'Lucida Sans Unicode', 'Arial'; color: #ff6600; font-size: 8pt; font-weight: bold;"> </span></p>
<p> </p>
<p> <span style="color: #000000; font-size: 11pt; font-weight: bold;">Data segment too large error</span></p>
<p> </p>
<p><span style="color: #000000;">Typed constants are added to the Program's data segment. Untyped constants are added to the code segment of the application only if they are used. Unless you are going to reassign the value of a typed constant, you should use an untyped constant instead. Typed constants should be replaced with initialized variables to be compatible with future versions of the compiler.</span></p>
<p> </p>
<p><span style="color: #000000;">Example:</span></p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{This adds the constant to the data segment}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeTypedString : </span><span class="f_CodeExample" style="color: #008000; font-weight: bold;">string</span><span class="f_CodeExample" style="color: #000000;"> = </span><span class="f_CodeExample" style="color: #ff0000;">'Test'</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeTypedInt : integer = </span><span class="f_CodeExample" style="color: #800000;">5</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"> </p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{This adds the constant to the code segment if used}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeUnTypedString = </span><span class="f_CodeExample" style="color: #ff0000;">'Test'</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">const</span><span class="f_CodeExample" style="color: #000000;"> SomeUnTypedInt = </span><span class="f_CodeExample" style="color: #800000;">5</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p style="text-align: right;"><span style="font-family: 'Arial Unicode MS', 'Lucida Sans Unicode', 'Arial'; color: #ff6600; font-size: 8pt; font-weight: bold;"> </span></p>
<p> </p>
Delphi Run-Time Error Codes
2012-09-18T17:07:29+07:00
2012-09-18T17:07:29+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/delphi-run-time-error-codes.html
Super User
toto44@inbox.ru
<p><span style="color: #000000;">Delphi's online help documentation seems to miss the run-time error codes. I usually looked them up in my old Borland Pascal for Windows help file - now they are here for fast access: </span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">1 Invalid function number </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">2 File not found </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">3 Path not found </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">4 Too many open files </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">5 File access denied </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">6 Invalid file handle </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">12 Invalid file access code </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">15 Invalid drive number </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">16 Cannot remove current directory </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">17 Cannot rename across drives </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">100 Disk read error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">101 Disk write error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">102 File not assigned </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">103 File not open </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">104 File not open for input </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">105 File not open for output </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">106 Invalid numeric format </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">200 Division by zero </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">201 Range check error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">202 Stack overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">203 Heap overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">204 Invalid pointer operation </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">205 Floating point overflow </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">206 Floating point underflow </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">207 Invalid floating point operation </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">210 Object not initialized </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">211 Call to abstract method </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">212 Stream registration error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">213 Collection index out of range </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">214 Collection overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">215 Arithmetic overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">216 General protection fault </span></p>
<p><span style="color: #000000;"> </span></p>
<p style="text-align: right;"><span style="font-family: 'Arial Unicode MS', 'Lucida Sans Unicode', 'Arial'; color: #ff6600; font-size: 8pt; font-weight: bold;"><br /></span></p>
<p><span style="color: #000000; font-weight: bold;">Взято с сайта</span><a class="weblink" href="https://www.delphifaq.com" target="_blank">https://www.delphifaq.com</a></p>
<p><span style="color: #000000;">Delphi's online help documentation seems to miss the run-time error codes. I usually looked them up in my old Borland Pascal for Windows help file - now they are here for fast access: </span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">1 Invalid function number </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">2 File not found </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">3 Path not found </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">4 Too many open files </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">5 File access denied </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">6 Invalid file handle </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">12 Invalid file access code </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">15 Invalid drive number </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">16 Cannot remove current directory </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">17 Cannot rename across drives </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">100 Disk read error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">101 Disk write error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">102 File not assigned </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">103 File not open </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">104 File not open for input </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">105 File not open for output </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">106 Invalid numeric format </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">200 Division by zero </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">201 Range check error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">202 Stack overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">203 Heap overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">204 Invalid pointer operation </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">205 Floating point overflow </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">206 Floating point underflow </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">207 Invalid floating point operation </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">210 Object not initialized </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">211 Call to abstract method </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">212 Stream registration error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">213 Collection index out of range </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">214 Collection overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">215 Arithmetic overflow error </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">216 General protection fault </span></p>
<p><span style="color: #000000;"> </span></p>
<p style="text-align: right;"><span style="font-family: 'Arial Unicode MS', 'Lucida Sans Unicode', 'Arial'; color: #ff6600; font-size: 8pt; font-weight: bold;"><br /></span></p>
<p><span style="color: #000000; font-weight: bold;">Взято с сайта</span><a class="weblink" href="https://www.delphifaq.com" target="_blank">https://www.delphifaq.com</a></p>
Duplicate resource error
2012-09-20T20:12:48+07:00
2012-09-20T20:12:48+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/duplicate-resource-error.html
Super User
toto44@inbox.ru
<p><span style="font-family: 'Courier New'; font-size: 8pt;"> </span></p>
<p><span style="font-style: italic;">When I try to add a resource to my project's .res file, I get a "Duplicate Resource" error when linking. The resource I have added is a unique resource. How can I successfully add the resource to my project?</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="color: #000000;"> </span></p>
<p>The projects resource file is generated by the IDE wizard, and is not intended to be modified. To add additional resources to your project, create a separate resource file with a unique name that does not conflict with either the project or any of the unit names. Then to add the resource file to Delphi, simply add the following line to any unit file in the project:</p>
<p> </p>
<p><span style="font-family: 'Courier New'; color: #ff00ff; font-size: 9pt;">{$R MyRes.Res}</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="color: #000000;">(where MyRes.Res is the name of the resource file).</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="color: #000000;">To add the resource to Borland's C++ Builder, add the resource </span></p>
<p><span style="color: #000000;">from the project manager.</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="font-family: 'Courier New'; font-size: 8pt;"> </span></p>
<p><span style="font-style: italic;">When I try to add a resource to my project's .res file, I get a "Duplicate Resource" error when linking. The resource I have added is a unique resource. How can I successfully add the resource to my project?</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="color: #000000;"> </span></p>
<p>The projects resource file is generated by the IDE wizard, and is not intended to be modified. To add additional resources to your project, create a separate resource file with a unique name that does not conflict with either the project or any of the unit names. Then to add the resource file to Delphi, simply add the following line to any unit file in the project:</p>
<p> </p>
<p><span style="font-family: 'Courier New'; color: #ff00ff; font-size: 9pt;">{$R MyRes.Res}</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="color: #000000;">(where MyRes.Res is the name of the resource file).</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="color: #000000;">To add the resource to Borland's C++ Builder, add the resource </span></p>
<p><span style="color: #000000;">from the project manager.</span></p>
<p><span style="color: #000000;"> </span></p>
EOleSysError - как бороться?
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/eolesyserror-kak-borotsya.html
Super User
toto44@inbox.ru
<p><span style="font-family: 'Times New Roman'; color: #000000;">Перед тем как Дельфи сможет использовать любые ActiveX/COM (в том числе и ADO компоненты) должна быть выполнена строка Application.Initialize - которая инициализирует использование COM. Если пишется DLL или консольное приложение, которые не имеют объекта Application, то надо просто добавить в Uses ещё один модуль: "oleauto" </span></p>
<p><span style="font-family: 'Times New Roman'; color: #000000;">Перед тем как Дельфи сможет использовать любые ActiveX/COM (в том числе и ADO компоненты) должна быть выполнена строка Application.Initialize - которая инициализирует использование COM. Если пишется DLL или консольное приложение, которые не имеют объекта Application, то надо просто добавить в Uses ещё один модуль: "oleauto" </span></p>
Error reading symbol file
2013-03-22T16:53:15+07:00
2013-03-22T16:53:15+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/error-reading-symbol-file.html
Super User
toto44@inbox.ru
<p>This usually occurs when you move a project to another drive or directory. Simply deleting the project's .DSM and .DSK files should remedy the situation.<br /><br /> </p>
<p>This usually occurs when you move a project to another drive or directory. Simply deleting the project's .DSM and .DSK files should remedy the situation.<br /><br /> </p>
Error: Interface not supported
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/error-interface-not-supported.html
Super User
toto44@inbox.ru
<p><span style="font-style: italic; color: #000000;">I receive an "Interface is not supported" error when trying to use an interface.</span></p>
<p> </p>
<p>Verify that STDVCL32.DLL and your type library are registered. If casting an interface, you must be using DCOM and the type library must be registered on the client.</p>
<p><span style="font-style: italic; color: #000000;">I receive an "Interface is not supported" error when trying to use an interface.</span></p>
<p> </p>
<p>Verify that STDVCL32.DLL and your type library are registered. If casting an interface, you must be using DCOM and the type library must be registered on the client.</p>
Error: RPC Server is unavailable
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/error-rpc-server-is-unavailable.html
Super User
toto44@inbox.ru
<p>The error is usually caused because the server can't be located. Make sure you can ping the server machine using the string you typed into the ComputerName property of the TRemoteServer. You might also want to try using an IP address instead in case there is some problem with your DNS configuration or the hosts file. Try setting the "Default Authentication Level" to (Run DCOMCNFG on the server to do this.) Lastly, check the Microsoft Developer's Network on the Web for the latest information on this Microsoft transport. The MSDN can be located at the time of the writing at www.microsoft.com/msdn.</p>
<p>The error is usually caused because the server can't be located. Make sure you can ping the server machine using the string you typed into the ComputerName property of the TRemoteServer. You might also want to try using an IP address instead in case there is some problem with your DNS configuration or the hosts file. Try setting the "Default Authentication Level" to (Run DCOMCNFG on the server to do this.) Lastly, check the Microsoft Developer's Network on the Web for the latest information on this Microsoft transport. The MSDN can be located at the time of the writing at www.microsoft.com/msdn.</p>
Stack Overflow, Runtime error 202
2013-03-22T17:05:09+07:00
2013-03-22T17:05:09+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/stack-overflow-runtime-error-202.html
Super User
toto44@inbox.ru
<p><span style="color: #000000; font-size: 11pt; font-weight: bold;">Stack Overflow, Runtime error 202</span></p>
<p>Simply put, stack overflows are caused by putting too much on the stack. Usually, they are caused by recursive procedures that never end. A good example would be creating an event handler for the TMemo's onChange event, and making a change to the Memo during the processing of the event. Every time the OnChange event gets fired, another change is made, so the OnChange event gets fired again in an almost endless loop. The loop finally ends when the stack overflows, and the application crashes.</p>
<p> </p>
<p>Here is an example of a recursive procedure:</p>
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">procedure</span><span class="f_CodeExample" style="color: #000000;"> RecursiveBlowTheStack;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">begin</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">RecursiveBlowTheStack;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">end</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p>Sometimes, a stack overflow is caused by too many large procedures. Each procedure calls another procedure, until the stack simply overflows. This can be remidied by breaking up large procedures into smaller ones. A good rule of thumb in regard to a procedures size is if the procedure's source code takes up more than a screen, its time to break it down into smaller procedures.</p>
<p> </p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/stack-overflow-runtime-error-202.html">Подробнее...</a></p>
<p><span style="color: #000000; font-size: 11pt; font-weight: bold;">Stack Overflow, Runtime error 202</span></p>
<p>Simply put, stack overflows are caused by putting too much on the stack. Usually, they are caused by recursive procedures that never end. A good example would be creating an event handler for the TMemo's onChange event, and making a change to the Memo during the processing of the event. Every time the OnChange event gets fired, another change is made, so the OnChange event gets fired again in an almost endless loop. The loop finally ends when the stack overflows, and the application crashes.</p>
<p> </p>
<p>Here is an example of a recursive procedure:</p>
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">procedure</span><span class="f_CodeExample" style="color: #000000;"> RecursiveBlowTheStack;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">begin</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">RecursiveBlowTheStack;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">end</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p>Sometimes, a stack overflow is caused by too many large procedures. Each procedure calls another procedure, until the stack simply overflows. This can be remidied by breaking up large procedures into smaller ones. A good rule of thumb in regard to a procedures size is if the procedure's source code takes up more than a screen, its time to break it down into smaller procedures.</p>
<p> </p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/stack-overflow-runtime-error-202.html">Подробнее...</a></p>
Как мне избавиться от выскакивающего окна CPU при ошибках?
2012-09-18T17:08:41+07:00
2012-09-18T17:08:41+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/kak-mne-izbavitsya-ot-vyskakivayushchego-okna-cpu-pri-oshibkakh.html
Super User
toto44@inbox.ru
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">HKEY_CURRENT_USER\Software\Borland\Delphi\4.0\Debugging </span></p>
<p><span style="font-family: 'Times New Roman'; font-size: 9pt;"> </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">ViewCPUOnException=0</span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">HKEY_CURRENT_USER\Software\Borland\Delphi\4.0\Debugging </span></p>
<p><span style="font-family: 'Times New Roman'; font-size: 9pt;"> </span></p>
<p><span style="font-family: 'Courier New'; color: #000000; font-size: 9pt;">ViewCPUOnException=0</span></p>
Как отловить ошибку?
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/kak-otlovit-oshibku.html
Super User
toto44@inbox.ru
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код в котором может произойти ошибка}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Except</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код который выполнится если ошибка произойдёт, если ошибки не будет то этот код не выполняется}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000;">Вот как будет выполняться код:</span></p>
<p><span style="font-family: 'Times New Roman'; color: #000000;"> </span></p>
<p> </p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/kak-otlovit-oshibku.html">Подробнее...</a></p>
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код в котором может произойти ошибка}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Except</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код который выполнится если ошибка произойдёт, если ошибки не будет то этот код не выполняется}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000;">Вот как будет выполняться код:</span></p>
<p><span style="font-family: 'Times New Roman'; color: #000000;"> </span></p>
<p> </p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/kak-otlovit-oshibku.html">Подробнее...</a></p>
Как перехватить сообщение об ошибке?
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/kak-perekhvatit-soobshchenie-ob-oshibke.html
Super User
toto44@inbox.ru
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007): https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код в котором может произойти ошибка}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Except</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">on e:Exception </span><span class="f_CodeExample" style="color: #008000; font-weight: bold;">do</span><span class="f_CodeExample" style="color: #000000;"> Shwomessage(e.</span><span class="f_CodeExample" style="color: #008000; font-weight: bold;">message</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007): https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код в котором может произойти ошибка}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Except</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">on e:Exception </span><span class="f_CodeExample" style="color: #008000; font-weight: bold;">do</span><span class="f_CodeExample" style="color: #000000;"> Shwomessage(e.</span><span class="f_CodeExample" style="color: #008000; font-weight: bold;">message</span><span class="f_CodeExample" style="color: #000000;">);</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
Как предотвратить утечки памяти при возникновении ошибок?
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/kak-predotvratit-utechki-pamyati-pri-vozniknovenii-oshibok.html
Super User
toto44@inbox.ru
<p> <span style="font-family: 'Times New Roman'; color: #000000;">Используйте конструкцию</span></p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007):https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код в котором может произойти ошибка}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Finally</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код который выполнится в любом случае - хоть произойдёт ошибка, хоть нет}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000;">Например, это часто применяется во избежание утечек при динамическом распределении памяти:</span></p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007): https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">t:TStringList;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">...</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">t:=TStringList.create; </span><span class="f_CodeExample" style="color: #000080;">//распределили память под объект t</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь работаем с переменной t}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Finally</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">t.free;</span><span class="f_CodeExample" style="color: #000080;">//память выделенная под объект t всегда будет освобождена </span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> <span style="font-family: 'Times New Roman'; color: #000000;">Используйте конструкцию</span></p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007):https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код в котором может произойти ошибка}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Finally</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь вы пишите код который выполнится в любом случае - хоть произойдёт ошибка, хоть нет}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000;">Например, это часто применяется во избежание утечек при динамическом распределении памяти:</span></p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007): https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">t:TStringList;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">...</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">t:=TStringList.create; </span><span class="f_CodeExample" style="color: #000080;">//распределили память под объект t</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Try</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{здесь работаем с переменной t}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">Finally</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">t.free;</span><span class="f_CodeExample" style="color: #000080;">//память выделенная под объект t всегда будет освобождена </span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">End</span></p>
</td>
</tr>
</tbody>
</table>
</div>
Как сгенерировать свою ошибку?
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/kak-sgenerirovat-svoyu-oshibku.html
Super User
toto44@inbox.ru
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007): https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">raise</span><span class="f_CodeExample" style="color: #000000;"> Exception.Create(</span><span class="f_CodeExample" style="color: #ff0000;">'Это моя ошибка! Сам что хочу то и пишу здесь!'</span><span class="f_CodeExample" style="color: #000000;">)</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Примечание: </span><span style="font-family: 'Times New Roman'; color: #000000;">в отличие от других объектов, объекты типа Exception или других классов, унаследованных от Exception не требуют вызова деструкторов или любых других действий по освобождению памяти после их создания.</span></p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000080;">{©Drkb v.3(2007): https://delphi-hlp.ru</span><span class="f_CodeExample" style="color: #000080;">}</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">raise</span><span class="f_CodeExample" style="color: #000000;"> Exception.Create(</span><span class="f_CodeExample" style="color: #ff0000;">'Это моя ошибка! Сам что хочу то и пишу здесь!'</span><span class="f_CodeExample" style="color: #000000;">)</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Примечание: </span><span style="font-family: 'Times New Roman'; color: #000000;">в отличие от других объектов, объекты типа Exception или других классов, унаследованных от Exception не требуют вызова деструкторов или любых других действий по освобождению памяти после их создания.</span></p>
Почему возникает ошибка Access Violation?
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/pochemu-voznikaet-oshibka-access-violation.html
Super User
toto44@inbox.ru
<p> <span style="font-family: 'Times New Roman'; color: #000000;">Ошибка "Access Violation" возникает, когда идёт обращение к памяти к которой обращение запрещено. Это возможно во многих случаях, но наиболее типичные ситуации я попытаюсь перечислить:</span></p>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">1) Обращение к не созданному объекту.</span></p>
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">var</span><span class="f_CodeExample" style="color: #000000;"> e:TEdit;</span></p>
<p> </p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">begin</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">e.text:=</span><span class="f_CodeExample" style="color: #ff0000;">'Hello world!'</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">end</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000;">В данном случае объект e ещё не создан и идёт обращение к памяти, которая ещё не выделена. </span></p>
<p> </p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/pochemu-voznikaet-oshibka-access-violation.html">Подробнее...</a></p>
<p> <span style="font-family: 'Times New Roman'; color: #000000;">Ошибка "Access Violation" возникает, когда идёт обращение к памяти к которой обращение запрещено. Это возможно во многих случаях, но наиболее типичные ситуации я попытаюсь перечислить:</span></p>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">1) Обращение к не созданному объекту.</span></p>
<p> </p>
<div style="text-align: justify; text-indent: 0px; margin: 7px 0px; padding: 0px;">
<table style="border-bottom: #c0c0c0 1px solid; border-left: #000000 1px solid; background-color: #ffffc4; border-spacing: 0px; border-top: #000000 1px solid; border-right: #c0c0c0 1px solid;" border="1" cellspacing="0" cellpadding="5" bgcolor="#ffffc4">
<tbody>
<tr align="left" valign="top">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p style="text-align: justify;"><span style="font-family: 'Times New Roman'; color: #000000; font-weight: bold;">Code:</span></p>
</td>
</tr>
<tr align="left">
<td style="border-bottom: #000000 1px solid; border-left: #c0c0c0 1px solid; border-top: #c0c0c0 1px solid; border-right: #000000 1px solid;">
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">var</span><span class="f_CodeExample" style="color: #000000;"> e:TEdit;</span></p>
<p> </p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">begin</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #000000;">e.text:=</span><span class="f_CodeExample" style="color: #ff0000;">'Hello world!'</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
<p class="p_CodeExample"><span class="f_CodeExample" style="color: #008000; font-weight: bold;">end</span><span class="f_CodeExample" style="color: #000000;">;</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p><span style="font-family: 'Times New Roman'; color: #000000;">В данном случае объект e ещё не создан и идёт обращение к памяти, которая ещё не выделена. </span></p>
<p> </p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/pochemu-voznikaet-oshibka-access-violation.html">Подробнее...</a></p>
Список префиксов Internal Error
2013-03-22T17:06:24+07:00
2013-03-22T17:06:24+07:00
https://delphi-hlp.ru/index.php/delphi-ide/oshibki-v-delfi/spisok-prefiksov-internal-error.html
Super User
toto44@inbox.ru
<p>Иногда выскакивают ошибки типа "Internal Error SY424", вот расшифровка префиксов:<br /><br /> <br /><br />B : debugger<br /><br />BC : debugger<br /><br />BR : browser<br /><br />C : codegen<br /><br />CM : command line version of the compiler<br /><br />D : parser</p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/spisok-prefiksov-internal-error.html">Подробнее...</a></p>
<p>Иногда выскакивают ошибки типа "Internal Error SY424", вот расшифровка префиксов:<br /><br /> <br /><br />B : debugger<br /><br />BC : debugger<br /><br />BR : browser<br /><br />C : codegen<br /><br />CM : command line version of the compiler<br /><br />D : parser</p>
<p class="feed-readmore"><a target="_blank" href ="/index.php/delphi-ide/oshibki-v-delfi/spisok-prefiksov-internal-error.html">Подробнее...</a></p>