<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AutoCAD suddenly closes without any message or error while jigging in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13225471#M1405</link>
    <description>&lt;P&gt;from a bit of search, I feel that the error has some thing to do with heap corruption and I also think my code is attempting to free a memory which has been already freed based on this message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FAILURE_BUCKET_ID:  HEAP_CORRUPTION_ACTIONABLE_BlockNotBusy_DOUBLE_FREE_c0000374_ntdll.dll!RtlpFreeHeapInternal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however Im not manipulating memory by myself.&lt;/P&gt;&lt;P&gt;Im jigging a region which constantly changes, and Im hatching that region every time mouse moves in the sampler.&lt;/P&gt;&lt;P&gt;I have not manually disposed anything.&lt;/P&gt;&lt;P&gt;this is another part of the log from the dump file. its too heavy 98 MB so I cant upload the file here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FILE_IN_CAB:  acad.exe.42968.dmp

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

CONTEXT:  (.ecxr)
rax=0000ffff00001f80 rbx=000000f7363fedb0 rcx=0000000000000000
rdx=0000000000000000 rsi=000000f7363fe8c0 rdi=000000f7363fe8c0
rip=00007ffaa4b6c399 rsp=000000f7363fefd0 rbp=000002aeee0cdf70
 r8=0000000000000000  r9=0000000000000000 r10=0000000000001f30
r11=0000000000000000 r12=0000000000000000 r13=000000f7363ff6c0
r14=000002aec717c700 r15=0000000000000000
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000204
ntdll!RtlReportFatalFailure+0x9:
00007ffa`a4b6c399 eb00            jmp     ntdll!RtlReportFatalFailure+0xb (00007ffa`a4b6c39b)
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ffaa4b6c399 (ntdll!RtlReportFatalFailure+0x0000000000000009)
   ExceptionCode: c0000374
  ExceptionFlags: 00000081
NumberParameters: 1
   Parameter[0]: 00007ffaa4bd7780

PROCESS_NAME:  acad.exe

ERROR_CODE: (NTSTATUS) 0xc0000374 - A heap has been corrupted.

EXCEPTION_CODE_STR:  c0000374

EXCEPTION_PARAMETER1:  00007ffaa4bd7780

ADDITIONAL_DEBUG_TEXT:  Followup set based on attribute [Heap_Error_Type] from Frame:[0] on thread:[PSEUDO_THREAD] ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

FAULTING_THREAD:  ffffffff

STACK_TEXT:  
00000000`00000000 00000000`00000000 ntdll!RtlpFreeHeapInternal+0x0


STACK_COMMAND:  !heap ; ** Pseudo Context ** ManagedPseudo ** Value: ffffffff ** ; kb

SYMBOL_NAME:  ntdll!RtlpFreeHeapInternal+0

MODULE_NAME: ntdll

IMAGE_NAME:  ntdll.dll

FAILURE_BUCKET_ID:  HEAP_CORRUPTION_ACTIONABLE_BlockNotBusy_DOUBLE_FREE_c0000374_ntdll.dll!RtlpFreeHeapInternal

OS_VERSION:  10.0.22000.1

BUILDLAB_STR:  co_release

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  10.0.22000.2538

FAILURE_ID_HASH:  {f9e860eb-b03f-7415-804c-7e671e26c730}

