Forums

Editor

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: Editor

Postby Charles » Thu May 03, 2012 1:36 am

I don't see a Naja.Errors.log file. I'm looking in the directory containing all the Naja program files. If there is somewhere else I should look, let me know.

I don't see a file called "untitled" there either, or in my "Documents" directory.

What are your thoughts on why it crashes instead of giving a .NET exception? Although I'm mostly doing web apps right now, I did a ton of .NET GUI for a few years and true crashes were unheard of. Instead, a nice .NET exception with stacktrace would pop-up which then helped with troubleshooting.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Thu May 03, 2012 7:33 am

Well, Access Exceptions typically (at least in my experience) mean some sort of pointer issue -- which either means corrupt files, RAM, or weird permissions on the files.

I'll take a look into it sometime in the next day or so -- I vaguely remember there was something weird in my build of that release, so I could have mangled something in the build process as well.
torial
 
Posts: 229
Location: IA

Re: Editor

Postby torial » Thu May 03, 2012 7:56 am

Charles -- please download the latest version: This is the same source code, but rebuilt. I did test the path you listed w/ this new version and wasn't able to reproduce the Access Violation error (but the Ctrl+S issue I did reproduce -- I'll add that to things to fix, and try to get that resolved when I do my partial AutoCompletion support release this month).
torial
 
Posts: 229
Location: IA

Re: Editor

Postby Charles » Thu May 03, 2012 11:06 am

-- I would recommend bumping the version of rebuilds, like 0.1.2, to avoid confusion. Otherwise when someone says "I'm using 0.1.1" you have to ask which one. Not a big deal now, but you'll have more users in the future. :)

-- When launching Naja, I get a command line window that pops up before the GUI window pops up and then it stays there. I don't recall if that happened before or not. But you may need to compile with something like:

cobra -target:winexe ...

-- I see now that what's happening with Ctrl+S is that it is saving the file somewhere, or at least removing the '*' that indicates it is unsaved.

-- After doing that save, I then chose "Save As" with the mouse and the dialog for that appeared behind the IDE window.

-- The dialog had no place for me to enter a filename. There was no title for the dialog as well. It was like it wanted me to select a directory or something.

-- I closed it and tried again, but when I chose "Save As" once more, the dialog did not come up at all.

-- Regarding your planned releases, you may wish to alternate between fixes and features. Right now Naja needs fixes more than it needs any features. I can't use it in its current state.

Once again, thanks for taking a crack at this.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Thu May 03, 2012 11:17 am

Can you give me a screenshot of the behavior (ie what the Save As dialog looks like, both the behind the app -- espec if you can have the app not maximized, and also that shows it looking like a folder browse dialog)? I'm guessing this is some setting I need to make so Windows 7 will display nicely -- since I'm not seeing the behavior on W2k8 Server...
torial
 
Posts: 229
Location: IA

Re: Editor

Postby Charles » Thu May 03, 2012 3:50 pm

I forgot to mention that this time around there is a .log file. I hadn't noticed it because no dialog had come up stating that there was an exception.

I recommend that if you have an app wide exception catcher, that it show a message box or other modal dialog after the log text is recorded, so the user has an idea. Down the road you can expand that into a bug reporter where the person can write some comments and click "Send".

Here is the log. Wow, a "divide by zero" inside System.Windows.Forms' own SaveFileDialog. Good luck! :D


