{"id":5438,"date":"2015-09-17T23:27:00","date_gmt":"2015-09-18T06:27:00","guid":{"rendered":"https:\/\/kb.terabyteunlimited.com\/kb-articles\/circular-junction-points-cause-out-of-memory-error\/"},"modified":"2026-02-25T17:16:21","modified_gmt":"2026-02-26T01:16:21","slug":"circular-junction-points-cause-out-of-memory-error","status":"publish","type":"lsvr_kba","link":"https:\/\/www.terabyteunlimited.com\/kb\/kb-articles\/circular-junction-points-cause-out-of-memory-error\/","title":{"rendered":"Circular Junction Points Cause Out of Memory Error"},"content":{"rendered":"<p><strong><span style=\"color: #ff5500;\">Problem:<\/span><\/strong><\/p>\r\n<p>Circular junction points can cause out of memory errors in Image for Windows. A circular junction point is a directory junction that points back on itself causing an endless folder path if followed.<\/p>\r\n<p><strong><span style=\"color: #ff5500;\">Solution:<\/span><\/strong><\/p>\r\n<p>Edit the permissions of all problematic circular junction points and deny <span style=\"color: #0000ff;\">List folder \/ read data<\/span> permission for the <span style=\"color: #0000ff;\">Everyone<\/span> group. This will stop the circular reference problem.<\/p>\r\n<p>Before changing the permissions of any junction points, be aware of the following:<\/p>\r\n<ul>\r\n\t<li>Directory junctions created by Windows should already have the correct permissions set. This issue is usually caused by incorrect permissions on third-party or user-created directory junctions.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Making this change will not prevent users from traversing the folder in <em>Explorer<\/em> or from the Command Prompt, but does make it more difficult. Access will be denied when trying to directly access the folder (e.g. double-clicking it in <em>Explorer<\/em>). To access a file or folder you will need to access it prior to the problem junction point (before the circular reference) or type in the path to get past the problem junction point. Note that any paths saved by programs (recently used files, etc.) will still function normally.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Consider if the circular junction point is actually necessary. In some cases it may not be needed or a standard folder shortcut would function just as well. The problem junction point could be removed to resolve the issue.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If you are unsure of the directory junctions that are causing the issue you can create a list to aid in troubleshooting and resolving the problem (see <a href=\"#appendix_a\">Appendix A<\/a>).<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Users comfortable with the Command Prompt may find viewing and setting the junction point's permissions simpler using it instead of the Windows GUI (see <a href=\"#appendix_b\">Appendix B<\/a>).<\/li>\r\n<\/ul>\r\n<p><strong>Instructions:<\/strong><\/p>\r\n<ol>\r\n\t<li>On Windows 7 open <em>Windows Explorer<\/em>. On Windows 8.x\/10\/11 open <em>File Explorer<\/em>.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Browse or expand until you reach the parent folder of the directory junction you need to change. In these instructions, the directory junction being changed is <span style=\"color: #0000ff;\">Circular<\/span> and the parent folder is <span style=\"color: #0000ff;\">Folder C<\/span> (the <span style=\"color: #0000ff;\">Circular<\/span> junction points to <span style=\"color: #0000ff;\">C:&#92;Data&#92;Folder A<\/span>).<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_a.png\" align=\"baseline\" \/> <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Right-click on the folder to change and select <strong>Properties<\/strong> from the pop-up menu. <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Click the <strong>Security<\/strong> tab and then click the <strong>Advanced<\/strong> button.<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_b.png\" align=\"baseline\" \/> <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Click the<strong> Change permissions <\/strong>button in the <span style=\"color: #0000ff;\">Advanced Security Settings<\/span> dialog.<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_c.png\" align=\"baseline\" \/> <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>On the <span style=\"color: #0000ff;\">Permissions<\/span> tab, if there is an existing <span style=\"color: #0000ff;\">Deny<\/span> entry for <span style=\"color: #0000ff;\">Everyone<\/span> (<span style=\"color: #0000ff;\">Type<\/span> column shows <span style=\"color: #0000ff;\">Deny<\/span>, <span style=\"color: #0000ff;\">Principal<\/span> column shows <span style=\"color: #0000ff;\">Everyone<\/span>), select it and then click the <strong>Edit<\/strong> button and proceed to the next step. <br \/>\r\n<br \/>\r\nIf there is not an existing Deny entry for Everyone (or editing it is disabled), click the <strong>Add<\/strong> button to add it.<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_d.png\" align=\"baseline\" \/><br \/>\r\n<br \/>\r\nIf adding <span style=\"color: #0000ff;\">Everyone<\/span> on Windows 8.x\/10\/11 you will need to click the <strong>Select a principal<\/strong> link to open the <em>Select User or Group<\/em> dialog (this isn't necessary on Windows 7 as the dialog opens directly).<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_e.png\" align=\"baseline\" \/><br \/>\r\n<br \/>\r\nIn the <em>Select User or Group<\/em> dialog, type <strong>Everyone<\/strong> in the <em>Enter the object name to select<\/em> box and then click <strong>OK<\/strong> to add it.<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_f.png\" align=\"baseline\" \/><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>In Windows 7, check the <strong>Deny<\/strong> checkbox for the <span style=\"color: #0000ff;\">List folder \/ read data<\/span> permission, then click <strong>OK<\/strong> and proceed to the next step.<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_g.png\" align=\"baseline\" \/> <br \/>\r\n<br \/>\r\nIn Windows 8.x\/10\/11, click the <strong>Show advanced permissions<\/strong> link in the right side of the dialog (link toggles to <strong>Show basic permissions<\/strong> after clicking it). <br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_h1.png\" align=\"baseline\" \/><br \/>\r\n<br \/>\r\nSet the <span style=\"color: #0000ff;\">Type<\/span> box to <strong>Deny <\/strong>(if you are editing an existing Deny entry this will already be set). Check the <strong>List folder \/ read data<\/strong> permission box. If you are adding the entry make sure to uncheck all the other permission boxes. Double-check these settings are correct, then click <strong>OK<\/strong>.<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_h2.png\" align=\"baseline\" \/> <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Click <strong>OK<\/strong> on the <span style=\"color: #0000ff;\">Advanced Security Settings<\/span> dialog. A Windows Security message may be displayed that you are setting a deny permissions entry. Click <strong>Yes<\/strong> to continue (clicking <strong>No<\/strong> will cancel the changes). <br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_i.png\" align=\"baseline\" \/><br \/>\r\n<strong>Note:<\/strong> If you receive one or more access denied error messages the junction point most likely already has deny permissions set and is blocking the changes. You will need to cancel the changes to close the dialog. If, after reviewing the exisitng permission settings, you still need to add the deny for <span style=\"color: #0000ff;\">List folders \/ read data<\/span> you should be able to using the Command Prompt (see <a href=\"#appendix_b\">Appendix B<\/a>).<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>An example of the added deny entry is shown below. If permissions for <span style=\"color: #0000ff;\">Everyone<\/span> already existed you may have two items listed (one for <span style=\"color: #0000ff;\">Allow<\/span> permissions and one for <span style=\"color: #0000ff;\">Deny<\/span> permissions).<br \/>\r\n<img decoding=\"async\" src=\"https:\/\/www.terabyteunlimited.com\/kb\/images\/605\/kb_605_j.png\" align=\"baseline\" \/><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Click <strong>OK<\/strong> as necessary to close out the Security Settings dialog and Properties dialog.<\/li>\r\n<\/ol>\r\n<p>&nbsp;<\/p>\r\n<hr \/>\r\n<p>&nbsp;<\/p>\r\n<p id=\"appendix_a\"><strong><span style=\"color: #ff5500;\">Appendix A \u2014 Obtain List of Junction Points<\/span><\/strong><\/p>\r\n<p>If you are unsure of the directory junctions that are causing the issue you can create a list to aid in troubleshooting and resolving the problem. The easiest method to obtain a list of all the junction points on the desired partition is by running <strong><span style=\"color: #008800; font-family: Courier New, Courier, monospace;\">dir \/al \/s<\/span><\/strong> from an Administrator Command Prompt and redirecting it to a file:<\/p>\r\n<p><span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dir C:&#92;*.* \/al \/s &gt; E:&#92;juncpnts.txt<\/strong><\/span><br \/>\r\n<em>(where C: is the partition from which you need the list of junction points and E: is where you want the file saved)<\/em><\/p>\r\n<p>The first few lines of output for a standard Windows 7 partition are shown below:<\/p>\r\n<p><span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>Volume in drive C has no label.<br \/>\r\n\u00a0Volume Serial Number is 7091-206A<br \/>\r\n<br \/>\r\n\u00a0Directory of C:&#92;<br \/>\r\n<br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Documents and Settings [C:&#92;Users] <br \/>\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00 File(s)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 bytes<br \/>\r\n<br \/>\r\n\u00a0Directory of C:&#92;ProgramData<br \/>\r\n<br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Application Data [C:&#92;ProgramData] <br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Desktop [C:&#92;Users&#92;Public&#92;Desktop] <br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Documents [C:&#92;Users&#92;Public&#92;Documents] <br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Favorites [C:&#92;Users&#92;Public&#92;Favorites] <br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Start Menu [C:&#92;ProgramData&#92;Microsoft&#92;Windows&#92;Start Menu] <br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Templates [C:&#92;ProgramData&#92;Microsoft&#92;Windows&#92;Templates] <br \/>\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00 File(s)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 bytes<br \/>\r\n<br \/>\r\n\u00a0Directory of C:&#92;Users<br \/>\r\n<br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;SYMLINKD&gt;\u00a0\u00a0\u00a0\u00a0 All Users [C:&#92;ProgramData] <br \/>\r\n07\/13\/2009\u00a0 08:53 PM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Default User [C:&#92;Users&#92;Default] <br \/>\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00 File(s)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 bytes<\/strong><\/span><\/p>\r\n<p>Keep in mind that the standard Windows-created directory junctions should already have the correct permissions. Checking third-party and user-created junctions would be a good place to start.<\/p>\r\n<p>Below is output generated when the circular junction point used in this article is found. All entries aren't shown, but notice that the path keeps getting longer and longer until it either generates an error or is stopped (depending on the version of Windows).<\/p>\r\n<p><span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>\u00a0Directory of C:&#92;Data&#92;Folder A&#92;Folder B&#92;Folder C<br \/>\r\n<br \/>\r\n09\/29\/2015\u00a0 09:53 AM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Circular [C:&#92;Data&#92;Folder A] <br \/>\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00 File(s)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 bytes<br \/>\r\n<br \/>\r\n\u00a0Directory of C:&#92;Data&#92;Folder A&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C<br \/>\r\n<br \/>\r\n09\/29\/2015\u00a0 09:53 AM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Circular [C:&#92;Data&#92;Folder A] <br \/>\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00 File(s)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 bytes<br \/>\r\n<br \/>\r\n\u00a0Directory of C:&#92;Data&#92;Folder A&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C&#92;Circular&#92;Folder B&#92;Folder C<br \/>\r\n<br \/>\r\n09\/29\/2015\u00a0 09:53 AM\u00a0\u00a0\u00a0 &lt;JUNCTION&gt;\u00a0\u00a0\u00a0\u00a0 Circular [C:&#92;Data&#92;Folder A] <br \/>\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00 File(s)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 bytes<\/strong><\/span><\/p>\r\n<p>&nbsp;<\/p>\r\n<p id=\"appendix_b\"><strong><span style=\"color: #ff5500;\">Appendix B \u2014 View or Set the Junction Permissions from the Command Prompt<\/span><\/strong><\/p>\r\n<p>To view the junction's permissions:<\/p>\r\n<ul>\r\n\t<li>Open an Administrator Command Prompt.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Run <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>icacls<\/strong><\/span>, specifying the directory junction path. In this example, <span style=\"color: #0000ff;\">Circular<\/span> is a directory junction that points to <span style=\"color: #0000ff;\">C:&#92;Data&#92;Folder A<\/span>.<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>icacls \"C:&#92;Data&#92;Folder A&#92;Folder B&#92;Folder C&#92;Circular\"<\/strong><\/span><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>The output shows the currently set permissions. For example:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>Everyone:(DENY)(<\/strong>S,<strong>RD)<\/strong><br \/>\r\nBUILTIN&#92;Administrators:(I)(OI)(CI)(F)<br \/>\r\nNT AUTHORITY&#92;SYSTEM:(I)(OI)(CI)(F)<br \/>\r\nBUILTIN&#92;Users:(I)(OI)(CI)(RX)<br \/>\r\nNT AUTHORITY&#92;Authenticated Users:(I)(M)<br \/>\r\nNT AUTHORITY&#92;Authenticated Users:(I)(OI)(CI)(IO)(M)<\/span><br \/>\r\n<br \/>\r\nIn this output, the <strong>Deny<\/strong> for the <span style=\"color: #0000ff;\">List folder \/ read data<\/span> permission is set: <strong>Everyone:(DENY)(RD)<\/strong><\/li>\r\n<\/ul>\r\n<p>To deny the <span style=\"color: #0000ff;\">List folder \/ read data<\/span> permission for the junction:<\/p>\r\n<ul>\r\n\t<li>Open an Administrator Command Prompt.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Run <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>icacls<\/strong><\/span>, specifying the directory junction path and permission change. In this example, <span style=\"color: #0000ff;\">Circular<\/span> is a directory junction that points to <span style=\"color: #0000ff;\">C:&#92;Data&#92;Folder A<\/span>. (This command should all be on one line.)<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>icacls \"C:&#92;Data&#92;Folder A&#92;Folder B&#92;Folder C&#92;Circular\" \/deny *S-1-1-0:(RD)<\/strong><\/span><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Program output will indicate if the change was successful or not:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>processed file: Circular<br \/>\r\nSuccessfully processed 1 files; Failed processing 0 files<\/strong><\/span><\/li>\r\n<\/ul>\r\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Problem: Circular junction points can cause out of memory errors in Image for Windows. A circular junction point is a directory junction that points back on itself causing an endless folder path if followed. Solution: Edit the permissions of all problematic circular junction points and deny List folder \/ read data permission for the Everyone [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"lsvr_kba_cat":[1790],"lsvr_kba_tag":[2121],"class_list":["post-5438","lsvr_kba","type-lsvr_kba","status-publish","hentry","lsvr_kba_cat-problem-solving-image-for-windows","lsvr_kba_tag-image-for-windows"],"_links":{"self":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/5438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/comments?post=5438"}],"version-history":[{"count":4,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/5438\/revisions"}],"predecessor-version":[{"id":7309,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/5438\/revisions\/7309"}],"wp:attachment":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/media?parent=5438"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_cat?post=5438"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_tag?post=5438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}