Showing posts with label Bugs. Show all posts
Showing posts with label Bugs. Show all posts

Wednesday, April 27, 2011

Combining WMV Videos

I had some videos downloaded from the internet in WMV format which I wanted to combine to a single file. After trying Windows Movie Maker which did combine my files but make the end result both larger and with less resolution I tried downloading another app “Easy Video Joiner” and wasn’t impressed.

It was half a solution because:

  1. It’s free – which is always a plus (it used to be order based but the company just grants the registration for free here)
  2. It joins WMVs and doesn’t reduce quality nor size! - a plus
  3. It has errors popping up from time to time – a minus
  4. It closes while joining the files without any error – a minus
  5. It wasn’t updated since Jun 30, 2003 – which considering all the errors probably mean it has no support – a minus
  6. The app is very random in its responses meaning running it twice might cause an error once and the next time to succeed, or just drop dead. So no one should delete the source without checking the result first!

So I just wanted to check out how hard will it be to implement a joiner of my own and just looking for managed code for doing that took too long. At the end I found Microsoft Expression Encoder SDK which is supposed to enable this.

//TODO: try it out

 

Keywords: Encoding video, wmv

IceRocket Tags: ,

Monday, January 17, 2011

Offline Blog Writing Applications

 

Not sure if it is a bug or not but I copied some text between my blog posts and found that WLW decided not to copy the image location but the temp location – but only for the <a> tags:

ImageLocation

I fixed that but still – WHY???

 

I found out about it by trying out:

Just looking at links I was shocked find (local) links:

Zoundry Raven Links Diagnostics

 

 

//TODO: Continue this post and try out of the different offline editors.

Resources:

 

Keywords: WLW, Windows live writer, Zoundry Raven, bug

Monday, January 10, 2011

Silverlight ESRI App - IIS is dead–Error 5011

On the start of this week (2/1/20) our application in production started having troubles. And we didn’t know why but the IIS process from time to time just decided to quit.

In the EventViewer’s Application log we found:

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1/ROOT/AppPool

Process ID: 1340

Exception: System.OutOfMemoryException

Message: Exception of type 'System.OutOfMemoryException' was thrown.

In the EventViewer’s System log we found:

A process serving application pool 'XAppPool' suffered a fatal communication error with the Windows Process Activation Service. The process id was '1976'. The data field contains the error number.

Something about the system message in TechNet.

Googled the system message and found on StackOverFlow, the advice there was to use IIS Debug Diagnostics tools but we have IIS 7 and this link doesn’t apply to it.

I and my team leader started studying how to read the trace and how to debug the failure.

We thought we found the solution because we found that an unknown someone changed a config value (at the start of the week) that is used in our Silverlight feature layer to check the layer for updates ( see post TODO) was far too low meaning that every second the server got 12*number of users requests that queried the layer status. And even though the server uses caching it was too much.

The WCF trace log has shown the Exception: System.ServiceModel.ProtocolException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The number of bytes available is inconsistent with the HTTP Content-Length header.  There may have been a network error or the client may be sending invalid requests.

Googled and found this post. Hope it is the Anti Virus but we shall see tomorrow!

Well No AntiVirus was installed, bummer!

 

Went over the ArcGIS Server logs and found these lines (in C:\Program Files (x86)\ArcGIS\server\user\log):

<Msg time='2011-01-07T22:27:00' type='ERROR' code='10837' target='BaseLayers.MapServer' methodName='MapServer.QueryFeatureData2' machine='liveil-gtm' process='4048' thread='3564'>GeoDatabase Error :FDO error: -2147024890 [ScratchRecordSet].  The table was not found. [GDB_ReleaseInfo].  The table was not found. [GDB_Release].  The table was not found. [GDB_ReleaseInfo].  The table was not found. [GDB_Release].  The table was not found. [GDB_DBTune].  The table was not found. [GDB_ReleaseInfo].  The table was not found. [GDB_Release].  The table was not found. [GDB_ReleaseInfo].  The table was not found. [GDB_Release].  The table was not found. [GDB_DBTune].</Msg>
<Msg time='2011-01-07T22:27:00' type='ERROR' code='100005' target='BaseLayers.MapServer' methodName='MapServer.QueryFeatureData2' machine='liveil-gtm' process='4048' thread='3564' elapsed='0.95282'>Method failed.HRESULT = 0x80004005 : Unspecified error  .</Msg>


And this Error in the EventLog:

[15:01:38.201 GisModule] System.Runtime.InteropServices.COMException (0x80041538): Underlying DBMS error[Microsoft OLE DB Provider for SQL Server: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.][DATABASE.GIS.LAYER]
   at ESRI.ArcGIS.Geodatabase.IFeature.Store()
   at Namespace.OnPeriodicUpdateRequest(PeriodicUpdateRequest request) in c:\Folder\App Module GIS\Source\Namespace\Module.OnPeriodicUpdateRequest.cs:line 51


Another thing we found was that the AppPool for our ArcGis server thread was using a lot of CPU (by simply looking at the Task Manager). And that the ArcSoc processes were also very high in CPU usage - ~30%.


At the end my team leader found the problem one of the IFeature.Store failed but an empty row was added to the DB (and since there was no primary key set on the table the next time it happened it again added an empty row). That table grew to a very large number of rows but almost all of them were empty so that in every request to the Server for the Layer (from our Silverlight application) the AppPool for the ArcGis Server worked and it made the ArcSoc processes work as well KILLING the server.

 

//TODO: post about our implementation of ESRI Silverlight API’s FeatureLayer

//TODO: write about enabling WCF trace log

//TODO: study how to troubleshot this kind of errors and post it here

//TODO: Reformat this post – it’s just erratic

Resources:

TechNet Error Event Id 5011

Silverlight Forums: HttpRequestTimedOutWithoutDetail

Keywords: fatal communication error, Windows Process Activation Service, IIS, Error, Event Id 5011, WAS, ProtocolException, Anti Virus, IFeature, Store, ArcSoc, AppPool, CPU, COMException

Tuesday, January 4, 2011

Tracking down a simple bug

 

What are the steps to tracking down a bug?

What is your system?

 

Well I like to first look at what I am trying to achieve:

Add/Delete data from the map and having the changes appear at another client automatically.

What is the current change?

Deleting data automatically affects other clients.

The bug:

When deleting Boo entities all other Boo entities on the screen get deleted.

Tracking down the code that is probably responsible:

        private void AreDeletedTask_ExecuteCompleted(object sender, QueryEventArgs e)

        {

            var toDelete = new List<Graphic>();

            foreach (var graphic in Graphics)

            {

                var id = GetObjectId(graphic);

                if ((e.FeatureSet.ObjectIDs == null || !e.FeatureSet.ObjectIDs.Contains(id)) &&

                    graphic.Geometry.Extent.Intersects(_map.Extent))

                    toDelete.Add(graphic);

            }

 

            foreach (var graphic in toDelete)

            {

                Graphics.Remove(graphic);

            }

        }

Just from looking at the code I can tell that the toDelete list must contain all the graphic elements in the extent.

So what do we have here? This is the result of a task that queries elements missing from an update to the current extent.

Let say I have a,b,c,d Boo elements.

a,b – were deleted

c – was unchanged

d – was updated

Only b,c,d are in the extent.

The query will be on the existence of a,b,c.

The result given to this method should contain only c element.

toDelete should contain b only.

But what about the case:

a – was deleted

b,c,d – were unchanged

The query will be on the existence of a, and will return null.

Now toDelete will contain a,b,c,d – Found The Bug!