Cocostudio 1.3场景编辑器触发器生成崩溃

各位好!

我在论坛中搜索了如题所示的内容,只看到一条简单的情形,与我的根本不一样。我想深入学习和使用COCOSTUDIO 1.3中提供的触发器功能,但是出现了意想不到的情形。具体描述如下:

1,环境WINDOWS 7+Cocostudio 1.3。
2,我使用场景编辑器新建了一个游戏项目,然后再新建一个场景项目。
3,在assets文件夹下放置了两个.png文件。
4,双击场景编辑器切换到场景编辑器界面,在上面添加了两个精灵组件。
5,点击界面上边触发器图标打开触发器编辑窗口添加了一个触发器。然后“确定”退出后预览场景测试触发器功能,感觉很正常--此时触发器功能OK。
6,我想在VS编码中使用场景编辑器中提供的默认触发器。于是,我再次进行到刚才的触发器编辑窗口(其他没作任何改动),点击“生成”按钮,想生成相应的触发器代码。总是(我进行了各种情形分析,甚至重新安装了COCOSTUDIO 1.3)出现如下图所示错误:

请问是怎么回事?耽误了很多时间,真后悔还不如使用1.2.0.1…

尊敬的googleman2099 用户:
不用着急,咱们来fix这个问题,你重新打开已经编辑好的项目,然后进入触发器点击生成,场景编辑器崩溃?是这个样子吗?

绝对是这样的。根据hanrea的QQ提示,再次从控制面板中卸载1.3(注意依然卸载不干净,例如在c:\\users\\administrator\\my documents还有COCOSTUDIO文件夹,而且下面内容还是很多,我也删除了)。再次使用管理员权限安装,之后,使用管理员权限运行1.3(因为我的机器自动通过administrator进入的,自然不需要这些吧)。同样操作,还是点击‘生成’时DEAD。

(当我添加一个触发器后点‘确定’退出后,使用预览功能触发器运行一切正常的)。为什么点击‘生成’,因为我想生成代码,以便在VS编程中使用。只可怜没有成功…

另外,我分析了文件C:\Users\Administrator\Documents\CocoStudio\logs\CocoStudioSceneEditor.exe_2014-03-24T13.14.24.9282016+08.00.log(日志文件)。
内容如下:

2014-03-24 13:17:54,707 SPEditorScene.App.HandleException(:0) - 程序终止
System.IO.IOException: 请求的操作无法在使用用户映射区域打开的文件上执行。

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream…ctor(String path, FileMode mode)
at Modules.Communal.Trigger.MainView.replaceStringCPP(String filepath, String tempatepath, String src_string, String dst_string, String endText)
at Modules.Communal.Trigger.MainView.CreateTriggerConsAndActsCPP(String localPath, String templatePath, String projectPath)
at Modules.Communal.Trigger.MainView.btnBuild_Click(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at SPEditorScene.App.Main()

根据以前的WINDOWS编程经验,似乎是要操作的文件在另外的地方已经打开了,从而导致冲突所致。请专家帮助解决。

另外值得奇怪的是,我在办公室新买的机器上(WIN7 64位),新安装了1.3,当然这个机器比较[清闲],没有安装其他太多软件。 一切竟然操作正常!!!

你把 在c:\\users\\administrator\\my documents还有COCOSTUDIO文件夹 删除掉,重新安装试试