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

Friday, 30 May 2014

XBMC–Some YouTube videos refuse to play

I noticed that a few YouTube videos refused to play. Having searched around, I came upon a thread in the XBMC YouTube plugin code repository;

https://code.google.com/p/youtubexbmc/issues/detail?id=95#c217

martinpe...@gmail.com  linked to an updated YouTubePlayer.py file;

YouTubePlayer.py

Copying this file to your XBMC Addons directory, over the existing file, fixes the problem nicely.

Evidently, some YoutTube videos have a ‘$’ in the JS function name, which confuses the original plugin. This plugin replaces the ‘$’ in the function names with ‘_S_’

Hope this helps somebody!

Thursday, 29 May 2014

Visual Studio 2013 Update 2 – Navigation Bar Dropdowns not working

Seems as though the VS team introduced a bug in Update 2 for Visual Studio 2013, where the Navigation Bar Dropdowns don’t work if you are using VS on a screen which is to the left of your “Main Screen”;

image

When you have VS running on your second (or third) monitor, clicking on the Navigation Drop Downs has no effect;

image

In order to workaround the problem, you either need to set the screen you have VS running in as your main screen, using your graphics properties, or alternatively move VS to your main screen……

Frustrating…

Hopefully this will be cured in a future update..

Friday, 23 May 2014

Wordpress Contact-Form-7 Not Sending–”Spinning Arrows”

I recently had an issue with a new Wordpress install, where the Contact Form wasn’t sending correctly, instead hitting the Submit button would simply show the Spinning arrows animation, with no Mail Sent.

I was also using the Really Simple CAPTCHA plugin, which may have had a bearing on the issue too.

After doing some digging around I found a couple of forum posts which helped;

http://venugopalphp.wordpress.com/2014/01/08/contact-form-7-really-simple-captcha-permission/
http://wordpress.stackexchange.com/questions/13367/how-to-resolve-failed-to-send-your-message-problem-for-contact-form-7

Combining these two gave me a solution which worked;

  1. Set the Permissions of the “wp-content/uploads” directory to 777
  2. Open the “p-content/plugin/really-simple-captcha/really-simple-captcha.php”

    Change;

    /* Image type. 'png', 'gif' or 'jpeg' */
            $this->img_type = 'png';
     
            /* Mode of temporary image files */
            $this->file_mode = 0444;
     
            /* Mode of temporary answer text files */
            $this->answer_file_mode = 0440;

    To;



    /* Image type. 'png', 'gif' or 'jpeg' */
            $this->img_type = 'png';
     
            /* Mode of temporary image files */
            $this->file_mode = 0777;
     
            /* Mode of temporary answer text files */
            $this->answer_file_mode = 0770;

  3. Install the “WP-Mail-SMTP” plugin and configure it to use your website’s email address smtp settings etc
  4. Modify your Contact-Form-7 Contact Form settings;

    From:
    image

    To:
    image

    Where you should replace “info@yourdomain.com” with the email address you have configured in the “WP-Mail-SMTP” plugin.


Adding the Additional Headers, allows you to still reply to the original sender.

Thursday, 22 May 2014

Skype Login Screen not Rendering Properly

Recently I had an issue where my Skype login screen wasn’t rendering properly, showing something like;

33.jpg

After doing some searching around I found the following Skype forum which had a solution;

http://community.skype.com/t5/Windows-desktop-client/Skype-6-10-0-104-BIG-Login-screen-problem/td-p/2064269/page/6

Turns out that this is caused by a registry key setting css to text/plain rather than text/css.

Simply setting “HKEY_LOCAL_Machine > Software > Classes > .css > Content Type” to “text/css” cured the problem.

Thursday, 27 February 2014

WPF PasswordBox control click crashes Application if Fonts aren’t available

I recently had an issue where a kiosk application I was developing would crash on a Windows Embedded 7 system, if the user clicked on a PasswordBox control. Annoyingly, I couldn’t replicate this in my test environment.

The Application would crash, and frustratingly, not actually hit any of my Error Handlers. However, the Windows Application Event Log shined a little more on the issue, returning the following;

Application: FrontEnd.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: Unrecoverable system error.
Stack:
   at System.Environment.FailFast(System.String)
   at MS.Internal.Invariant.FailFast(System.String, System.String)
   at MS.Internal.Invariant.Assert(Boolean)
   at System.Windows.Media.FontFamily.get_FirstFontFamily()
   at System.Windows.Media.FontFamily.get_LineSpacing()………

After doing some digging around, I found that I wasn’t the only person that this had happened to;

http://stackoverflow.com/questions/8821648/why-does-a-passwordbox-control-crash-my-wpf-application

and…

