This is a migrated thread and some comments may be shown as answers.

Inconsistent bug when saving text from RAD Editor to DB.

5 Answers 63 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lautaro
Top achievements
Rank 1
Lautaro asked on 22 Nov 2010, 06:28 PM
Im getting an exception randomly only on the deplyed server version of my app. This exception does not come upp when i debug in my local version. I have tried to update and replace the .CS files to make sure they are the same on server as on local machine. 

The app saves text from  a RadEditor to a database. 

I never get this error on the local machine while debugging it in visual studio, so i am lost and dont know what to do?! :(

The problem is when i hit hte save button. Sometimes i get this error:
Object reference not set to an instance of an object.
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
 
Line 347:        articleToBeEdited.Body = editorSweBody.Content;
Line 348:        articleToBeEdited.Title = tbTitle.Text;
Line 349:        articleToBeEdited.TitleFinnish = tbTitleFinnish.Text;
saadasdasasd

5 Answers, 1 is accepted

Sort by
0
Shane
Top achievements
Rank 1
answered on 23 Nov 2010, 03:19 AM
Post your stack trace.. that error isn't very descriptive by itself.
0
Lautaro
Top achievements
Rank 1
answered on 23 Nov 2010, 01:28 PM
Thank you for your time!

Here is a screenshot. I hope that does the trick. Otherwise let me know and i post it as text. 

The problem is that i have problems getting the error now!!! My client that is testing from their office gets it more often.

Thanks again, looking forward to hearing your answer.
0
Lautaro
Top achievements
Rank 1
answered on 23 Nov 2010, 04:13 PM
Maybe this image is better.
0
Lautaro
Top achievements
Rank 1
answered on 24 Nov 2010, 04:24 PM
HERE I HAVE THE EXCEPTION WITH STACK TRACE IN TEXT. Sorry for the delay.

Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
 
Source Error:
 
  
Line 345:
Line 346:
Line 347:        articleToBeEdited.Body = editorSweBody.Content;
Line 348:        articleToBeEdited.Title = tbTitle.Text;
Line 349:        articleToBeEdited.TitleFinnish = tbTitleFinnish.Text;
 
Source File: c:\inetpub\vhosts\flashandasp.net\httpdocs\finin\Admin\Articles\EditArticle.aspx.cs    Line: 347
 
Stack Trace:
 
  
[NullReferenceException: Object reference not set to an instance of an object.]
   _Default.SaveEditedPage() in c:\inetpub\vhosts\flashandasp.net\httpdocs\finin\Admin\Articles\EditArticle.aspx.cs:347
   _Default.lbOk_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\flashandasp.net\httpdocs\finin\Admin\Articles\EditArticle.aspx.cs:334
   System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +79
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
0
Lautaro
Top achievements
Rank 1
answered on 25 Nov 2010, 03:40 PM
I have confirmed that this error has nothing to do with RAD Editor. 

Sometimes the object saved in the cache is null for some reason. I have not figured out why, but i have built a fix around it.
Tags
Editor
Asked by
Lautaro
Top achievements
Rank 1
Answers by
Shane
Top achievements
Rank 1
Lautaro
Top achievements
Rank 1
Share this question
or