===5/3/2012 11:00:33 AM===System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DivideByZeroException: Attempted to divide by zero.
at System.Windows.Forms.SaveFileDialog.CreateVistaDialog()
at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr hWndOwner)
at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)
at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
at System.Windows.Forms.CommonDialog.ShowDialog()
at NajaUtils.PromptForSaveAsFileName(String startFileName, String filter)
at NajaUtils.PromptForSaveAsFileName(String startFileName)
at Naja.SaveAsChanges(TextEditorControl editor)
at Naja.MenuSaveAs_Click(Object sender, QMenuEventArgs e)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Qios.DevSuite.Components.QWeakDelegate.Invoke(Object[] args)
at Qios.DevSuite.Components.QWeakDelegate.InvokeDelegate(QWeakDelegate weakDelegate, Object[] args)
at Qios.DevSuite.Components.QMenuItem.OnMenuItemActivated(QMenuEventArgs e)
at Qios.DevSuite.Components.QMenuItemContainer.RaiseMenuItemActivated(QMenuEventArgs e)
at Qios.DevSuite.Components.QMenuItemContainer.ActivateItem(QMenuItem menuItem, Boolean expandWhenPossible, Boolean animate, Boolean showHotkeyPrefix, QMenuItemActivationType activationType)
at Qios.DevSuite.Components.QMenuItemContainer.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Qios.DevSuite.Components.QControl.WndProc(Message& m)
at Qios.DevSuite.Components.QMenu.WndProc(Message& m)
at Qios.DevSuite.Components.QFloatingMenu.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)
===5/3/2012 11:01:39 AM===System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DivideByZeroException: Attempted to divide by zero.
at System.Windows.Forms.SaveFileDialog.CreateVistaDialog()
at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr hWndOwner)
at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)
at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
at System.Windows.Forms.CommonDialog.ShowDialog()
at NajaUtils.PromptForSaveAsFileName(String startFileName, String filter)
at NajaUtils.PromptForSaveAsFileName(String startFileName)
at Naja.SaveAsChanges(TextEditorControl editor)
at Naja.MenuSaveAs_Click(Object sender, QMenuEventArgs e)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Qios.DevSuite.Components.QWeakDelegate.Invoke(Object[] args)
at Qios.DevSuite.Components.QWeakDelegate.InvokeDelegate(QWeakDelegate weakDelegate, Object[] args)
at Qios.DevSuite.Components.QMenuItem.OnMenuItemActivated(QMenuEventArgs e)
at Qios.DevSuite.Components.QMenuItemContainer.RaiseMenuItemActivated(QMenuEventArgs e)
at Qios.DevSuite.Components.QMenuItemContainer.ActivateItem(QMenuItem menuItem, Boolean expandWhenPossible, Boolean animate, Boolean showHotkeyPrefix, QMenuItemActivationType activationType)
at Qios.DevSuite.Components.QMenuItemContainer.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Qios.DevSuite.Components.QControl.WndProc(Message& m)
at Qios.DevSuite.Components.QMenu.WndProc(Message& m)
at Qios.DevSuite.Components.QFloatingMenu.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)
===5/3/2012 11:01:46 AM===System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DivideByZeroException: Attempted to divide by zero.
at System.Windows.Forms.SaveFileDialog.CreateVistaDialog()
at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr hWndOwner)
at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)
at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
at System.Windows.Forms.CommonDialog.ShowDialog()
at NajaUtils.PromptForSaveAsFileName(String startFileName, String filter)
at NajaUtils.PromptForSaveAsFileName(String startFileName)
at Naja.SaveAsChanges(TextEditorControl editor)
at Naja.MenuSaveAs_Click(Object sender, QMenuEventArgs e)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Qios.DevSuite.Components.QWeakDelegate.Invoke(Object[] args)
at Qios.DevSuite.Components.QWeakDelegate.InvokeDelegate(QWeakDelegate weakDelegate, Object[] args)
at Qios.DevSuite.Components.QMenuItem.OnMenuItemActivated(QMenuEventArgs e)
at Qios.DevSuite.Components.QMenuItemContainer.RaiseMenuItemActivated(QMenuEventArgs e)
at Qios.DevSuite.Components.QMenuItemContainer.ActivateItem(QMenuItem menuItem, Boolean expandWhenPossible, Boolean animate, Boolean showHotkeyPrefix, QMenuItemActivationType activationType)
at Qios.DevSuite.Components.QMenuItemContainer.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Qios.DevSuite.Components.QControl.WndProc(Message& m)
at Qios.DevSuite.Components.QMenu.WndProc(Message& m)
at Qios.DevSuite.Components.QFloatingMenu.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)
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby Charles » Thu May 03, 2012 4:04 pm

I can't get a screenshot of the dialog any more because it doesn't come up. But what I could get is now here:

http://cobra-language.com/downloads/misc/Naja-screen-shots-2012-05-03-a/
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Thu May 03, 2012 8:43 pm

Thanks Charles -- this'll be a tough one -- I'm downloading the MS Source for Windows 7 .Net 3.5.1 -- so hopefully I can see what is going on in there.
torial
 
Posts: 229
Location: IA

Re: Editor

Postby torial » Thu May 03, 2012 10:17 pm

Hi Charles, would you please download the file at: http://cobraide.codeplex.com/releases/8 ... oad/375265 and replace the Naja.exe with it (It is called Naja_Charles.exe right now). I couldn't find anything in the .Net source code that indicated the issue (as the calls were just forwards to a COM Dialog window). So I added security permissions request -- in particular
class Naja is partial inherits Form has FileDialogPermissionAttribute(SecurityAction.Assert,save=true,open=true,unrestricted=true)


My thinking is this will force UAC to get involved, and perhaps the Access violation you had earlier was also due to a permissions issue. Please let me know what you find.
torial
 
Posts: 229
Location: IA

Re: Editor

Postby torial » Fri May 04, 2012 8:24 am

Just an FYI - I'm going to rework the entire project so I can identify what is causing these issues better. The downside is most of it will be in C# until I get enough stuff hooked in (in particular: autocomplete for ease of fixing, and the debugger for ease of diagnostics) that I can actually use my own tool for diagnosing itself.
torial
 
Posts: 229
Location: IA

PreviousNext

Return to Discussion

Who is online

Users browsing this forum: No registered users and 18 guests

cron