我使用的是Delphi2009。使用重构时 - >每当我尝试将新参数添加到例程时更改参数,当我设置新参数并单击“重构”时出现错误:
alt text http://img518.imageshack.us/img518/6672/delphief.jpg
(注意:imageshack有时会出现问题,因此有时您可能看不到此图像。)
你知道任何解决方法吗?
答案 0 :(得分:0)
天真地看着那个callstack,你有没有检查过编译器选项中与调试符号相关的所有内容是否 ?
答案 1 :(得分:0)
这是错误消息,因为屏幕截图托管网站存在一些问题。
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at Borland.Studio.Delphi.ChangeParamsRefactoring.GetSymbolInformation(String& namespaceName, String& oldParamSig, String& newParamSig, String& symbolKind, String& returnSig, String& containingUnit, String& project, String& outputName, String& personality) at Borland.Studio.Refactoring.BaseChangeParamsRefactoring.GetRefactoringNode() at Borland.Studio.Refactoring.BaseRefactoring.f() at Borland.Studio.Interop.StatusForm.a(Object , EventArgs ) at System.Windows.Forms.Form.OnActivated(EventArgs e) at System.Windows.Forms.Form.set_Active(Boolean value) at System.Windows.Forms.Form.WmActivate(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.3082 (QFE.050727-3000) CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- Borland.Studio.Interop Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.Interop.DLL ---------------------------------------- Borland.Studio.Together Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.Together.DLL ---------------------------------------- Borland.Together.InternalAPI Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.InternalAPI.DLL ---------------------------------------- Borland.Together.Core Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Core.DLL ---------------------------------------- Borland.Build.Tasks.Common Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Build.Tasks.Common.DLL ---------------------------------------- Borland.Build.Tasks.Shared Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Build.Tasks.Shared.DLL ---------------------------------------- System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3082 (QFE.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- Borland.Globalization Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Globalization.DLL ---------------------------------------- System.Configuration Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- vbgadrhp Assembly Version: 12.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- Borland.Build.Tasks.Delphi Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Build.Tasks.Delphi.DLL ---------------------------------------- Borland.Studio.ToolsAPI Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.ToolsAPI.DLL ---------------------------------------- Borland.Studio.Host Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.Host.DLL ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Design Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll ---------------------------------------- Microsoft.Build.Framework Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 built by: netfxsp CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Build.Framework/2.0.0.0__b03f5f7f11d50a3a/Microsoft.Build.Framework.dll ---------------------------------------- Borland.Studio.Refactoring Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.Refactoring.DLL ---------------------------------------- Borland.Together.OpenAPI3 Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.OpenAPI3.DLL ---------------------------------------- Borland.SCI2 Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.SCI2.DLL ---------------------------------------- Borland.Together.VFS Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.VFS.DLL ---------------------------------------- Borland.Together.Actions Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Actions.DLL ---------------------------------------- Borland.SCI.Impl Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.SCI.Impl.DLL ---------------------------------------- Borland.JSCI Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.JSCI.DLL ---------------------------------------- Borland.Together.ModelView Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.ModelView.DLL ---------------------------------------- Borland.Together.ClassBrowser Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.ClassBrowser.DLL ---------------------------------------- Borland.Together.Model3 Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Model3.DLL ---------------------------------------- Borland.Together.DesignModel Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.DesignModel.DLL ---------------------------------------- Borland.Together.Refactoring.Plugins.UI Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Refactoring.Plugins.UI.DLL ---------------------------------------- Borland.Together.Diagram.Core Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Diagram.Core.DLL ---------------------------------------- Borland.Together.Diagram.Basics Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Diagram.Basics.DLL ---------------------------------------- Borland.Together.ModelPerformers Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.ModelPerformers.DLL ---------------------------------------- Borland.Together.CoreResources Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.CoreResources.DLL ---------------------------------------- Borland.Together.Refactoring.Plugins Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Refactoring.Plugins.DLL ---------------------------------------- Borland.Together.Refactoring.API Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Refactoring.API.DLL ---------------------------------------- Borland.Together.Refactoring.Platform Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Refactoring.Platform.DLL ---------------------------------------- vjslib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/vjslib/2.0.0.0__b03f5f7f11d50a3a/vjslib.dll ---------------------------------------- Borland.Together.DrawingSurface Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.DrawingSurface.DLL ---------------------------------------- Borland.Together.DiagramClass Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.DiagramClass.DLL ---------------------------------------- Borland.Together.DiagramExtensions Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.DiagramExtensions.DLL ---------------------------------------- Borland.Together.ModelBasics Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.ModelBasics.DLL ---------------------------------------- Borland.SCI.Impl.Delphi Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.SCI.Impl.Delphi.DLL ---------------------------------------- Borland.Together.LanguageSupport.Delphi Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.LanguageSupport.Delphi.DLL ---------------------------------------- Borland.Together.UMLDiagrams1x Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.UMLDiagrams1x.DLL ---------------------------------------- Borland.SCI.Impl.MSIL Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.SCI.Impl.MSIL.DLL ---------------------------------------- Borland.Together.LanguageSupport.MSIL Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.LanguageSupport.MSIL.DLL ---------------------------------------- Borland.Together.DiagramInteraction Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.DiagramInteraction.DLL ---------------------------------------- Borland.Together.UMLDiagrams20 Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.UMLDiagrams20.DLL ---------------------------------------- Borland.Together.HyperLinks Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.HyperLinks.DLL ---------------------------------------- Borland.Together.Ocl.Model Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Ocl.Model.DLL ---------------------------------------- Borland.Together.Refactoring.Manager Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.Refactoring.Manager.DLL ---------------------------------------- vjscor Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/vjscor/2.0.0.0__b03f5f7f11d50a3a/vjscor.dll ---------------------------------------- Borland.Together.XMLExport Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Together.XMLExport.DLL ---------------------------------------- Borland.Studio.Delphi Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.Delphi.DLL ---------------------------------------- Borland.Studio.Delphi.Gate Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.Delphi.Gate.DLL ---------------------------------------- Borland.Studio.Vcl.Design.Refactoring Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/Program%20Files/CodeGear/RAD%20Studio/6.0/bin/Borland.Studio.Vcl.Design.Refactoring.DLL ---------------------------------------- Borland.Delphi Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Borland.Delphi/12.0.0.0__91d62ebb5b0d1b1b/Borland.Delphi.dll ---------------------------------------- Borland.VclRtl Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Borland.VclRtl/12.0.0.0__91d62ebb5b0d1b1b/Borland.VclRtl.dll ---------------------------------------- DelphiProvider Assembly Version: 12.0.0.0 Win32 Version: 12.0.3420.21218 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/DelphiProvider/12.0.0.0__91d62ebb5b0d1b1b/DelphiProvider.dll ---------------------------------------- Microsoft.Build.Engine Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 built by: netfxsp CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Build.Engine/2.0.0.0__b03f5f7f11d50a3a/Microsoft.Build.Engine.dll ---------------------------------------- Microsoft.Build.Utilities Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 built by: netfxsp CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Build.Utilities/2.0.0.0__b03f5f7f11d50a3a/Microsoft.Build.Utilities.dll ---------------------------------------- Microsoft.Build.Tasks Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 built by: netfxsp CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Build.Tasks/2.0.0.0__b03f5f7f11d50a3a/Microsoft.Build.Tasks.dll ---------------------------------------- System.Data.SqlXml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Data.SqlXml/2.0.0.0__b77a5c561934e089/System.Data.SqlXml.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.
答案 2 :(得分:0)
好的发现了这个案子。
仅当我们执行重构的文件不在DPR文件的USES部分中时才会发生此错误。是Delphi搜索路径中的库文件(或者如何调用此路径)。