Disposing of an object
hi,
is there a way to dispose of an object, i'm having some problems with a jdialog, it's created when a jlabel is clicked in a jframe as:
MouseListener labelListener = new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
LSNote1 noteOne = new LSNote1(SpotNoteFrame.this);
noteOne.setVisible(true);
};The code for the class that extends jdialog is:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
class LSNote1 extends JDialog {
public LSNote1(JFrame frame) {
super(frame,"", true);
JLabel label6 = new JLabel(new ImageIcon("tessst.jpg"));
label6.setTransferHandler(new ImageSelection());
MouseListener mouseListener = new MouseAdapter() {
public void mousePressed(MouseEvent e) {
JComponent jc = (JComponent) e.getSource();
TransferHandler th = jc.getTransferHandler();
th.exportAsDrag(jc, e, TransferHandler.COPY);
addWindowListener(new WindowHandler());
label6.addMouseListener(mouseListener);
getContentPane().add(label6);
setSize(150,150);
//setUndecorated(true);
// Handler class for window events
class WindowHandler extends WindowAdapter {
// Handler for window closing event
public void windowClosing(WindowEvent e) {
dispose(); // Release the window resources
}but everytime i click the jlabel to see the LSNote1 i see the same image (.gif) from before, it's not disposing of the object noteOne, i want it so that everytime LSNote1 is closed the object is distroyed so that next time the jlabel is clicked the latest image will be loaded.
Thanks.
Look at the source for ImageIcon.
It makes a call to Toolkit.getDefaultToolkit().getImage(filename);
The documantation for Toolkit.getDefaultToolkit().getImage(filename) reads:
Returns an image which gets pixel data from the specified file,
whose format can be either GIF, JPEG or PNG.
The underlying toolkit attempts to resolve multiple requests with the same filename to the same returned Image.
Since the mechanism required to facilitate this sharing of
Image objects may continue to hold onto images that are no
longer of use for an indefinite period of time, developers
are encouraged to implement their own caching of images by
using the createImage variant wherever available.
I think that says it all.
Similar Messages
-
What is the correct procedures to dispose a JDialog Object for Garbage collection?
Let's say d is a JDialog Object Do I need to do all of the following 2 instructions or just one of them?
1......................d.dispose;
2......................d=null;Could anyone help me?
-
Windows\Temp folder filling fast - how to Dispose the Crystal Objects?
Post Author: pontupo
CA Forum: .NET
So the Windows\Temp folder is fast filling the disk in my
deployment. Each time a report is opened, a number of files are created
here. The problem is, of course, probably that I'm not releasing my
report objects in my code, as the reports can't even be manually
deleted without shutting down IIS. Well, fair enough. What I can't
figure out is where to release my reports objects. I have two pages:
one performs a pre-pass of the report object and generates a dynamic
page to prompt the user for parameters. This page, I believe, has no
problems because the report.Close() command is in line with the code
and is the final statement, but I could be mistaken and this page may also be leaving memory leaks. The second page, however, has the
CrystalReportsViewer object and actually displays the report to the
user after setting up the parameters correctly. On this page, I can't
figure out how/when to call report.Close(). If I do it at the
page.Dispose event, there seems to be no affect. If I do it at the
page.Close event, the report will load fine, but if you try to go to
another page in the report (in the case of multi-page reports) or
refresh the data, the report object has already been unloaded and the
CrystalReportsViewer won't be able to find the report document. If I
wrap my code in one big Try-Catch-Finally (rather than just having a
Try-Catch around the file load itself) as I've seen suggested elsewhere and place a report.Close()
command in the Finally, the Finally is executed before the viewer even
loads the report so I get a file not found error. So where
can I unload the report object? What I want is to persist the report
via Sessions (which I do) so that as the user moves between pages of
the report/refreshes the report will remain loaded, but when the user
closes the page or browses to another page, perhaps, I want to close
the report and free the resources so that the temp files are deleted.
Following are some code samples: Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init sessionString = Request.QueryString("report") report = Server.MapPath("reports/") & Request.QueryString("report") & ".rpt" ConfigureCrystalReport() End SubPrivate Sub ConfigureCrystalReport() If (Session(sessionString) Is Nothing) Then reportDoc = New ReportDocument() 'load the report document If (IsReportValid()) Then reportDoc.Load(report) '****************************** 'bunch of other code, authentication 'parameter handling, etc. here '****************************** Session(sessionString) = reportDoc Else Response.Redirect("error.aspx") End If Else reportDoc = CType(Session(sessionString), ReportDocument) End If CrystalReportsViewer.ReportSource = reportDoc End Sub Private Function IsReportValid() As Boolean Dim reportIsValid As Boolean = False Try If (System.IO.File.Exists(report)) Then 'does the file exist? 'if it does, try to load it to confirm it's a valid crystal report Dim tryReportLoad As New CrystalDecisions.CrystalReports.Engine.ReportDocument() tryReportLoad.Load(report) tryReportLoad.Close() tryReportLoad.Dispose() reportIsValid = True End If Catch ex As Exception reportIsValid = False End Try Return reportIsValid End Function'Currently, I've also tried each of the following:Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload CloseReports(reportDoc) CrystalReportsViewer.Dispose() CrystalReportsViewer = Nothing End Sub Private Sub CloseReports(ByVal report As ReportDocument) Dim sections As Sections = report.ReportDefinition.Sections For Each section As Section In sections Dim reportObjects As ReportObjects = section.ReportObjects For Each reportObject As ReportObject In reportObjects If (reportObject.Kind = ReportObjectKind.SubreportObject) Then Dim subreportObject As SubreportObject = CType(reportObject, SubreportObject) Dim subReportDoc As ReportDocument = subreportObject.OpenSubreport(subreportObject.SubreportName) subReportDoc.Close() End If Next Next report.Close() End Sub'This was the solution suggested on another forum. I've also tried:Protected Sub Page_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed reportDoc.Close() reportDoc.Dispose() CType(Session(sessionString), ReportDocument).Close() Session(sessionString) = Nothing End Sub'I've also tried wrapping everything inside of the If statement in the ConfigureCrystalReport() method in code to this effect:If (IsReportValid()) Then Try reportDoc.Load(report)Catch e As Exception Response.Redirect("error.aspx") Finally reportDoc.Close() End TryAny advice on this is appreciated. Thanks in advance, PontPost Author: sarasew13
CA Forum: .NET
Why are you checking for is valid before closing? As long as the report object isn't null you should be able to close it (whether it's open or not). I ran into this same problem when trying to store the report, so now I just store the dataset. Everything seems to work fine and navigate appropriately so here's more or less how I handle it:
DataSet myDS;ReportDocument myRPT;
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { //pull variables from previous page if available //set variables into view state so they'll persist in post backs } else { //if postback then pull from view state }
createReport(); } catch (Exception err) { //handle error } }
private void createReport() { myDS = new DataSet(); string rpt;
rpt = "RPTS/report.rpt"; try { if (!IsPostBack || Session["data"] == null) { myDS = getData();//make data call here Session["data"] = myDS; } else { myDS = (DataSet)Session["data"]; }
if (myDS.Tables.Count > 0)//make sure the dataset isn't empty { myRPT = new ReportDocument(); myRPT.Load(Server.MapPath(rpt)); myRPT.SetDataSource(myDS.Tables[0]);
if (!IsPostBack) { //code to set parameters for report here }
MyViewer.ReportSource = myRPT; } } catch (Exception error) { //handle error } }
protected void Page_Unload(object Sender, EventArgs e) { try { if (myRPT != null) { myRPT.Close(); } } catch (Exception error) { //handle error } } -
How can I tell if a Graphics object has been disposed
Any ideas?
ThanksMy goal is to find out if a graphics object has been disposed or not...
...but I'll play along. the application offers the user some nice graphics to amuse them, I use the Graphics object. In my endeavours, something isn't getting displayed where I expect it to, and I suspect that somewhere I'm accidentally disposing the graphics object. So, like checking for nulls, I want to debug the application and make sure the graphics context is as I expect.
A bit of a side note, SWT will throw an exception if you try and use a "graphics" type object that has been disposed and has a method called, unsurprisingly enough, isDisposed(). Can you guess what it returns? -
Webpart objects should be disposed ?
Hi,
I am looping through the webparts in a page using webpartmanager as shown below. Should i dispose web part objects.(inside for loop)
foreach (System.Web.UI.WebControls.WebParts.WebPart webPart in wpManager.WebParts)In general, if there is a Dispose method, and you created the object, then you should call Dispose. But before you do, visit this page and search for "WebParts":
https://msdn.microsoft.com/en-us/library/office/ee557362(v=office.14).aspx There they say to Dispose the SPLimitedWebPartManager, but I don't see System.Web.UI.WebControls.WebParts.WebPart listed there.
I would probably call it, especially if there are there any custom web parts.
Mike Smith TechTrainingNotes.blogspot.com
Books:
SharePoint 2007 2010 Customization for the Site Owner,
SharePoint 2010 Security for the Site Owner -
Disposing RefCursor does not close RefCursor?
Hi,
I want to dispose the OracleRefCursor after executing the executedatatable command. To achieve this, i tried to dispose the OracleRefCursor object but it did not close the cursor, i saw the related cursor in v$open_cursor table. So how can i close the opened cursor without closing the connection or committing or rollback? Thanks...
The code that i tried to close cursor is:
OracleParameter m_Cursor = m_Command.Parameters["pCursor"];
m_Cursor.Dispose();
It did not work.Hi,
According to AskTom the fact that you see it in v$open_cursor doesnt mean it's necessarily open.
Are you seeing a problem as far as ORA-1000 that you're trying to troubleshoot for example? Or is this just something you noticed?
Thanks
Greg -
Closing or Disposing the Connection Does Not Release Open Cursors
Hi,
I have an architecture like this:
Web Service ---> Business COM+ Component ---> Data COM+ Component
I found that doing a SetAbort() plus explicitly close and dispose the OracleConnection object in my COM+ component does not necessarily close the open cursor.
The way I tested was I would call the same same service multiple times and do a "select * from v$open_cursor where user_name = 'xxx'", I would see a bunch of open cursors with exactly the same SQL_TEXT. The only way to close those open cursors seems to be killing the aspnet_wp.exe process in the Task Manager.
Someone here suggested it might be .NET's problem but I don't think so since I had the same problem with OraMTS 9i.
Can someone from Oracle help? Thanks.
-LinusNeeraj,
Thank you for your reply. I'd like to let you know that my company submitted a TSR ticket last year (around Oct.?) on this issue and it's still not fixed, yet. This problem prevents us from using COM+ to handle any transactions, which is not acceptable to us. Please try to raise the issue again to your development team if you can, we are depending on the fix. -
Object Data Source and oracle connections.-Help please!!
I have a detailsview with objectdatasource as a Data source.
Every time, i Edit and save a row in the detailsview, upto 10 connections are created to Oracle. And because of this maximum no of connections is reached quickly.
I am closing/disposing the connection object in the update method.
What could be causing this behaviour?
Need help immediatley. Appreciate your time.
-Thanks.That helpes quite a bit. I still can't get the app to retrieve data, but I am getting a more useful message in the log:
[Error in allocating a connection. Cause: Connection could not be allocated because: ORA-01017: invalid username/password; logon denied]
As you suggested, I removed the <default-resource-principal> stuff from sun-web.xml and modified it to match your example. Additionally, I changed the <res-ref-name> in web.xml from "jdbc/jdbc-simple" to "jdbc/oracle-dev".
The Connection Pool "Ping" from the Admin Console is successful with the user and password I have set in the parameters. (it fails if I change them, so I am pretty sure that is set up correctly) Is there another place I should check for user/pass information? Do I need to do anything to the samples/database.properties file?
By the way, this is the 4th quarter 2004 release of app server. Would it be beneficial to move to the Q1 2005 beta?
Many thanks for your help so far... -
Redispaying a window after calling dispose() in MacOS
When I call dispose() on an object that extends JDialog and then later call
pack();
setVisible(true);
on the same object, the window reappears as it should except in MacOS.
When im running the program in MacOS, the redisplayed window isn't quite the same.
Selected checkboxes, the right end of comboboxes, the borders of clicked buttons,
aren't highlighted (either blue or graphite).
Is there any way to get around this?Read the API.
Yes but it also says that calling show or pack after dispose should
re-create the native resources exactly as they were before Oops... talk about tunnel vision. Even without reading that, I should have known that it was possible since I knew that components don't get "realized" until a pack or show is done. -
Problem: Mulitple panels, one Graphics2d object?!?!
Help!
My application contains one main JPanel, called DrawingPanel. DrawingPanel contains many different Graphics2D objects that it periodically repaints and redraws. When a user clicks on one of these objects, the listener pops up a different JPanel (a list of these new Panels is a member variable of DrawingPanel). In this JPanel I want to draw some new Graphics2D objects. The problem is that when I call paint or paintComponent in the new JPanel (i've tried both) the Graphics2D object contains all the objects from DrawingPanel also. How do I get rid of this extra garbage? I've tried using the dispose function after painting the graphics in both places, but this doesn't work...ideas?
(sorry, for the cross post to java swing if anyone noticed...I'm desperate and figured that maybe I put this in the wrong forum originally...thanks)your query is difficult to understand, if ur problem is related to painting to the specific panel try
painting
component.paintComponent()
or if ur panels are a differnet classes then try to override the paint method in each place.
and if u do not want a paint method at all
then create a graphics object with
component.getGraphics() method and dispose ur
graphics object inside finalize() method. -
Sharepoint log files growing huge
Once again a SharePoint question :)
I ran the following script against our SharePoint 2013 farm:
#Specify the location of the CSV file here.
$r = Import-Csv C:\folder\users.csv
foreach($i in $r){
#The following line displays the current user.
Write-Host "The URL is:"$i.Url
#Disables the "Minimal Download Strategy" feature under "Site Features".
#Disable-SPFeature -Identity "MDSFeature" -Url $i.Url -force -confirm:$false
#Enables the "SharePoint Server Publishing" feature under "Site Features".
Enable-SPFeature -Identity "PublishingSite" -Url $i.Url -force -confirm:$false
#Enables the "SharePoint Server Publishing Infrastructure" feature under "Site Collection Features".
Enable-SPFeature -Identity "PublishingWeb" -Url $i.Url -force -confirm:$false
The csv file that is being imported contains about 2000+ rows with users' MySite links where we want to en-/disable several features.
The script does what it is supposed to do, but while running the script and reaching user No. ~15 the log files under "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS" starts to grow huuuuuuge (~5GB).
They are mostly filled with this:
09/17/2014 11:04:27.72 PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable Potentially excessive number of SPRequest objects (18) currently unreleased on thread 6. Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. This object is holding on to a separate native heap.This object will not be automatically disposed. Allocation Id for this object: {D5F7BC80-8C88-4E17-9985-782F9724F2B9} Stack trace of current allocation: at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) at Microsoft.SharePoint.SPWeb.InitializeSPRequest() at Microsoft.SharePoint.SPWeb.EnsureSPRequest() at Microsof... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...t.SharePoint.SPWeb.SetAllowUnsafeUpdates(Boolean allowUnsafeUpdates) at Microsoft.SharePoint.SPPageParserNativeProvider.<>c__DisplayClass1.<UpdateBinaryPropertiesForWebParts>b__0() at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param) at Microsoft.SharePoint.SPPageParserNativeProvider.UpdateBinaryPropertiesForWebParts(Byte[]& userToken, Guid& tranLockerId, Guid siteId, Int32 zone, String webUrl, String documentUrl, Object& registerDirectivesData, Object& connectionInformation, Object& webPartInformation, IntPtr pWebPartUpdater) at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUng... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...host, ISPEnableModuleCallback pModuleContext) at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext) at Microsoft.SharePoint.Library.SPRequest.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext) at Microsoft.SharePoint.SPModule.ActivateFromFeature(SPFeatureDefinition featdef, XmlNode xnModule, SPWeb web) at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionModules(SPFeaturePropertyCollection props, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boole... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...an fForce) at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureCollection.CheckSameScopeDependency(SPFeatureDefinition featdefDependant, SPFeatureDependency featdep, SPFeatureDefinition featdefDep... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...endency, Boolean fActivateHidden, Boolean fUpgrade, Boolean fForce, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureCollection.CheckFeatureDependency(SPFeatureDefinition featdefDependant, SPFeatureDependency featdep, Boolean fActivateHidden, Boolean fUpgrade, Boolean fForce, Boolean fMarkOnly, FailureReason& errType) at Microsoft.SharePoint.SPFeatureCollection.CheckFeatureDependencies(SPFeatureDefinition featdef, Boolean fActivateHidden, Boolean fUpgrade, Boolean fForce, Boolean fThrowError, Boolean fMarkOnly, List`1& missingFeatures) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.S... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...PFeature.ActivateDeactivateFeatureAtSite(Boolean fActivate, Boolean fEnsure, Guid featid, SPFeatureDefinition featdef, String urlScope, String sProperties, Boolean fForce) at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtScope(Boolean fActivate, Guid featid, SPFeatureDefinition featdef, String urlScope, Boolean fForce) at Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature.UpdateDataObject() at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord() at System.Management.Automation.CommandProcessor.ProcessRecord() at System.Management.Automation.CommandProcessorBase.DoExecute() at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate) at System.Management.Automati... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...on.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at lambda_method(Closure , Object[] , StrongBox`1[] , InterpretedFrame ) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess) at System.Management.Automation.CommandProcessorBase.DoComplete() at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.R... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...un(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess) at System.Management.Automation.CommandProcessorBase.DoComplete() at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) at System.Management.Automation.Intern... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...al.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate) at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper() at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc() at System.Management.Automation.Runspaces.PipelineThread.WorkerProc() 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 System.Threading.ThreadHelper.ThreadStart... 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72* PowerShell.exe (0x235C) 0x2B44 SharePoint Foundation Performance naqx Monitorable ...() 5b7cf973-1e3f-4985-bdf8-598eecf86ab6
I tried finding something on the internet on this but either my Google Mojo is gone or there is no one else posting about this.
Since we do not want to change the logging behavior of SharePoint (unless it is really necessary), I'd like to know if there is something wrong with my code? Is there some parameter I can use to suspend logging for this script? There must be something I'm
doing horribly wrong :(
Thanks in advance!
(If anything I posted is unclear please let me know since English isn't my first language)
EDIT: There is nothing productive happening on that farm. There is a web application for the MySites and one for a publishing portal (without any significant content).It's because MS did a poor job on the SharePoint object model. You shouldn't need to call a 'dispose' method on any object in .Net, the garbage collector should automatically identify a no-longer required object and remove it. Unfortunately, and there might
be a reason for it, that isn't true for SPWeb or SPSite objects.
Evidently the Enable-SPFeature comandlet contains a SPSite or SPWeb object and fails to dispose of it.
You could try using Start-SPAssignment: http://technet.microsoft.com/en-us/library/ff607664%28v=office.15%29.aspx which some have found to be useful to deal with this. Another option would be to create a process that generates a new thread for each row in
the csv which will result in the objects being destroyed as that process ends. -
Hi,
We have a sharepoint enterprise installation. We have an exception when trying to search documents on sharepoint.
This can't be reproduce with chrome.
When I try to lookup the correlation ID given with an error
get-splogevent | where {$_Correlation -eq "7ee2bfaa-7ce4-4ac3-b60e-0532d82a42cb" }
I get no results
Fortunately, the error displays the hour it occured, ans the log is giving this information
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 5024
Area : SharePoint Foundation
Category : Monitoring
EventID : nasq
Level : Medium
Message : Entering monitored scope (Timer Job SchedulingUnpublish)
Correlation : 2e594c83-42fa-411e-9ea6-97917edf68d6
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 2244
Area : SharePoint Foundation
Category : Monitoring
EventID : nasq
Level : Medium
Message : Entering monitored scope (Timer Job SASCRM_Job)
Correlation : 88f2cb56-6637-4168-ae94-bab3c61bc04e
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 5024
Area : SharePoint Foundation
Category : Monitoring
EventID : b4ly
Level : Medium
Message : Leaving Monitored Scope (Timer Job SchedulingUnpublish). Execution Time=4.50979104886235
Correlation : 2e594c83-42fa-411e-9ea6-97917edf68d6
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 5024
Area : SharePoint Foundation
Category : Monitoring
EventID : nasq
Level : Medium
Message : Entering monitored scope (Timer Job SchedulingUnpublish)
Correlation : 2e594c83-42fa-411e-9ea6-97917edf68d6
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 2244
Area : SharePoint Foundation
Category : Monitoring
EventID : b4ly
Level : Medium
Message : Leaving Monitored Scope (Timer Job SASCRM_Job). Execution Time=11.3905538273719
Correlation : 88f2cb56-6637-4168-ae94-bab3c61bc04e
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 2244
Area : SharePoint Foundation
Category : Performance
EventID : nask
Level : Monitorable
Message : An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or S
PWeb) as soon as you are done using it. This object will now be disposed. Allocation Id: {30F2B069-9B14-44BF-B684-0651FB623DBD} To determine where this object
wa
s allocated, set Microsoft.SharePoint.Administration.SPWebService.ContentService.CollectSPRequestAllocationCallStacks = true.
Correlation : 88f2cb56-6637-4168-ae94-bab3c61bc04e
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 5024
Area : SharePoint Foundation
Category : Monitoring
EventID : b4ly
Level : Medium
Message : Leaving Monitored Scope (Timer Job SchedulingUnpublish). Execution Time=4.79586092645853
Correlation : 2e594c83-42fa-411e-9ea6-97917edf68d6
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 2244
Area : SharePoint Foundation
Category : Monitoring
EventID : nasq
Level : Medium
Message : Entering monitored scope (Timer Job SASCRM_Job)
Correlation : 88f2cb56-6637-4168-ae94-bab3c61bc04e
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 2244
Area : SharePoint Foundation
Category : Monitoring
EventID : b4ly
Level : High
Message : Leaving Monitored Scope (EnsureListItemsData). Execution Time=15.7581480327807
Correlation : 88f2cb56-6637-4168-ae94-bab3c61bc04e
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 2244
Area : SharePoint Foundation
Category : Database
EventID : 4ohp
Level : High
Message : Enumerating all sites in SPWebApplication Name=SALES.
Correlation : 88f2cb56-6637-4168-ae94-bab3c61bc04e
Context : {}
Timestamp : 29/01/2014 09:05:27
Continuation : False
Process : OWSTIMER.EXE (0x1D20)
ThreadID : 2244
Area : SharePoint Foundation
Category : Database
EventID : 4ohq
Level : Medium
Message : Site Enumeration Stack: at Microsoft.SharePoint.SPBaseCollection.GetEnumerator() at Afv.SharePoint.Crm.Job.SASCRM_Job.RelocateUpdatedDocuments(SPList listSAS
CRM, SPWeb webElev, SPSite site) at Afv.SharePoint.Crm.Job.SASCRM_Job.Execute(Guid targetInstanceId) at Microsoft.SharePoint.Administration.SPTimerJobInvoke
Internal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result) at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke
(TimerJobExecuteData& data, Int32& result)
Correlation : 88f2cb56-6637-4168-ae94-bab3c61bc04e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : mssdmn.exe (0x21F8)
ThreadID : 9152
Area : SharePoint Server
Category : Unified Logging Service
EventID : b8fx
Level : High
Message : ULS Init Completed (mssdmn.exe, Microsoft.Office.Server.Native.dll)
Correlation : 00000000-0000-0000-0000-000000000000
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : mssdmn.exe (0x21F8)
ThreadID : 9152
Area : SharePoint Server Search
Category : FilterDaemon
EventID : e4uf
Level : High
Message : filter daemon memory quota: 838860800 838860800
[fltrdaemon.cxx:1505] d:\office\source\search\native\mssdmn\fltrdaemon.cxx
Correlation : 00000000-0000-0000-0000-000000000000
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Foundation
Category : Monitoring
EventID : nasq
Level : Medium
Message : Entering monitored scope (Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-af
af-0050568e004e&accountid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102))
Correlation : 00000000-0000-0000-0000-000000000000
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Foundation
Category : Logging Correlation Data
EventID : xmnv
Level : Medium
Message : Name=Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-afaf-0050568e004e&accou
ntid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102)
Correlation : e87e2210-e512-44c8-927e-83d50e6b3879
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Foundation
Category : Monitoring
EventID : b4ly
Level : Medium
Message : Leaving Monitored Scope (Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-afa
f-0050568e004e&accountid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102)).
Execution Time=1,25267317494263
Correlation : e87e2210-e512-44c8-927e-83d50e6b3879
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 8116
Area : SharePoint Foundation
Category : Monitoring
EventID : nasq
Level : Medium
Message : Entering monitored scope (Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-af
af-0050568e004e&accountid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102))
Correlation : 00000000-0000-0000-0000-000000000000
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 8116
Area : SharePoint Foundation
Category : Logging Correlation Data
EventID : xmnv
Level : Medium
Message : Name=Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-afaf-0050568e004e&accou
ntid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102)
Correlation : 197c3750-c383-49aa-859f-48376ba4105f
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 8116
Area : SharePoint Foundation
Category : Monitoring
EventID : b4ly
Level : Medium
Message : Leaving Monitored Scope (Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-afa
f-0050568e004e&accountid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102)).
Execution Time=1,26775889114399
Correlation : 197c3750-c383-49aa-859f-48376ba4105f
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Foundation
Category : Monitoring
EventID : nasq
Level : Medium
Message : Entering monitored scope (Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-af
af-0050568e004e&accountid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102))
Correlation : 00000000-0000-0000-0000-000000000000
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Foundation
Category : Logging Correlation Data
EventID : xmnv
Level : Medium
Message : Name=Request (GET:http://--My server/--MY Site--/_layouts/crm_searchresults/tablesearchresults.aspx?k=infreportid%3D4c7894e3-3388-e311-afaf-0050568e004e&accou
ntid=0b8cbdd5-3388-e311-afaf-0050568e004e&inf_reportid=4c7894e3-3388-e311-afaf-0050568e004e&prospectnumber=P14001043&reportnumber=FALST140102)
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Foundation
Category : Logging Correlation Data
EventID : xmnv
Level : Medium
Message : Site=--MY Site--
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Foundation
Category : General
EventID : 72nz
Level : Medium
Message : Videntityinfo::isFreshToken reported failure.
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Server Search
Category : Query
EventID : dn4s
Level : High
Message : FetchDataFromURL start at(outside if): 1 param: start
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Server Search
Category : Query
EventID : g1j9
Level : Exception
Message : Internal server error exception: System.ArgumentNullException: Value cannot be null. Parameter name: The property RequestedLanguage cant not set to NULL at Mic
rosoft.Office.Server.Search.Query.Location.set_RequestedLanguage(CultureInfo value) at Microsoft.Office.Server.Search.WebControls.CoreResultsDatasourceView.Crea
teLocationList() at Microsoft.Office.Server.Search.WebControls.CoreResultsDatasourceView.SetPropertiesOnQdra() at Microsoft.Office.Server.Search.WebControls
.SearchResultsBaseWebPart.EnsureWebpartReady() System.ArgumentNullException: Value cannot be null. Parameter name: The property RequestedLanguage cant not set to N
ULL at Microsoft.Office.Server.Search.Query.Location.set_RequestedLanguage(CultureInfo value) at Microsoft.Office.Server.Search.WebControls.CoreResultsDatas
ourceView.CreateLocationList() at Microsoft.Office.Server.Search.WebControls.CoreResultsDatasourceView.SetPropertiesOnQdra()
at Microsoft.Office.Server.Sear
ch.WebControls.SearchResultsBaseWebPart.EnsureWebpartReady()
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Server
Category : Unified Logging Service
EventID : c91s
Level : Monitorable
Message : Watson bucket parameters: SharePoint Server 2010, ULSException14, 06175311 "sharepoint server search", 0e00129b "14.0.4763.0", 17853a8f "microsoft.office.server.sea
rch", 0e00129a "14.0.4762.0", 4bad937d "sat mar 27 06:11:25 2010", 000037d1 "000037d1", 00000032 "00000032", e9fbee3b "argumentnullexception",
67316a39 "g1j9"
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Server
Category : General
EventID : 7888
Level : Warning
Message : A runtime exception was detected. Details follow. Message: Thread was being aborted. Technical Details: System.Threading.ThreadAbortException: Thread was being ab
orted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End() at System.Web.
HttpServerUtility.Transfer(String path) at Microsoft.SharePoint.Utilities.SPUtility.TransferToErrorPage(String message, String linkText, String linkUrl)
at
Microsoft.Office.Server.Search.WebControls.QueryUIError.GetErrorMessageOrRedirectToErrorPage(Exception ex, Boolean showMessages) at Microsoft.Office.Server.Sear
ch.WebControls.SearchResultsBaseWebPart.EnsureWebpartReady() at Microsoft.Office.Server.Search.WebControls.SearchResultsBaseWebPart.OnLoad(EventArgs
e)
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Timestamp : 29/01/2014 09:05:28
Continuation : False
Process : w3wp.exe (0x1434)
ThreadID : 4428
Area : SharePoint Server Search
Category : Query
EventID : g1j9
Level : Exception
Message : (Watson Reporting Cancelled) System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading
.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at System.Web.HttpServerUtility.Transfer(String path)
at Microsoft.SharePoint.Utilities
.SPUtility.TransferToErrorPage(String message, String linkText, String linkUrl) at Microsoft.Office.Server.Search.WebControls.QueryUIError.GetErrorMessageOrRedi
rectToErrorPage(Exception ex, Boolean showMessages) at Microsoft.Office.Server.Search.WebControls.SearchResultsBaseWebPart.EnsureWebpartReady()
at Microsoft
.Office.Server.Search.WebControls.SearchResultsBaseWebPart.OnLoad(EventArgs e)
Correlation : dffeb360-ca1c-4496-814b-63a970a4b24e
Context : {}
Any idea ?
regardsHi!
I believe it is a problem regarding the preferred language for the user:
"Internal server error exception: System.ArgumentNullException: Value cannot be null. Parameter
name: The property RequestedLanguage cant not set to NULL "
Please refer to this thread (http://social.technet.microsoft.com/Forums/en-US/230896a4-a928-4b44-91a2-3e7f767b8b3f/internal-server-error-exception-on-search-results-page-when-no-language-is-set-in-browser?forum=sharepointgeneralprevious)
as I think it's related.
Cheers -
Problem running SSRS report on SharePoint 2010 - report renders rendomly
I have an SSRS master report that contains about 30 sub-reports. These reports are deployed to SharePoint 2010 server. Per my understanding these reports run independently of Reporting Server (execute directly from the cube/database).
It appears that this master report executes for about 10 minutes and then returns a blank page for most requests. Seldom it returns the master report consisting 30 sub-reports. I have checked Report Server logs using the following query and it shows no trace.
Use ReportServer
select * from ExecutionLog3 order by TimeStart DESC
I set SharePoint 2010 logging to the lowest level and reviewed the log for the run-time of the report. This log shows that the report and sub reports are being executed, however it does not provide any significant error information. Follows a sample of what
SharePoint log contains for single sub-report execution.
Timestamp Process TID Area Category EventID Level Message Correlation
04/02/2014 15:43:18.75 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Database 4ohp High Enumerating all sites in SPAdministrationWebApplication.
04/02/2014 15:43:18.81 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Database 4ohp High Enumerating all sites in SPAdministrationWebApplication.
04/02/2014 15:43:21.07 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable Potentially excessive number of SPRequest objects (16) currently unreleased on thread 15. Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. This object is holding on to a separate native heap.This object will not be automatically disposed. Allocation Id for this object: {04E40041-2CC7-4CA2-8026-0921BFF7F0A8} Stack trace of current allocation: at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) at Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode) at Microsoft.SharePoint.Administration.SPFarm....
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...get_RequestAny() at Microsoft.SharePoint.SPSite.InitUserToken(SPRequest request) at Microsoft.SharePoint.SPSite.SPSiteConstructor(SPFarm farm, Guid applicationId, Guid contentDatabaseId, Guid siteId, Guid siteSubscriptionId, SPUrlZone zone, Uri requestUri, String serverRelativeUrl, Boolean hostHeaderIsSiteName, SPUserToken userToken) at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken) at Microsoft.SharePoint.SPSite..ctor(String requestUrl) at Microsoft.ReportingServices.SharePoint.Objects.RSSPImpSite..ctor(String requestUrl) at Microsoft.ReportingServices.SharePoint.Objects.RSSharePointClassFactory.CreateSPSite(String requestUrl) at Microsoft.ReportingServices.SharePoint.ObjectModel.RSSharePointClassFacto...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...ry.CreateSPSite(String requestUrl) at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.GetSiteFromExternalPath(String path, Boolean noThrow) at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.SetExternalRoot(String path) at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.SyncToRSCatalog(ExternalItemPath path, Boolean createOnly) at Microsoft.ReportingServices.Library.CatalogItemFactory.InternalGetCatalogItem(CatalogItemContext itemContext, Boolean doSync, Boolean& wasSynched) at Microsoft.ReportingServices.Library.SubreportRetrieval.GetSubreportDataSources(ICatalogItemContext reportContext, String subreportPath, NeedsUpgrade needsUpgradeCallback, ICatalogItemContext& subreportContext, IChunkFactory& compil...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...edDefinitionChunkFactory, DataSourceInfoCollection& dataSources, DataSetInfoCollection& dataSets) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CheckCredentialsOdp(Report report, DataSourceInfoCollection dataSources, DataSetInfoCollection dataSetReferences, ICatalogItemContext reportContext, OnDemandSubReportDataSourcesCallback subReportCallback, RuntimeDataSourceInfoCollection allDataSources, RuntimeDataSetInfoCollection allDataSetReferences, Int32 subReportLevel, Boolean checkIfUsable, ServerDataSourceSettings serverDatasourceSettings, Hashtable subReportNames) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.GetAllDataSources(ICatalogItemContext reportContext, IChunkFactory getCompiledDefinitionFactory, OnDemandSubReportDataSourcesCallback subR...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...eportCallback, DataSourceInfoCollection dataSources, DataSetInfoCollection dataSetReferences, Boolean checkIfUsable, ServerDataSourceSettings serverDatasourceSettings, RuntimeDataSourceInfoCollection& allDataSources, RuntimeDataSetInfoCollection& allDataSetReferences) at Microsoft.ReportingServices.Library.RSService.ProcessingGetAllDataSources(ReportProcessing repProc, CatalogItemContext reportContext, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, DataSetInfoCollection thisReportDataSets, Boolean checkIfUsable, RuntimeDataSourceInfoCollection& runtimeDataSources, RuntimeDataSetInfoCollection& runtimeDataSets) at Microsoft.ReportingServices.Library.RSService.GetAllDataSources(ReportProcessing repProc, BaseReportCatalogItem report, ReportSnapsho...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...t intermediateSnapshot, Boolean checkIfUsable, RuntimeDataSourceInfoCollection& runtimeDataSources, RuntimeDataSetInfoCollection& runtimeDataSets) at Microsoft.ReportingServices.Library.RSService.GetAllDataSources(BaseReportCatalogItem report, Boolean checkIfUsable, Boolean useServiceConnectionForRepublishing, ReportSnapshot& compiledDefinition, RuntimeDataSourceInfoCollection& runtimeDataSources, RuntimeDataSetInfoCollection& runtimeDataSets) at Microsoft.ReportingServices.Library.BaseReportCatalogItem.LoadRuntimeDataSources() at Microsoft.ReportingServices.Library.BaseReportCatalogItem.get_RuntimeDataSources() at Microsoft.ReportingServices.Library.GetDataForExecutionAction._GetDataForExecution(CatalogItemContext reportContext, ClientRequest session, String historyID, Dat...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...aSourcePromptCollection& prompts, ExecutionSettingEnum& execSetting, DateTime& snapshotExecutionDate, ReportSnapshot& snapshotData, Int32& pageCount, Boolean& hasDocMap, PageSettings& reportPageSettings, PaginationMode& paginationMode) at Microsoft.ReportingServices.Library.GetDataForExecutionAction.ExecuteStep(CatalogItemContext reportContext, ClientRequest session, DataSourcePromptCollection& prompts, ExecutionSettingEnum& execSetting, DateTime& executionDateTime, ReportSnapshot& snapshotData, Int32& pageCount, Boolean& hasDocMap, PageSettings& reportPageSettings, PaginationMode& paginationMode) at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save() at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.LoadReport(String Report, String HistoryID, Execu...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...tionInfo2& executionInfo) at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport2(String Report, String HistoryID, ExecutionInfo2& executionInfo) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle 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 System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) at System.Web.Services.Protocols.WebServi...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...ceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) at System.Web.Http...
04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...Runtime.ProcessRequest(HttpWorkerRequest wr) at ReportingServicesHttpRuntime.RsHttpRuntime.ProcessRequest(IRsHttpPipeline rsHttpPipeline)
04/02/2014 15:43:21.10 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable Potentially excessive number of SPRequest objects (16) currently unreleased on thread 15. Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. This object is holding on to a separate native heap.This object will not be automatically disposed. Allocation Id for this object: {9D227A96-9050-4123-A663-EECC9CBDA04D} Stack trace of current allocation: at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) at Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode) at Microsoft.SharePoint.Administration.SPFarm....
I have tried running reports on IE 8, IE 9, Chrome and on multiple systems. This random behavior does not change across browsers or machines. Report is rendered for one out of 10 requests (if at all).
Has someone experienced this problem? I have been spending a lot of time just to see the report output of the master. Unfortunately my SharePoint reports use shared data-sets and it is not possible to run master from Visual Studio 2008 IDE as well.
Thanks in advance for your help.
Palak ModyHi Kenny,
Thank you for your question.
From your description, you can to move the parameter pane from right to the top in the SharePoint site, right? I am afraid this cannot be done in SQL Server 2008R2 SSRS reports on SharePoint 2010 integrated mode. And this is a know issue which you can see:http://connect.microsoft.com/SQLServer/feedback/details/545893/allow-ssrs-parameter-panel-to-be-formatted
Thank you for your understanding.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
Charlie Liao
TechNet Community Support -
Error Message Creating Site Template
Hello,
When I go to Site Actions --> Site Settings --> Site Actions --> Save site as template, I receive an error message. I have asked several people to help me out with this, but I have received paths to find the ULS and locate the issue with the message.
Instead I went to Galleries --> Solutions. When I went to 'Activate' the page, I viewed the following error message:
Feature definition with Id 8a754d6e-e081-4d24-bfb8-7e4a7c5136f8 failed validation, file '1ProjectCharterListInstances\ElementsFields.xml', line 3166, character 82: The 'BdcField' attribute is not allowed.
I have gone to Central Administration -->Manage Service Applications--> Business Data Connectivity Service Application, but this is where ECT's were created and there were no ECT's created for this project. I even tried re-creating the site on a Parent
Level and I still received the same error message. I have gone to \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML, per another person having a similar issue here on MSDN, but I have no Idea where to go from here.
I see there is a 'BDCMetadata' and a 'BDCMetadataResource' files that will open up in Visual Studio.
Someone else told me that I need to go to 14/TEMPLATE/FEATURES, went there too, but I have no clue what I am looking for. Someone else told me that I
needed to check c:\program files\common files\microsoft shared\web server extensions\14\logs, and I
did and see the log and am trying to view it for why the issue may have arisen.
I am still new to SharePoint and any help would be greatly appreciated.
Richell A. GrantHere is what I found from the ULS Viewer:
w3wp.exe (0x1E30) 0x26F0
SharePoint Foundation Monitoring
nasq Medium
Entering monitored scope (Request (POST:http:// /Project/_layouts/savetmpl.aspx))
w3wp.exe (0x1E30) 0x26F0
SharePoint Foundation Logging Correlation Data
xmnv Medium
Name=Request (POST:http:// /Project/_layouts/savetmpl.aspx)
42ea0094-cd5c-49ea-bfa6-932843c2ff36
w3wp.exe (0x1E30) 0x26F0
SharePoint Foundation Logging Correlation Data
xmnv Medium
Site=/ 42ea0094-cd5c-49ea-bfa6-932843c2ff36
w3wp.exe (0x1E30) 0x26F0
SharePoint Foundation Monitoring
b4ly High
Leaving Monitored Scope (EnsureListItemsData). Execution Time=12.7525294395875
42ea0094-cd5c-49ea-bfa6-932843c2ff36
OWSTIMER.EXE (0x1CAC) 0x10D4
SharePoint Foundation Monitoring
nasq Medium
Entering monitored scope (Timer Job job-application-server)
f280be4d-f2fe-4695-8d6e-31a7ce3cc012
OWSTIMER.EXE (0x1CAC) 0x10D4
SharePoint Foundation Monitoring
b4ly Medium
Leaving Monitored Scope (Timer Job job-application-server). Execution Time=2.53074859543453
f280be4d-f2fe-4695-8d6e-31a7ce3cc012
OWSTIMER.EXE (0x1CAC) 0x2A44
SharePoint Foundation Monitoring
nasq Medium
Entering monitored scope (Timer Job Health Statistics Updating)
4913212b-0774-4fef-9318-a86b32086e58
OWSTIMER.EXE (0x1CAC) 0x2A44
SharePoint Foundation Topology
8xqz Medium
Updating SPPersistedObject
SearchServiceApplicationMonitoring Name=Monitoring_7F19A5D194F942e6A9856FCFD6EE6F63. Version: 639018 Ensure: False, HashCode: 1614248, Id: 3ee4d239-4cc9-4539-9e13-4dfb012df03f, Stack: at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()
at Microsoft.Office.Server.Search.Monitoring.TraceDiagnosticsProvider.UpdateServiceApplicationHealthStats() at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean
isTimerService, Int32& result) at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(TimerJobExecuteData& data, Int32& result)
4913212b-0774-4fef-9318-a86b32086e58
06/07/2011 09:06:30.74 OWSTIMER.EXE (0x1CAC)
0x2A44 SharePoint Foundation
Monitoring b4ly
Medium Leaving Monitored Scope (Timer Job Health Statistics Updating). Execution Time=40.8853780327531
4913212b-0774-4fef-9318-a86b32086e58
06/07/2011 09:06:30.78 w3wp.exe (0x1A50)
0x2E90 Access Services
Data Layer 8jg2
Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize=681357312.
53fed7f1-f8f4-2342-0000-000050f7b00c
06/07/2011 09:06:31.45 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (Team Discussion). Execution Time=204.276441523127
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.45 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (Add WebParts#86). Execution Time=204.367548472562
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.52 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#5). Execution Time=12.5685701968573
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.52 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#6). Execution Time=9.59136264231098
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.53 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#7). Execution Time=12.5647304403677
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.55 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#8). Execution Time=9.07508992884233
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.56 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#9). Execution Time=13.0384167636787
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.58 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#11). Execution Time=11.7018324365175
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.59 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#12). Execution Time=11.2941201110737
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.59 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#13). Execution Time=10.8448686017876
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:31.81 w3wp.exe (0x1A50)
0x2C54 Access Services
Data Layer 8jg2
Medium ResourceManager.PerformCleanup: Disk Manager: CurrentSize=0.
11c5f189-f8f4-2342-0000-000050f7b00c
06/07/2011 09:06:32.72 OWSTIMER.EXE (0x1CAC)
0x0654 SharePoint Foundation
Monitoring nasq
Medium Entering monitored scope (Timer Job Search Health Monitoring - Trace Events)
e64e2b2a-32b6-402a-be85-bc939eb9ff8b
06/07/2011 09:06:32.72 OWSTIMER.EXE (0x1CAC)
0x0654 SharePoint Foundation
Monitoring b4ly
Medium Leaving Monitored Scope (Timer Job Search Health Monitoring - Trace Events). Execution Time=10.2877548420202
e64e2b2a-32b6-402a-be85-bc939eb9ff8b
06/07/2011 09:06:33.64 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData). Execution Time=12.4373203386665
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.72 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
High
Leaving Monitored Scope (EnsureListItemsData#17). Execution Time=10.7935554923353
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.90 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Topology umad
Medium Solution Deployment : Looking for 'ReceiverAssembly' attribute in manifest root node for solution 'Project Charter2.wsp'.
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.90 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Topology umae
Medium Solution Deployment : Looking for 'ReceiverClass' attribute in manifest root node for solution 'Project Charter2.wsp'.
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.90
w3wp.exe (0x1E30) 0x26F0
SharePoint Foundation Topology
umal Medium
Solution Deployment : Missing one or more of the following attributes from the root node in solution Project Charter2.wsp: assembly '', type ''.
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.93 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
General 9fjj
Monitorable SPSolutionExporter: Microsoft.SharePoint.SPException:
Feature definition with Id 110e214c-5235-4a79-b8fd-3a3244743122 failed validation, file '1ProjectCharterListInstances\ElementsFields.xml', line 3166, character 82:
The 'BdcField' attribute is not allowed. at
Microsoft.SharePoint.Administration.SPSolutionPackage.SolutionFile.FeatureXmlValidationCallBack(Object sender, ValidationEventArgs evtargs) at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String arg)
at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo) at System.Xml.XsdValidatingReader.ValidateAttributes()
at System.Xml.XsdValidatingReader.ProcessElementEvent() at System.Xml.XsdValidatingReader.Read() at System.Xml.XmlReader.MoveToContent() at System.Xml.XmlReader.IsStartElement() at Microsoft.SharePoint.Utilities.SPUtility.XsdValidateXml(XmlTextReader
xmlStreamReader, String friendlyName, String pathXsdFile, String tagExpectedRootNode, ValidationEventHandler xsdValEventHandler) at Microsoft.SharePoint.Administration.SPSolutionPackage.SolutionFile.ValidateFeatureXmlFile(String rootTagElement)
at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElementsCore(XmlNodeList nodeList, String strFeatureDirRelativeToCabFile, Guid featureId, Dictionary`2 filesAdded) at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElements(XmlNode
root, String strFeatureDirRelativeToCabFile, String strFeatureXmlFilename, Guid featureId) at Microsoft.SharePoint.Administration.SPSolutionPackage.WspSolutionFeature.ProcessFeatureXml() at Microsoft.SharePoint.Administration.SPSolutionPackage.InitSolutionFeatures(XmlNode
root) at Microsoft.SharePoint.Administration.SPSolutionPackage.ProcessSolutionManifest() at Microsoft.SharePoint.Administration.SPSolutionPackage.Load() at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CreateSolutionPackage(SPRequest
request, String name, String signature, Byte[] fileBytes) at Microsoft.SharePoint.SPUserSolutionCollection.<>c__DisplayClass1.<AddOrUpgrade>b__0() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated
secureCode) at Microsoft.SharePoint.SPUserSolutionCollection.AddOrUpgrade(SPListItem item, SPUserSolution existingSolution) at Microsoft.SharePoint.SPUserSolutionCollection.Add(Int32 solutionGalleryItemId) at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb
web, String solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent, String workflowTemplateName, String destinationListUrl)
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.93 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Runtime tkau
Unexpected System.InvalidOperationException:
Error copying temporary solution file to solutions gallery: _catalogs/solutions/Project Charter2.wsp at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb web,
String solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent, String workflowTemplateName, String destinationListUrl) at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb web, String
solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent) at Microsoft.SharePoint.ApplicationPages.SaveAsTemplatePage.BtnSaveAsTemplate_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs
e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.95 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Performance nask
Monitorable An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object
or its parent (such as an SPSite or SPWeb) as soon as you are done using it. This object will now be disposed. Allocation Id: {FD36747E-91CF-43D5-A512-D6302254D976} To determine where this object was allocated, set Microsoft.SharePoint.Administration.SPWebService.ContentService.CollectSPRequestAllocationCallStacks
= true. 42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.95 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Performance nask
Monitorable An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object
or its parent (such as an SPSite or SPWeb) as soon as you are done using it. This object will now be disposed. Allocation Id: {2949D429-CD91-431F-9F52-37A89F11B3BD} To determine where this object was allocated, set Microsoft.SharePoint.Administration.SPWebService.ContentService.CollectSPRequestAllocationCallStacks
= true. 42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.95 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Performance nask
Monitorable An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object
or its parent (such as an SPSite or SPWeb) as soon as you are done using it. This object will now be disposed. Allocation Id: {34651BFE-E7C8-48EA-9BFA-583E11E02F40} To determine where this object was allocated, set Microsoft.SharePoint.Administration.SPWebService.ContentService.CollectSPRequestAllocationCallStacks
= true. 42ea0094-cd5c-49ea-bfa6-932843c2ff36
06/07/2011 09:06:33.95 w3wp.exe (0x1E30)
0x26F0 SharePoint Foundation
Monitoring b4ly
Medium Leaving Monitored Scope (Request (POST:http:// /Project/_layouts/savetmpl.aspx)). Execution Time=5219.04728660117
42ea0094-cd5c-49ea-bfa6-932843c2ff36
I (BUI) what I don't understand or I know it's an error but I have no idea how to fix these. This is what I found in the ULS Viewer! This is so much easier than how I was looking at this log yesterday and Friday.
Richell A. Grant -
Bitmap.Save 'A generic error occurred in GDI+'
Hello All,
I was just going to play around by generating some bitmaps programatically.
I started off with this simple example, expecting everything to go smoothly, but have run into a strange error.
The following code is by no means good, just something simple and complete I would expect to work:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace BitmapOutput
public partial class Form1 : Form
/// <summary>
/// The picture i am drawing
/// </summary>
System.Drawing.Bitmap myBitmap;
/// <summary>
/// Graphics object for drawing
/// </summary>
System.Drawing.Graphics myGrafx;
public Form1()
InitializeComponent();
this.myBitmap = new Bitmap(800, 600);
this.myGrafx = System.Drawing.Graphics.FromImage(this.myBitmap);
this.DrawPicture();
this.ShowPicture();
this.SavePicture();
public void DrawPicture()
this.myGrafx.DrawEllipse(
new Pen(System.Drawing.Color.AliceBlue), new Rectangle(0, 0, 100, 100));
public void ShowPicture()
this.pictureBox1.Image = this.myBitmap;
public void SavePicture()
this.myBitmap.Save("Output\\out.bmp" , System.Drawing.Imaging.ImageFormat.Bmp );
This runs fine until the SavePicture(...) function is called.
I get the exception:
"A generic error occurred in GDI+."
at the this.myBitmap.Save(...); line.
Most likely there is some detail that I have overlooked, and I appreciate it if anyone could point out to me what I could do to fix it.
But, I'd like to think that this code would work, it makes sense, and requires little effort, that should be one of the goals of .net
Any help or ideas are greatly appreciated!
P.S. how do I use 'code' tags?Actually, the fix is to properly dispose of your objects in order. This is one advantage of C#, with the using() syntax:
// new image with transparent Alpha layer
using (var bitmap = new Bitmap(330, 18, PixelFormat.Format32bppArgb))
using (var graphics = Graphics.FromImage(bitmap))
// add some anti-aliasing
graphics.SmoothingMode = SmoothingMode.AntiAlias;
using (var font = new Font("Arial", 14.0f, GraphicsUnit.Pixel))
using (var brush = new SolidBrush(Color.White))
// draw it
graphics.DrawString(user.Email, font, brush, 0, 0);
// setup the response
Response.Clear();
Response.ContentType = "image/png";
Response.BufferOutput = true;
// write it to the output stream
bitmap.Save(Response.OutputStream, ImageFormat.Png);
Response.Flush();
Notice how I dispose (end the using) of the graphics parameter, before I save it? You don't have to use the using() statements, just call Dispose() at the end of the scope I show above.
I ran into this problem today on Azure (works locally in the cloud, just an Azure 1.3 thing!), and I saw the link to the blog post above. That was a good link, as it pointed me in the direction of disposing the graphics earlier.
But, there is no point of increasing hte memory usage of two bitmaps if you dispose of your graphics properly before saving.
http://eduncan911.com
Maybe you are looking for
-
I have a MAC desktop and the firefox program has just stopped working and will not close and prohibits even shutting down the computer. There is a small dialogue box open but it has no words in it and I suspect it may be a malfunctioning part of an u
-
To_char displays different results on sql client and server
Hi, I am executing the below query on my database with 8.1.7.4 version: SQL> select to_char(to_date('20-OCT-07'),'D') from dual; The following result is displayed: T 7 When the same query is being run through sqlplus client(9.2.0.3) connecting to the
-
Automator newb -- how do I calculate a file name programmatically?
I have a directory, Books/, and inside of Books/ are subdirectories and each subdirectory is a collection of pdf files. The task of my Automator script is combine all of the pdf's in one subdirectory into one pdf, with the name of the file being the
-
versao 4.2.1 (8c148) modelo mb489po i phone 3g
-
Can't access iPhone apps throught iPhone
I tried to access apps store and everytime i try to purchase an application it says i can't because I have a US Apple ID. The funny thing is, I am in the United States. I was wondering if anyone has had this problem; where the phone is mis-reading a