Followup:     MachineOwner
---------&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;the problem is, I cant even detect when exactly this happens. some times it does happen, some times it doesn't.&lt;/P&gt;&lt;P&gt;any help is REALLY appreciated.&lt;/P&gt;</description>
    <pubDate>Sun, 22 Dec 2024 14:58:31 GMT</pubDate>
    <dc:creator>a.kouchakzadeh</dc:creator>
    <dc:date>2024-12-22T14:58:31Z</dc:date>
    <item>
      <title>AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13225028#M1403</link>
      <description>&lt;P&gt;Hello to every one. happy new year in advance.&lt;/P&gt;&lt;P&gt;I have an issue with jigging a couple of entities. my class inherits from DrawJig.&lt;/P&gt;&lt;P&gt;in this class I have some heavy calculation per mouse movement. some times, not always, AutoCAD suddenly closes without any prior notice, message or error.&lt;/P&gt;&lt;P&gt;it doesn't crash and show the error message. it just suddenly closes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two methods called in my sampler, one gets PromptPointOptions and the other manipulates some objects after I have the new jigRes point:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public Point3d UpdatePosition(Point3d position)
{
    if(Dim1 is null)
    {
        _movingPoint = position;
        return _movingPoint;
    }
    else
    {
        var reflectedOnBaseLine = _wallsAndSoffit.BaseLine.line.GetClosestPointTo(position, true);
        Dim1.XLine2Point = reflectedOnBaseLine;
        Dim1.DimLinePoint = Dim1.XLine1Point.Add(_dimLinePointVector);
        _movingPoint = position;
        return reflectedOnBaseLine;
    }
}
public JigPromptPointOptions GetJigPromptPointOptions()
{
    var output = new JigPromptPointOptions();
    if (_guideLine1 is null)
    {
        output.UseBasePoint = false;
        var message = "\nInsert Sprinkler or[use Dimension / New wall or soffit]:";
        var keyword = "D N";
        output.SetMessageAndKeywords(message, keyword);
        return output;
    }
    else
    {
        output.Message = "\nInsert Sprinkler or enter distance:";
        output.UseBasePoint = true;
        output.BasePoint = _guideLine1.GetClosestPointTo(_movingPoint,true);
    }
            
    return output;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the sampler itself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;protected override SamplerStatus Sampler(JigPrompts prompts)
{
    if (_showMoreInfo)
    {
        var infoForm = new InformationForm("More Info",
                                _meshInfo.dict,
                                Design_Assistant.Properties.Resources.Base_Pendent_Rquired_Icon);
        infoForm.ShowDialog();
        _showMoreInfo = false;
    }
    var jigResult = prompts.AcquirePoint(_jigOptions.GetJigPromptPointOptions());

    switch (jigResult.Status)
    {
        case PromptStatus.OK:
            Sprinkler.Position = _jigOptions.UpdatePosition(jigResult.Value);
            GetMeshInfo();
            return SamplerStatus.OK;
        default:
            return SamplerStatus.Cancel;
    }
    throw new NotImplementedException("Should never reach this point while jig");
}&lt;/LI-CODE&gt;&lt;P&gt;has any one faced this issue before?&lt;/P&gt;&lt;P&gt;do I have to manually dispose some thing ?&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2024 08:17:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13225028#M1403</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2024-12-22T08:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13225407#M1404</link>
      <description>&lt;P&gt;I found where the dump files are. but is there any one who can explain if this dump files can give me any lead of why or how autocad crashed?&lt;/P&gt;&lt;P&gt;does this crash have any thing to do with ntdll? what does that ntdll do anyway?&lt;/P&gt;&lt;P&gt;I opened the dump with windbg and this is what I got&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;The user dump currently examined is a minidump. Consequently, only a subset
of sos.dll functionality will be available. If needed, attaching to the live
process or debugging a full dump will allow access to sos.dll's full feature
set.
To create a full user dump use the command: .dump /ma &amp;lt;filename&amp;gt;
----------------------------------------------------------------------------
ntdll!RtlIsZeroMemory+0x119:
00007ffa`a4b6c399 eb00            jmp     ntdll!RtlIsZeroMemory+0x11b (00007ffa`a4b6c39b)
0:007&amp;gt; .ecxr
rax=0000ffff00001f80 rbx=000000f7363fedb0 rcx=0000000000000000
rdx=0000000000000000 rsi=000000f7363fe8c0 rdi=000000f7363fe8c0
rip=00007ffaa4b6c399 rsp=000000f7363fefd0 rbp=000002aeee0cdf70
 r8=0000000000000000  r9=0000000000000000 r10=0000000000001f30