http://social.msdn.microsoft.com/Forums/vstudio/ar-SA/fc2c9a54-8f66-4f1a-82be-cb40ada5fba5/systemwindowsmediafontfamily-crash-net-35-sp1-systemexecutionengineexception?forum=wpf

Where the final post by Brendave suggested installing the following fonts on the machine;

  • Arial (TrueType)
  • Courier New (TrueType)
  • Times New Roman (TrueType)
  • Marlette

I couldn’t actually find Marlette on my system, so didn’t copy this one, and I also assumed that if it was working ok on my system anyway, then chances were this Font being missing wasn’t the issue.

After installing these fonts, magically the issue was solved.

’

Tuesday, 21 January 2014

Chrome v32.0.1700.76 - Dropdown Scrollbars not functioning – January 2014

I’ve noticed that, since the recent silent Chrome update to v32.0.1700.76, the Dropdown Scrollbars have stopped working. Turns out this is a widespread problem, but downloading the latest Chrome Beta V33 solves this issue.

This can be found here;

http://www.google.co.uk/intl/en/chrome/browser/beta.html

Tuesday, 1 October 2013

svchost.exe consumes 100% CPU on Windows XP, caused by Windows Updates

I reinstalled Windows XP on a clients PC recently, and came up against an issue where I couldn’t update Windows using Windows Update. I then noticed that the PC had slowed down to a crawl. Opening up Task Manager, Processes and Sorting by CPU, I found that svchost.exe was consuming 100% CPU.

I tried killing the process, and retrying the updates, but svchost.exe was back to 100% as soon as I did.

Having searched around multiple forums for a long time, I finally found a solution which sorted the problem;

Firstly, download Internet Explorer 8 for Windows XP - http://www.microsoft.com/en-gb/download/internet-explorer-8-details.aspx

Once that has downloaded, install the hotfix KB2870699 for IE8 - http://www.microsoft.com/en-us/download/details.aspx?id=40119

Hey presto, problem solved. You can now use Windows update and install the 300+ updates that are required!

Friday, 7 June 2013

SGEN: Mixed mode assembly is built against version 'v2.0.50727'…

I found while building an VB application in Visual Studio 2012, in release mode for the first time, that I was confronted with cryptic build error;
SGEN: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
After trawling through some Google results, I found the following post by Microsoft;

http://social.msdn.microsoft.com/Forums/en-US/clr/thread/2a5bf31e-df96-4bf1-a846-699da46b62fb

And also a couple of forums;

http://stackoverflow.com/questions/3749368/team-build-sgen-mixed-mode-assembly
http://social.msdn.microsoft.com/Forums/en-US/clr/thread/2a5bf31e-df96-4bf1-a846-699da46b62fb

Which suggests adding (or creating if it it doesn’t exist already) the following XML to the sgen.exe.config file;
<?xml version ="1.0"?>

<configuration>

    <startup useLegacyV2RuntimeActivationPolicy="true">

                <supportedRuntime version="v4.0" />

    </startup>   

</configuration>
For .Net 4.0 Projects, the sgen.exe.config file can be found at;
c:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools  (for x86 systems) 
c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools (for x64 systems)
For .Net 4.5 Projects, the sgen.exe.config file can be found at;
c:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools (for x86 systems) 
c:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools (for x64 systems)
Edit - 03-06-14:

For .Net 4.5.1 Projects, the sgen.exe.config file can be found at;
c:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.5.1 Tools (for x86 systems) 
c:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.5.1 Tools (for x64 systems)
Once I’d added the xml, the application built just fine.

The other alternative was to disable the option to Generate Serialization Assemblies in the offending project;

  • Project Settings for the offending Project
  • Compile Tab
  • Advance Compile Options Button
  • Set “Generate Serialization Assemblies” from “Auto” to “Off”

However, I recommend that you go with the XML option as suggested by Microsoft.

Wednesday, 8 May 2013

Unable to open Database .SQL Files in Visual Studio 2012 Update 1 and onwards

This morning I attempted to open a .SQL file in my Visual Studio 2012 Update 2 installation, and was faced with the following Message Box;

enter image description here

Clicking the “Learn more…” link took me to a “Page Not Found” page, which wasn’t very handy.

A quick search on StackOverflow and I found;

http://stackoverflow.com/questions/15798422/what-about-sql-server-data-tools-for-vs2012-being-incompatible-with-sql-server-2

With a helpful answer by JorgenH directing me to update the SQL Server Data Tools found at this page;

http://msdn.microsoft.com/en-us/jj650015

I downloaded and installed the SQL Server Data Tools, shown at Step 2, from;

http://go.microsoft.com/fwlink/?LinkID=274984

Hey presto, problem sorted!

Wednesday, 1 May 2013

SSRS 2008 R2 on Windows 8… Cannot log in

