Menu

#2 Fix StackOverflowException bug

Unstable_(example)
open
nobody
None
5
2019-08-30
2019-08-30
No

There is a issue when there are many folders and subfolders involved. Its throwing stackoverflow exception. Fix is, change recurance code of SetExtent1 with loop into IsoDirectory.cs. Do the same with SetExtent2 too.

public static void SetExtent1( ArrayList stack, int index, UInt32 currentExtent ) {
            for (; index < stack.Count; index++)
            {
                IsoDirectory currentDir = (IsoDirectory)stack[index];
                currentDir.Extent1 = currentExtent;

                currentExtent = currentExtent + currentDir.Size1 / IsoAlgorithm.SectorSize;
                foreach (IsoFolderElement child in currentDir.Children)
                {
                    if (child.IsDirectory)
                    {
                        stack.Add(child);
                    }
                }
            }
        }

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.