r11=0000000000000000 r12=0000000000000000 r13=000000f7363ff6c0
r14=000002aec717c700 r15=0000000000000000
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000204
ntdll!RtlIsZeroMemory+0x119:
00007ffa`a4b6c399 eb00            jmp     ntdll!RtlIsZeroMemory+0x11b (00007ffa`a4b6c39b)
0:007&amp;gt; !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 22 Dec 2024 13:20:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13225407#M1404</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2024-12-22T13:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13225471#M1405</link>
      <description>&lt;P&gt;from a bit of search, I feel that the error has some thing to do with heap corruption and I also think my code is attempting to free a memory which has been already freed based on this message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FAILURE_BUCKET_ID:  HEAP_CORRUPTION_ACTIONABLE_BlockNotBusy_DOUBLE_FREE_c0000374_ntdll.dll!RtlpFreeHeapInternal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however Im not manipulating memory by myself.&lt;/P&gt;&lt;P&gt;Im jigging a region which constantly changes, and Im hatching that region every time mouse moves in the sampler.&lt;/P&gt;&lt;P&gt;I have not manually disposed anything.&lt;/P&gt;&lt;P&gt;this is another part of the log from the dump file. its too heavy 98 MB so I cant upload the file here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FILE_IN_CAB:  acad.exe.42968.dmp

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

CONTEXT:  (.ecxr)
rax=0000ffff00001f80 rbx=000000f7363fedb0 rcx=0000000000000000
rdx=0000000000000000 rsi=000000f7363fe8c0 rdi=000000f7363fe8c0
rip=00007ffaa4b6c399 rsp=000000f7363fefd0 rbp=000002aeee0cdf70
 r8=0000000000000000  r9=0000000000000000 r10=0000000000001f30
r11=0000000000000000 r12=0000000000000000 r13=000000f7363ff6c0
r14=000002aec717c700 r15=0000000000000000
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000204
ntdll!RtlReportFatalFailure+0x9:
00007ffa`a4b6c399 eb00            jmp     ntdll!RtlReportFatalFailure+0xb (00007ffa`a4b6c39b)
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ffaa4b6c399 (ntdll!RtlReportFatalFailure+0x0000000000000009)
   ExceptionCode: c0000374
  ExceptionFlags: 00000081
NumberParameters: 1
   Parameter[0]: 00007ffaa4bd7780

PROCESS_NAME:  acad.exe

ERROR_CODE: (NTSTATUS) 0xc0000374 - A heap has been corrupted.

EXCEPTION_CODE_STR:  c0000374

EXCEPTION_PARAMETER1:  00007ffaa4bd7780

ADDITIONAL_DEBUG_TEXT:  Followup set based on attribute [Heap_Error_Type] from Frame:[0] on thread:[PSEUDO_THREAD] ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

FAULTING_THREAD:  ffffffff

STACK_TEXT:  
00000000`00000000 00000000`00000000 ntdll!RtlpFreeHeapInternal+0x0


STACK_COMMAND:  !heap ; ** Pseudo Context ** ManagedPseudo ** Value: ffffffff ** ; kb

SYMBOL_NAME:  ntdll!RtlpFreeHeapInternal+0

MODULE_NAME: ntdll

IMAGE_NAME:  ntdll.dll

FAILURE_BUCKET_ID:  HEAP_CORRUPTION_ACTIONABLE_BlockNotBusy_DOUBLE_FREE_c0000374_ntdll.dll!RtlpFreeHeapInternal

OS_VERSION:  10.0.22000.1

BUILDLAB_STR:  co_release

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  10.0.22000.2538

FAILURE_ID_HASH:  {f9e860eb-b03f-7415-804c-7e671e26c730}