I recently installed SQl Server 2008 R2 with Advanced Services on a Windows 8 Box. However, when I tried to log into the ReportManager of SSRS, I found that it wouldn’t accept my Username and Password Combo.

After some searching, I found this poston Stack Overflow, which explained it nicely;

http://stackoverflow.com/questions/14433068/user-does-not-have-required-permissions-ssrs-2008-on-windows-8

Turns out, that as standard, the Administrator account isn’t active in Windows 8, and needs to be turned on. More annoyingly, this means that SSRS needs to be uninstalled, and reinstalled using the hidden Administrator account.

The steps I took to finally resolve were;

  1. Uninstall SSRS Node COMPLETELY by going to control panel>SQL Server 2008>Remove>Check Reporting Services
  2. Enable default admin account: command prompt>run as administrator>net user administrator, hit enter.
  3. New line: net user administrator /active:yes
  4. Reboot
  5. Logging in as default administrator
  6. Setup a Password of your Choice
  7. Reinstall the SSRS Node
  8. Install SP3 as administrator
  9. Go to IE.exe DIRECTLY in Windows 8: C:\Program Files\Internet Explorer\iexplore.exe>Run as administrator.
  10. Go to http:// (servername)/Reports
  11. You SHOULD now be able to finally see site settings. NOW YOU CAN FOLLOW everyone's directions of adding YOUR USER under site settings. Also go to folder permissions and add the user as a default here as well.
  12. (optional) For safety I would hide the default admin account now by using step 2 but substitute /active:no in.

SSRS 2008 R2 Reports are blank in Chrome

I stumbled across this apparently well documented problem today, where my SSRS 2008R2 Report was showing up fine in IE, but blank in Chrome;

http://stackoverflow.com/questions/5968082/ssrs-2008-r2-reports-are-blank-in-safari-and-chrome

It seems as though the main Div Tag uses IE compatible only Overflow styles, which Chrome doesn’t interpret well.

I found a nice blog post here which explained how to work around this issue;

http://grumpydba.blogspot.co.uk/2012/02/sql-2008-r2-report-doesnt-show-on.html

The Short and curlies of it are;

Connect to your Reporting Services server, and find the relevant ReportingServices.js file - this will probably be somewhere like "C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js", or on a 64 bit machine, "C:\Program Files (x86)\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js"


First up, take a copy of this file - let's not be silly here and assume this is a 100% foolproof solution!
Next, edit this file in notepad. Do a quick search for PageLoad, to ensure no-one else has already hacked applied this fix, then jump to the bottom of the existing text.
Simply append the following code:

function pageLoad() 
{
    var element = document.getElementById("ctl31_ctl10");
    if (element)
    {
        element.style.overflow = "visible";
    } 
}


Save the file, and restart Reporting Services - you should now find that Chrome displays your reports again.


You’ll need to find the correct ElementId, by viewing the Source of the report in Chrome. If you search for “VisibleReportContent”, you should find something like “VisibleReportContentctl31_ctl09”. Where the “ctl31_ctl09” is the ElementID you’re looking for!

Saturday, 22 December 2012

WPF Validation Adorners in Tab Control Disappear when Tabs Changed

I found recently than the Validation Error Adorners on my WPF Project when used within a Tab Control, would disappear if I changed tabs.

After a little searching, I found this helpful post;

http://karlshifflett.wordpress.com/2008/02/19/wpf-validation-errors-disappear-inside-tabcontrol-when-switching-tabitems/

You basically need to wrap your Tab Control Tab Content within a Adorner Decorator as follows;

<Border>      
    <AdornerDecorator>            
        <StackPanel>                  
            ...           
        </StackPanel>      
    </AdornerDecorator>
</Border>

This “bug” is due to the fact that the Error Adorners are painted on the Adorner Layer, which is discarded when changing tabs. The code above preserves this layer, preventing the Adorners from being lost.

Tuesday, 20 November 2012

SQL Server 2008 R2 Management Studio (SSMS) Open File Dialog slow

A quick tip if your SSMS is slow when using the Open File or Save File Dialog Boxes…. Disconnect any Network Shares which are unreachable.

Monday, 22 October 2012

WPF DataGrid CheckBox Column requires two clicks to change state

While using a WPF DataGrid and a CheckBox column I realised that it was taking two Mouse clicks to change the state of the CheckBox.

I found a good post by Mike Borozdin which explains how to work around this ‘issue’;

http://www.mikeborozdin.com/post/WPF-DataGrid-CheckBox-Single-Click-CheckingUnchecking.aspx

Basically, if instead of adding a CheckBox column, you add a TemplateColumn, and enclose a CheckBox within the DataTemplate, this works around the ‘issue’;

