• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Error in FFTPatcher

Started by Vanya, August 04, 2008, 11:48:15 am

Vanya

August 04, 2008, 11:48:15 am Last Edit: December 31, 1969, 07:00:00 pm by Vanya
This keeps happening when I try to patch the ISO:

QuoteSee the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Root element is missing. (E:\Documents and Settings\Vanya\Local Settings\Application Data\FFTPatcher\FFTPatcher.exe_Url_g45j14lildjwmqmmzhf2rglkbme0vnev\1.0.0.271\user.config) ---> System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at System.Configuration.XmlUtil..ctor(Stream stream, String name, Boolean readToFirstElement, ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
   --- End of inner exception stack trace ---
   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
   at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
   --- End of inner exception stack trace ---
   at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
   at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(InternalConfigEventArgs e)
   at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(String configPath, BaseConfigurationRecord configRecord)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
   at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
   at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
   at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
   at System.Configuration.SettingsBase.get_Item(String propertyName)
   at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
   at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
   at FFTPatcher.Properties.Settings.get_cdToolPath()
   at FFTPatcher.CDTool.GetPathOfCdTool()
   at FFTPatcher.CDTool.PatchISO(String filename, DataReceivedEventHandler dataReceived, EventHandler finished, PatchedByteArrayListGenerator generator)
   at FFTPatcher.CDTool.PatchISOWithFFTPatchAsync(AllAbilities abilities, AllItems items, AllItemAttributes itemAttributes, AllJobs jobs, JobLevels jobLevels, AllSkillSets skillsets, AllMonsterSkills monsters, AllActionMenus actionMenus, AllStatusAttributes statuses, AllInflictStatuses inflictStatuses, AllPoachProbabilities poach, FFTFont font, AllENTDs entds, DataReceivedEventHandler dataReceived, EventHandler finished)
   at FFTPatcher.MainForm.patchPsxIsoMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///E:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
FFTPatcher
    Assembly Version: 1.0.0.271
    Win32 Version: 1.0.0.271
    CodeBase: file:///G:/00%20-%20Tool%20Chest/01%20-%20Hacking%20Tools/FF%20Edit/FFTactics/FFT%20Patcher/FFTPatcher.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

It started happening after a delayed write failure occurred with my F: drive.
  • Modding version: Other/Unknown
¯\(°_0)/¯

Fligglebleh

13-year later bump...

I know there's been no responses so likely no one cares, but I received this same error and lost my entire patch (100+ of hours of work) to an error I didn't think possible.
I still have the patch but I can't load it. Any way to go around this error, attempt to load it, then resave it in an effort to restore all of my hard work?
  • Modding version: WotL
  • Discord username: Fligglebleh

nitwit

September 04, 2021, 02:49:38 am #2 Last Edit: September 20, 2021, 08:41:43 pm by nitwit
Are all the necessary configuration files found in your FFTPatcher folder? Look at the version you're using and redownload it, then compare those files with what you have.

If you've updated FFTPatcher versions (or are using an older version), there may be files that you need that aren't present.

It looks like an error relating to XML, did you customize any of the *.xml file hacks or anything else with that file suffix?

If you did, could you open them in Notepad and count the number of open arrows "<" and close arrows ">"? If they aren't the same, you accidentally deleted or added one. The find or find/replace functionality should list the number of occurances of a search string, if not download notepad2 or notepad++.

Vanya

A response after 13 years is appreciated nonetheless.  :v/:
  • Modding version: Other/Unknown
¯\(°_0)/¯

Fligglebleh

October 07, 2021, 12:32:02 am #4 Last Edit: October 07, 2021, 01:16:50 am by Fligglebleh
Quote from: nitwit on September 04, 2021, 02:49:38 amAre all the necessary configuration files found in your FFTPatcher folder? Look at the version you're using and redownload it, then compare those files with what you have.

If you've updated FFTPatcher versions (or are using an older version), there may be files that you need that aren't present.

It looks like an error relating to XML, did you customize any of the *.xml file hacks or anything else with that file suffix?

If you did, could you open them in Notepad and count the number of open arrows "<" and close arrows ">"? If they aren't the same, you accidentally deleted or added one. The find or find/replace functionality should list the number of occurances of a search string, if not download notepad2 or notepad++.

Wow, I'm so glad someone responded to this! Great to see 13 years doesn't change much.
So I think it's the xml. I found 3 "<" less in the Pride.xml, but there's thousands of lines. Is there an easy way in Notepad++ to locate them?


EDIT:
I got an XML Tools plugin for Notepad++.
I ran a syntax check and all of the .xml files in the XmlPatches folder are fine, no break in syntax code. This makes sense since I didn't touch them lol.

I can't copy/paste, but the first+second line of the error it gives me says:
"An error of type System.Xml.XmlException occurred: System.Xml.XMLException: Data at the root level is invalid. Line 1, position 1."
Should I be looking at different .xml files?
  • Modding version: WotL
  • Discord username: Fligglebleh

nitwit

It's not feasible to manually go through all the open and close brackets/arrows/parenthesis in a file with tens of thousands of them unless you have unlimited free time and an obsessive disorder, but the notepad plugin fixes that.

I think you can copy from the command line with ctrl + shift + c, but maybe that's Linux. You can always maximize the window and screencap it, or try highlighting it with a mouse.

You could try to run FFTPatcher from the command line and redirect the output to stdout with the redirection operator, as per:
https://ffhacktics.com/smf/index.php?topic=12738.0

What version of FFTPatcher are you using? What tools have you used to make edits, both in the FFTPatcher suite and anything else?

Have you tried downloading the latest version of FFTPatcher and using that?

If you need to extract your changes, a *.fftpatch file is literally just a *.zip with the file extension changed. You might be able to rename it to *.zip, extract all the files, make a new dummy patch with the latest version of FFTPatcher, rename the dummy patch to *.zip, and replace the new files with your old ones.

As long as the files you replace are the same size it may not matter. Newer versions may have more files in there.

You should put your FFTPatcher and everything in all of it's folders in a zip file and upload it along with your bug report to here if what I propose doesn't work:
https://ffhacktics.com/smf/index.php?topic=7163.msg230100#new

Be sure to include the version you used, and if it persisted with the newest version.

Glain

FFTP is probably trying to load the patch normally, failing, and falling back to trying to load it as XML, which also doesn't work.  It certainly shouldn't have anything to do with any of the XMLs in the XmlPatches directory.  You would probably need to provide your patch file for us to get a handle on what's wrong with the initial attempt to load it.
  • Modding version: Other/Unknown