Followup:     MachineOwner
---------&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;the problem is, I cant even detect when exactly this happens. some times it does happen, some times it doesn't.&lt;/P&gt;&lt;P&gt;any help is REALLY appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2024 14:58:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13225471#M1405</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2024-12-22T14:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13227001#M1406</link>
      <description>&lt;P&gt;I think RtlIsZeroMemory is a null pointer check&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would remove the throw in Sampler, maybe use a print, alert or assert&lt;/P&gt;&lt;P&gt;I would also put a try catch in Sampler, we cant see if GetMeshInfo throws&lt;/P&gt;&lt;P&gt;InformationForm should be inside a using statement since it’s disposable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 12:21:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13227001#M1406</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-12-23T12:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13228095#M1407</link>
      <description>&lt;P&gt;No lock sir.&lt;BR /&gt;I used a try catch block in the sampler, but AutoCAD randomly crashes without going into the catch block.&lt;/P&gt;&lt;P&gt;I found this &lt;A href="https://adndevblog.typepad.com/autocad/2012/07/forcing-the-gc-to-run-on-the-main-thread.html" target="_blank" rel="noopener"&gt;post&lt;/A&gt; from Fenton. it seemed to be my case. but forcing GC to run on main thread didn't help.&lt;/P&gt;&lt;P&gt;the problem is I can't even find out what triggers the issue. its seems very random.&amp;nbsp;&lt;BR /&gt;EDIT: I found &lt;A href="https://www.theswamp.org/index.php?topic=42399.0" target="_blank" rel="noopener"&gt;this link created by Tony.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I think that might lead me some where&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 06:38:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13228095#M1407</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2024-12-24T06:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13228301#M1408</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10854705"&gt;@a.kouchakzadeh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That post at theSwamp is more than 12 years old.&lt;/P&gt;&lt;P&gt;If it had been made here ( in this forum) it would have been deleted with this months "clean-up"&lt;/P&gt;&lt;P&gt;Just be thankful.&lt;BR /&gt;As a sort-of side issue, the matters discussed in that thread have still not been documented to our satisfaction, despite our earnest requests over the years.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Stay well,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 09:51:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13228301#M1408</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2024-12-24T09:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229219#M1409</link>
      <description>&lt;P&gt;so, what that means is, where ever I use a dbobject, I either have to add to database or keep it in a using statement ? if so, its really surprising this is not documented anywhere.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2024 07:39:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229219#M1409</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2024-12-25T07:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229315#M1410</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10854705"&gt;@a.kouchakzadeh&lt;/a&gt;&amp;nbsp; a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;so, what that means is, where ever I use a dbobject, I either have to add to database or keep it in a using statement ? if so, its really surprising this is not documented anywhere.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is documented &lt;A href="https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369" target="_blank" rel="noopener"&gt;here&lt;/A&gt;, but it is still confusing. The "need to dispose" conditions should have been:&lt;/P&gt;
&lt;UL id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__UL_AA26BD5539EA44ED9646023A1774D0B2" class="ul"&gt;
&lt;LI id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__LI_BBDAB9219517460AB436EFCD302497FA" class="li"&gt;Always with a &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-F6E54692-4FD8-4C42-9696-E3E4754A6CEB" class="ph codeph"&gt;Transaction&lt;/SAMP&gt; or &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-8E8FB18E-2D1F-4484-B3FD-0EE3CF92BEBB" class="ph codeph"&gt;DocumentLock&lt;/SAMP&gt; object&lt;/LI&gt;
&lt;LI class="li"&gt;Always with newly created database objects, objects derived from &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-5C6855D4-0602-4660-8EE6-CC6F593DA74A" class="ph codeph"&gt;DBObject&lt;/SAMP&gt;, that are not &lt;FONT color="#339966"&gt;(or could not be)&lt;/FONT&gt; added to the database&lt;/LI&gt;
&lt;LI id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__LI_BE771BEE08C64649822883CC9CDEC4EB" class="li"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRIKE&gt;Always with newly created database objects, objects derived from &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-281AB195-47D4-44B6-8884-DFC5665FA68D" class="ph codeph"&gt;DBObject&lt;/SAMP&gt;, that are being added to a transaction&lt;/STRIKE&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#339966"&gt;Do not have to with newly created database objects, objects derived from &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-281AB195-47D4-44B6-8884-DFC5665FA68D" class="ph codeph"&gt;DBObject&lt;/SAMP&gt;, that are being added to a transaction with the &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-ECB7D583-C715-4C00-AEEE-AF3A89F145D6" class="ph codeph"&gt;AddNewlyCreatedDBObject&lt;/SAMP&gt; method&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__LI_A3D83C375A3F40EFA32A5955E07BD894" class="li"&gt;Do not have to with existing database objects, objects derived from &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-272C1008-EBA5-4BCF-915D-CEB548F278A3" class="ph codeph"&gt;DBObject&lt;/SAMP&gt;, opened with a transaction object and the &lt;SAMP id="GUID-9DFB5767-F8D6-4A88-87D6-9676C0189369__GUID-ECB7D583-C715-4C00-AEEE-AF3A89F145D6" class="ph codeph"&gt;GetObject&lt;/SAMP&gt; method&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 25 Dec 2024 08:03:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229315#M1410</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2024-12-25T08:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229327#M1411</link>
      <description>&lt;P&gt;Ouch, memory management in C++ is way easier &lt;span class="lia-unicode-emoji" title=":grimacing_face:"&gt;😬&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2024 08:03:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229327#M1411</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-12-25T08:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229351#M1412</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8575899"&gt;@daniel_cadext&lt;/a&gt;&amp;nbsp; a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;Ouch, memory management in C++ is way easier &lt;span class="lia-unicode-emoji" title=":grimacing_face:"&gt;😬&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's quite simple.&lt;/P&gt;