<DataGrid Name="dgProducts" AutoGenerateColumns="False" CurrentCellChanged="dgProducts_CurrentCellChanged">
    <DataGrid.Columns>
        <DataGridTextColumn Header="Name" Binding="{Binding Path=Name}"/>
        <DataGridTextColumn Header="Price" Binding="{Binding Path=Price}"/>
        <DataGridTemplateColumn Header="In Stock">
            <DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <CheckBox IsChecked="{Binding Path=IsInStock, UpdateSourceTrigger=PropertyChanged}">
                </DataTemplate>
            </DataGridTemplateColumn.CellTemplate>
        </DataGridTemplateColumn>
    </DataGrid.Columns>
</DataGrid>

Wednesday, 17 October 2012

Windows Forms App with Splash Screen Throws–“Invoke or BeginInvoke cannot be called on a control until the window handle has been created.” Exception

I’ve come across a bug in the .Net Framework when developing a Windows Forms app, which has a Splash Screen.

On some users machines, the application threw a “Invoke or BeginInvoke cannot be called on a control until the window handle has been created.” exception at startup.

This is seemingly to do with code executing before the splash screen has fully loaded. It appears that the exception happens just after startup and on slow or busy machines.

Microsoft have a workaround for this issue, which I found on the MSDN forums;

http://social.msdn.microsoft.com/Forums/en/winforms/thread/bdc00055-338d-4a4a-a881-14b242b83b83


Create a Boolean user setting “LoadFinished” and set it to be false.

In the Splash Screen load event add this to the start;

My.Settings.LoadFinished = False

and at the end of the event;


My.Settings.LoadFinished = True

In ApplicationEvents file add this;


Private Sub MyApplication_Startup(sender As Object, e _
As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs)_
Handles Me.Startup
 
            Try
                If Not Me.SplashScreen Is Nothing Then
                    While My.Settings.LoadFinished = False
                        System.Threading.Thread.Sleep(50)
                    End While
                End If
                My.Settings.LoadFinished = False
            Catch ex As Exception
                EmailError(ex)
            End Try
 
End Sub

In my solution, I also needed to enclose the above with the correct namespace and partial class construct;


Namespace My
    Partial Friend Class MyApplication
 
        Private Sub MyApplication_Startup(sender As Object, e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
            Try
                If Not Me.SplashScreen Is Nothing Then
                    While My.Settings.LoadFinished = False
                        System.Threading.Thread.Sleep(50)
                    End While
                End If
                My.Settings.LoadFinished = False
            Catch ex As Exception
 
            End Try
        End Sub
    End Class
    
End Namespace



Hope this helps somebody!

Tuesday, 25 September 2012

Command Line Parameter trailing backlash problem

I am currently working on a small console application which takes in a path name via the Command Line Parameters, parses the given path, and produces an XML file listing each folder and file.

I am running the application as a Post Build event in Visual Studio, passing in the $(TargetDir) macro as;

"c:\Program Files\CreateUpdateXML\CreateUpdateXML.exe" "$(TargetDir)\"

You’ll notice the extra trailing backslash after the Macro.

“Visual studio already adds a trailing backslash though!”

Yes… You’re right… However, a trailing backslash followed by quotation marks is converted to an Escape by Windows.

To work around this issue, you must escape the backslash, forcing windows to use it. This is achieved by simply adding another backslash to the path.

Sunday, 16 January 2011

.EndEdit causes row movement of a sorted BindingSource

When applying a sort to a Database BindingSource, executing the BindingSource.EndEdit method causes the currently selected row to change.

This has the effect of reloading any bound controls when tee edited row is saved, which of course can have unwanted effects if you need to operating on data related to the currently selected row after the EndEdit has been performed.

This issue can also be observed to a degree by selecting a row in a bound DataGrid, then choose the sorted column. It can be seen that the physical location of the selected row doesn’t change, however the previously selected row has now moved.

There are a number of ways to deal with the EndEdit issue, one of which  I found here…

http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/0878567a-ccb1-441b-a51d-3e014372e61b

Where we check the ListChanged event and the e.ListChangeType;

Private Sub bsBindingSource_ListChanged(ByVal sender As Object, ByVal e _

    As System.ComponentModel.ListChangedEventArgs) Handles _

    bsBindingSource.ListChanged

    If e.ListChangedType = _

        System.ComponentModel.ListChangedType.ItemMoved Then

        bsBindingSource.Position = e.NewIndex

    End If

End Sub

Another method is to store the current state of the form, i.e. editing, adding, duplicating, normal etc in an enum. then use the following code;

Private Sub bsBindingSource_ListChanged(ByVal sender As Object, ByVal e _

    As System.ComponentModel.ListChangedEventArgs) Handles _

    bsBindingSource.ListChanged

    If sttCurrentFormState = Normal Then

        bsBindingSource.Position = e.NewIndex

    End If

End Sub