Can not Save oml locally

Can not Save oml locally

  

I left my Service Studio open over the weekend with some unpublished changes.  Today I made more changes and then attempted to publish.  It failed in the client, so then I attempted to perform a local save and it failed as well.

Long story short, Service Studio can not find an .omlfrag file in the temp directory.

Any thoughts on how to recover from this?


Service Studio Version: 10.0.707.0 (build 65955: branches/r10_0_SS @ 2017-09-28 14:02:34)

Platform Server Version: 10.0.702.0 Internal Version

Service Studio connected to: something.outsystemscloud.com

ServiceStudio.Presenter.RuntimeImplementation+FullStackException: Exception in thread Main ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\someone\AppData\Local\Temp\OutSystemsTemp\2017-10-26 11-23-52 uKbX6W0cDE6XUu8OYPOcNQ\MKKSUJSIY0uUaODL3pYRzg.omlfrag'.
   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, Boolean checkHost)
   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 Storage.Read[T](Func`2 reader)
   at OutSystems.Oml.Oml.File.#Rr()
   at OutSystems.Oml.Oml.#Qt.#Pt(Stream stream)
   at OutSystems.Oml.Oml.#bf(Stream outputStream, Action`1 produceContent)
   at OutSystems.Oml.Oml.#c(Boolean alsoCompress, String password, Stream outputStream, Action`1 produceContent)
   at OutSystems.Oml.Oml.WriteTo(Stream outputStream, ICollection`1 files)
   at OutSystems.Oml.Oml.WriteTo(Stream outputStream, FileFilter filesToSkip)
   at ServiceStudio.Model.ESpace.Saver.WriteTo(ESpace eSpace, Stream stream, FileFilter fileFilter, IQueryInstanceProvider query, HashSet`1 objsToSave)
   at ServiceStudio.Model.ESpace.WriteTo(Stream stream, HashSet`1 filesInServer, SaveMode saveMode)
   at ServiceStudio.Model.ESpace.SaveToMemoryStream()
   at ServiceStudio.Model.ESpace.Save(String path, Boolean forceRecoverOnNextLoad)
   at ServiceStudio.Presenter.AggregatorPresenter.#Anc.#znc()
   at ServiceStudio.Presenter.RuntimeImplementation.#dP.#Bqc()
   at ServiceStudio.ViewImplementation.WPFViewImplementationProvider.DoSlowOperation[ReturnType](IAggregatorView aggregatorView, Func`1 operation)
   at ServiceStudio.Presenter.RuntimeImplementation.DoSlowOperation[ReturnType](IAggregatorPresenter aggregator, Func`1 operation)
   at ServiceStudio.Presenter.RuntimeImplementation.DoSlowOperation(IAggregatorPresenter aggregator, Action operation)
   at ServiceStudio.Presenter.AggregatorPresenter.SaveESpace(ESpace eSpace, String path, Boolean forceRecoverOnNextLoad, Boolean notify, Byte[]& eSpaceBytes)
   at ServiceStudio.Presenter.Commands.ESpaceCommands.SaveAs.InnerExecute(AggregatorPresenter target)
   at ServiceStudio.Commands.AutoRegistryCommand`3.InnerExecute(TargetType target, IPresenter targetPresenter)
   at ServiceStudio.Commands.AutoRegistryCommand`3.<>c__DisplayClass39_0.<Execute>b__2()
   at ServiceStudio.Commands.Command.ActualCommandExecution(Func`1 command, Boolean keepLocks)
   at ServiceStudio.Commands.Command.InnerSafeExecute(String description, Func`1 command, CommandExecutionContext context)
   at ServiceStudio.Commands.Command.<>c__DisplayClass50_0.<SafeExecute>b__1()
   at ServiceStudio.Runtime.SafeExecute[TResult](ExceptionType exceptionType, Func`2 onError, Func`1 function, PresenterContext presenterContext)
   --- End of inner exception stack trace ---
   at ServiceStudio.Presenter.RuntimeImplementation.FullStackException..ctor(Exception e)
   at ServiceStudio.Presenter.RuntimeImplementation.OnException(Exception exception, ExceptionType exceptionType, PresenterContext presenterContext)
   at ServiceStudio.Runtime.SafeExecute[TResult](ExceptionType exceptionType, Func`2 onError, Func`1 function, PresenterContext presenterContext)
   at ServiceStudio.Commands.Command.SafeExecute(String description, Func`1 command, CommandExecutionContext context)
   at ServiceStudio.Commands.Command.ConcurrencyManager.ExecuteSerialized(PresenterContext presenterContext, Boolean commandIsReadOnly, String description, Func`1 command, Guid commandRepeatId, Boolean skipGlobalStateCheck, Boolean skipViewRefresh, Boolean forAsynchronousPurposes)
   at ServiceStudio.Commands.AutoRegistryCommand`3.Execute(ICommandTarget target, IPresenter targetPresenter)
   at ServiceStudio.Commands.Command.<>c__DisplayClass51_0.<GetDefaultInteractionItem>b__2()
   at ServiceStudio.Presenter.InteractionItem.<>c__DisplayClass17_0.<LogAndAction>b__0()
   at ServiceStudio.ViewImplementation.Framework.ViewImplementationFrameworkExtensions.<>c__DisplayClass28_1.<AddMenuItem>b__1(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.MenuItem.InvokeClickAfterRender(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(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 ServiceStudio.ViewImplementation.WPFViewImplementationProvider.InnerWaitForExit()
   at ServiceStudio.View.ViewImplementationProvider.WaitForExit()
   at ServiceStudio.Program.Main(String[] args)
Has Text Data in Clipboard: True
Has Oml Data in Clipboard: False
System Information:
    InstallerId: 078193E0-F2D1-FB4A-B8E2-27E4D86EE50E
    SSId: FA4D6178-2AAD-5F45-99C1-B59D18B93395
    ActivationCode: 29D.ET6.OXI.CW7.I7A.0BT.MBK.GUT
    LUV: 10.0.0.402
    DotNetVersion: 4.0.30319.42000
    WindowsVersion:  [Microsoft Windows NT 10.0.16299.0]
    RunningInX64Mode: false
    ElevationType: UAC enabled and not elevated
    WindowsTheme: Aero (Aero)
    HardwareAcceleration: Good (2/2)
    DisplayColorDepth: 32bits
    PrimaryScreenWidth: 2560
    PrimaryScreenHeight: 1080
    VirtualScreenWidth: 3610
    VirtualScreenHeight: 2160
    OverRemoteDesktop: No
    IsTabletPC: No
    DPIX: 96
    DPIY: 96
....

Hello,

How did you tried the local save? Only with the Ctrl+S?
Did you tried to save with Export+Save As?

Cheers,
Eduardo Jauch

Eduardo Jauch wrote:

Hello,

How did you tried the local save? Only with the Ctrl+S?
Did you tried to save with Export+Save As?

Cheers,
Eduardo Jauch

Yes, I tried Save, and Save As, different directories, to the cloud, etc.  Same failure.

I then attempted to zip the temp directory, but some of the files were locked.

Upon closing Service Studio, it asked to save, then closed without reporting an error.  However on restart, Service Studio stated the omls where corrupt and then attempted to load them from cache.  Needless to say my changes were not there.  Luckily most changes where in the data models, so they were easy to recreate.

erik berg wrote:

Eduardo Jauch wrote:

Hello,

How did you tried the local save? Only with the Ctrl+S?
Did you tried to save with Export+Save As?

Cheers,
Eduardo Jauch

Yes, I tried Save, and Save As, different directories, to the cloud, etc.  Same failure.

I then attempted to zip the temp directory, but some of the files were locked.

Upon closing Service Studio, it asked to save, then closed without reporting an error.  However on restart, Service Studio stated the omls where corrupt and then attempted to load them from cache.  Needless to say my changes were not there.  Luckily most changes where in the data models, so they were easy to recreate.

Sorry for my cross account post vs reply, there is only on me.  I just realized however nearly a 10k different between personal and professional account rankings.


Hi Erik,

I don't understand what you are saying?

As for the problem you were having, I realize this is a bit late since the problem has been solved a different way, and probably something got corrupted resulting in not being able to save, but in any case, you could try the "Upload" function (first option in the Module menu). It doesn't publish, just upload to your server.

Try running servicestudio via commandprompt

"Servicestudio.exe -recover your.oml"

That said you have a pickle and probably have to start from the server and implement your changes again...

I have received a series can not Save error again today.  I am not sure this is the same error that I previously had or not, but here is today's apparent non save operation and workaround.

Situation:  

  1. Copying Structures external Module to local model as a temporary Entity.
  2. Then create scaffolded forms from the temporary Entity
  3. Refactor the forms to use the Structure and not the temporary Entity.
  4. Delete the temporary Entity
  5. Publish

Error:  Can not save file

Work Around:  

  1. In the non saving module, goto Manage Dependencies.
  2. Find the module where the Structure was copied from.
  3. Add or Remove an reference to in that module.
  4. Click Ok to complete Manage Dependencies.
  5. Attempt to publish again.

Note just refreshing the dependency does do anything since there are no changes on the imported module.  Looks to be some internal naming conflict with the alias and incremental naming of a module or object.

Also note, the not being able to save error came back after my first code change within the same Application Studio session.  Have yet to close the session to see if the issue really goes away or the module is semi corrupt.