&lt;P&gt;Any opened or newly created object deriving from DBObject have to be disposed.&lt;/P&gt;
&lt;P&gt;Transactions can help to make this more simple: an object opened with Transaction.GetObject or a newly created object added to the transaction with Transaction.AddNewlyCreatedDBObject will be automatically disposed when the transaction is disposed,&lt;/P&gt;
&lt;P&gt;That said, we have to take care of explicitly disposing of newly created DBObjects that are not, or potentially may not be, added to the database.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2024 08:40:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13229351#M1412</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2024-12-25T08:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13233670#M1413</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;or a newly created object added to the transaction with Transaction.AddNewlyCreatedDBObject will be automatically disposed when the transaction is disposed"&lt;BR /&gt;does this apply for DBObjects which are not meant to be added to database?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 12:46:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13233670#M1413</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2024-12-29T12:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13233910#M1414</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10854705"&gt;@a.kouchakzadeh&lt;/a&gt;&amp;nbsp; a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;"&lt;SPAN&gt;or a newly created object added to the transaction with Transaction.AddNewlyCreatedDBObject will be automatically disposed when the transaction is disposed"&lt;BR /&gt;does this apply for DBObjects which are not meant to be added to database?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can only add a DBObject to a transaction with AddNewlyCreatedDBObject if the DBObject is already database resident (see &lt;A href="http://Autodesk_AutoCAD_DatabaseServices_Transaction_AddNewlyCreatedDBObject_DBObject__MarshalAsUnmanagedType_U1__bool" target="_blank" rel="noopener"&gt;the docs&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;For DBObjects which are not meant to be added to database, you have to explicitly dispose them (typically with a using statement).&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 17:05:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13233910#M1414</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2024-12-29T17:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13233961#M1415</link>
      <description>&lt;P&gt;thats exactly my question. how can I dispose some thing when I want to use it out of the scope it was created? ex. I create a region in the sampler, but I need it in the worlddraw method.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 18:32:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13233961#M1415</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2024-12-29T18:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD suddenly closes without any message or error while jigging</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13234143#M1416</link>
      <description>&lt;P&gt;You can make it a member of your class, and dispose it when its no longer needed (or just before you assign a new value to the member variable), or you can use the Disposables class found &lt;A href="https://github.com/ActivistInvestor/AcMgdLib/blob/main/AcMgdLib/Common/Disposables.cs" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Usually, a variable that's declared in a given scope is not available in any outer/enclosing scopes, so if you are declaring the variable as a local in an outer/enclosing scope, just change that so that the variable is a member of your class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once your jigging operation is complete, you just dispose the member variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10854705"&gt;@a.kouchakzadeh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;thats exactly my question. how can I dispose some thing when I want to use it out of the scope it was created? ex. I create a region in the sampler, but I need it in the worlddraw method.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 22:50:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-suddenly-closes-without-any-message-or-error-while/m-p/13234143#M1416</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2024-12-29T22:50:18Z</dc:date>
    </item>
  </channel>
</rss>

