nydehi / nocs

Automatically exported from code.google.com/p/nocs
0 stars 0 forks source link

UIThreadException when saving doc for first time #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Not sure how to reproduce. Produced it twice trying to save a doc with the 
same name as an existing doc. Existing doc wasn't appearing in doc browser, 
but was appearing in Google Docs. Am using a Google Apps account (GAFYD). 
Am curious to know how it connected to my Google Apps account when I have a 
normal Google account with the same email address and password. Probably 
unrelated.

9/12/2009 2:32:17 PM - UIThreadException: Object reference not set to an 
instance of an object.

Stack Trace:
   at Nocs.Models.Noc.HasContentChanged()
   at Nocs.Models.Noc.UpdateTxtNocContentNowAndTabTitle(RichTextBox 
txtContent)
   at Nocs.Models.Noc.BgWorkerSaveNoc_Completed(Object sender, 
RunWorkerCompletedEventArgs e)
   at 
System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerComple
tedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object 
arg)
9/12/2009 2:32:17 PM - UIThreadInnerException: Object reference not set to 
an instance of an object.

Stack Trace:
   at Nocs.Models.Noc.HasContentChanged()
   at Nocs.Models.Noc.UpdateTxtNocContentNowAndTabTitle(RichTextBox 
txtContent)
   at Nocs.Models.Noc.BgWorkerSaveNoc_Completed(Object sender, 
RunWorkerCompletedEventArgs e)
   at 
System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerComple
tedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object 
arg)
9/12/2009 2:32:25 PM - UIThreadException: Object reference not set to an 
instance of an object.

Stack Trace:
   at Nocs.Forms.Main.Main_FormClosing(Object sender, FormClosingEventArgs 
e)
   at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
   at System.Windows.Forms.Form.RaiseFormClosingOnAppExit()
   at System.Windows.Forms.Application.ExitInternal()
   at System.Windows.Forms.Application.Exit(CancelEventArgs e)
   at System.Windows.Forms.Application.Exit()
   at Nocs.Program.UIThreadException(Object sender, 
ThreadExceptionEventArgs t)
   at 
System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception 
t)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.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)
9/12/2009 2:32:25 PM - UIThreadInnerException: Object reference not set to 
an instance of an object.

Stack Trace:
   at Nocs.Forms.Main.Main_FormClosing(Object sender, FormClosingEventArgs 
e)
   at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
   at System.Windows.Forms.Form.RaiseFormClosingOnAppExit()
   at System.Windows.Forms.Application.ExitInternal()
   at System.Windows.Forms.Application.Exit(CancelEventArgs e)
   at System.Windows.Forms.Application.Exit()
   at Nocs.Program.UIThreadException(Object sender, 
ThreadExceptionEventArgs t)
   at 
System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception 
t)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.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)

Original issue reported on code.google.com by m...@tan.gl on 9 Dec 2009 at 6:42

GoogleCodeExporter commented 8 years ago

Original comment by mikko.junnila on 9 Dec 2009 at 8:10

GoogleCodeExporter commented 8 years ago
Thanks for finding and posting this bug!

This might be related to gdata-issue:
http://code.google.com/p/gdata-issues/issues/detail?id=1520

I'll add some error handling and probably force users to always create 
documents with
unique names that aren't already created.

Original comment by mikko.junnila on 9 Dec 2009 at 10:58

GoogleCodeExporter commented 8 years ago
Made some changes to try to address this problem also. You can get them by re-
downloading Nocs 2.1, and re-installing it.

The Apps account/Gmail account issue is weird indeed, and some people have been 
having 
sort of similar GData server issues lately. I wonder if it's something to do 
with which 
account you were last signed in.

Original comment by mikko.junnila on 10 Dec 2009 at 9:48

GoogleCodeExporter commented 8 years ago
Quick turnaround, nice work! Regarding Apps acc/Google acc, you can have active 
sessions for *both* services at the same time. Nocs has only ever connected to 
my Apps 
acc but I do use it more than my non-apps Google acc namesake. Perhaps worth 
another 
issue.

Original comment by m...@tan.gl on 18 Dec 2009 at 2:40

GoogleCodeExporter commented 8 years ago
Found out that by default, the GData client libraries set the accountType 
parameter
to HOSTED_OR_GOOGLE. That means Google's ClientLogin will first try to 
authenticate
as a Google Apps hosted account and then as a Google Account. This becomes 
tricky if
user@example.com is both a Google Account and a Google Apps account, like in 
your case.

I'll look into this and add an option for the Login screen to explicitly set the
accountType to avoid this problem.

Original comment by mikko.junnila on 18 Dec 2009 at 3:00