So, I have a program which basically is just a video player. The main screen loads 19 small videos and plays them, you click one to play the whole thing in a bigger size. A client reported the videos are shown out of order ( this turned out not to be true ) and the app only runs once, and they have to reboot. Fact is, you need to start the app quickly when you boot, or it won't run. It gives a 'application is not responding' message, as far as I can tell, while some anti virus scans all the files. There ARE 19 of them, but they are VERY small. It seems to me that if windows is going to kill an application, it should do a better job of making sure the app is dead, instead of killing it.
Now, it IS true that my app works fine on Weven, so long as this anti virus is not present. But, it's not a great place to be in - 'my app works, but you have to remove your anti virus program'. I'm googling now for some way to tell Weven to give my app a bit more time to respond.
Tuesday, February 9, 2010
Tuesday, February 2, 2010
Weven compatibility
I finally bought Weven, to test our new installer. One of our new features is that you can select a logo and text message to put on the header of our PDFs that are emailed and printed. The way I do this, is that I create a handouts folder in the app data section where our config data is stored, and I create each PDF when it's requested, if it's not already there. When the user changes the settings, I delete them all. This works fine in Vista.
On Weven, it was throwing an exception ( the code then just delivers the unmodified PDF ). I posted about this in an online forum and was surprised to find a number of people are reporting trouble accessing the app data area in Vista and Weven. In fact, one person told me they store all app data under My Documents now, because it's the only place they can trust to get access to.
I did some more digging and my PDF library was causing the exception, when I try to load a PDF in a subfolder of my application. I replaced that by inserting a call to File.ReadAllBytes, so that it used that overload. I assume the library (it's Syncfusion, FWIW, and I found the library in general to be excellent, well documented and easy to use), is asking for full write access when given a path, and does not provide an overload to ask for read access only.
So, I solved my issue, but now I'm worried.
1 - Other developers have abandoned the appdata areas altogether because of problems with access ( which I assume means that the shadow directory, which is it's own nightmare ( imagine support calls that the app won't remember preferences, for example ) is not reliable, either). So, am I playing with fire by assuming that just because MY setup of Vista and Weven work now, that it will work on all machines ? Yes, I've logged in as a guest and tested that, etc. but still.....
2 - The Syncfusion code works in Vista but not in Weven ( I always use a default OS install and assume that's what most users have ). That means that Weven is even more strict in what it allows. I can see why my code should not be able to just write to files in the program files area, but surely anything in my app folder or a sub folder should be excepted from that rule ? I guess it's not, and that's why we need to use the app data area, but why was it working in Vista then ?
Is it possible that the people reporting issues have just made some sort of mistake ? Perhaps, but these are people I've known for a long time, and who I trust, and I doubt they moved all their app data to my documents without some serious testing to prove they had an issue. As I can write to files in that area, I can only assume that some combinations of settings in Vista and Weven make that impossible. Given what a fiasco Vista was from the start, I can't help but start with Weven feeling a little cautious and concerned. I lost my MS MVP for being critical of Vista, yet I hear sales people in computer stores all the time selling Weven by telling people that Vista was a nightmare, and Weven has fixed the problems, so it seems problems with Vista were widespread. I do think Microsoft just flat out mishanded that ( and I only complained in public because, despite being an 'MVP', I was given no other channels in which to talk about my concerns, and when I did find channels for other issues ( like VS bugs ), I was always ignored anyhow.
Has anyone else had any new security issues from moving to Weven ? Anyone had issues with access to the app data area ?
On Weven, it was throwing an exception ( the code then just delivers the unmodified PDF ). I posted about this in an online forum and was surprised to find a number of people are reporting trouble accessing the app data area in Vista and Weven. In fact, one person told me they store all app data under My Documents now, because it's the only place they can trust to get access to.
I did some more digging and my PDF library was causing the exception, when I try to load a PDF in a subfolder of my application. I replaced that by inserting a call to File.ReadAllBytes, so that it used that overload. I assume the library (it's Syncfusion, FWIW, and I found the library in general to be excellent, well documented and easy to use), is asking for full write access when given a path, and does not provide an overload to ask for read access only.
So, I solved my issue, but now I'm worried.
1 - Other developers have abandoned the appdata areas altogether because of problems with access ( which I assume means that the shadow directory, which is it's own nightmare ( imagine support calls that the app won't remember preferences, for example ) is not reliable, either). So, am I playing with fire by assuming that just because MY setup of Vista and Weven work now, that it will work on all machines ? Yes, I've logged in as a guest and tested that, etc. but still.....
2 - The Syncfusion code works in Vista but not in Weven ( I always use a default OS install and assume that's what most users have ). That means that Weven is even more strict in what it allows. I can see why my code should not be able to just write to files in the program files area, but surely anything in my app folder or a sub folder should be excepted from that rule ? I guess it's not, and that's why we need to use the app data area, but why was it working in Vista then ?
Is it possible that the people reporting issues have just made some sort of mistake ? Perhaps, but these are people I've known for a long time, and who I trust, and I doubt they moved all their app data to my documents without some serious testing to prove they had an issue. As I can write to files in that area, I can only assume that some combinations of settings in Vista and Weven make that impossible. Given what a fiasco Vista was from the start, I can't help but start with Weven feeling a little cautious and concerned. I lost my MS MVP for being critical of Vista, yet I hear sales people in computer stores all the time selling Weven by telling people that Vista was a nightmare, and Weven has fixed the problems, so it seems problems with Vista were widespread. I do think Microsoft just flat out mishanded that ( and I only complained in public because, despite being an 'MVP', I was given no other channels in which to talk about my concerns, and when I did find channels for other issues ( like VS bugs ), I was always ignored anyhow.
Has anyone else had any new security issues from moving to Weven ? Anyone had issues with access to the app data area ?
Thursday, January 28, 2010
Plug and pray
Remember when plug and play was going to solve all of our driver issues ? Yeah, that was a good one, right ? What has me beat, I have a Microsoft webcam, a year or two old, not sure where the CD is, so I figure I'll ask windows to find the driver for me. It can't. Now, if I bought some dodgy Chinese made $10 camera, that would make sense to me. But if the functionality doesn't work for Microsoft hardware, how can it claim to work at all, and why does it even bother me every time I plug something in, when it's never in my life actually found and downloaded a driver for me ?
Saturday, January 23, 2010
Autosave
Does VS have any sort of autosave feature ? I'm not sure, but it should if it doesn't. I just added a window to my application. I got the usual message in the designer about not being able to parse a value into a DateTime. The only place my code uses any DateTime values, is in the Licensing, which is turned off by a macro in debug builds, and is not in any way called by anything that relates to the vanilla window I just created. I attached a second instance of VS to try to debug this message, but it doesn't catch it. So, if any of my code is causing this ( and it surely must be ), it is in a way far too esoteric and bizarre to be something that I could ever hope to debug and resolve. So, I spent an hour working on code, then I checked my mail, and got a debugger message that visual studio had crashed. All my work is lost. I guess I should hit save every few minutes, knowing how unstable Visual Studio is, but it's always a hard lesson to learn, that I expected it to be able to sit idle for a moment, and it just couldn't do it.
Tuesday, January 19, 2010
Intellisense
For reasons that I cannot understand, intellisense stops working frequently in VS for me. Now, I am not sure if how much it happens to me nowadays has to do with how quickly the VS designer breaks. My WPF project, which does no work with date times, anywhere, rarely will show a preview of my XAML, and if I get a meaningful error, it's 'cannot convert value to DateTime'. However, it's now starting to actually tell me that all the objects in my code behind do not exist, if they are defined in the XAML. So, I have to code blind, where usually I use prefixes like txt and lbl and then intellisense helps me find the control I want. Now, as I code, I am told that InitializeComponent does not exist, and my variables do not exist, either. Of course, when I do a build, it builds and runs fine.
Monday, January 18, 2010
Searching open documents in Visual Studio
Every now and again, I forget not to use an option that is fundamentally broken in a program. For example, just now, I decided to search 'Open Documents' in VS2008. I have two issues with this option. The first is that if I select it, all of the files that I have open are brought to the foreground as it searches, which both must slow things down a lot ( as surely rendering a screen of text is more work than scanning it for a word ) and leaves me with my documents all out of order from when I started. The second issue is, I just did a search for something that I knew was in an open document and no-where else. The find box, when I stopped the search, contained 10 matches. All the same line of code in the same file. I have 10 documents open, so I expect that means that it found the same match once for every document that it looked at, including the 9 that did not contain this text. One way or another, searching inside open documents only using visual studio is useless, and fundamentally broken. Who turned this code in ? Did someone write a use case that said this was what was supposed to happen ? I mean, I guess anything is possible....
Tuesday, December 22, 2009
Vista is stupid
Two things I noticed today. First of all, if I copy a file onto a memory stick, it checks if there's enough space for the file BEFORE working out if it's going to be overwriting an existing file. So it tells me I don't have enough space, until I manually delete the old copy that I wanted to overwrite.
The other thing, which has annoyed me forever, is that the details view in explorer seems to always default to a view that's designed for media files, even if there are none in the folder. So when I do a search, I get a view that shows me Artist, Album, Genre, as if the only thing I'd ever search for is mp3s. I was searching for a .cfg file, as it happens. The date the file was modified, which is to me the thing I need most when I search for a file, as I'll often find many copies and want the latest one, is not there. Sure, I can right click and add it, and I do, EVERY TIME, but why not remember my preference, or give me a sane preference, based on the type of files found perhaps ?
The other thing, which has annoyed me forever, is that the details view in explorer seems to always default to a view that's designed for media files, even if there are none in the folder. So when I do a search, I get a view that shows me Artist, Album, Genre, as if the only thing I'd ever search for is mp3s. I was searching for a .cfg file, as it happens. The date the file was modified, which is to me the thing I need most when I search for a file, as I'll often find many copies and want the latest one, is not there. Sure, I can right click and add it, and I do, EVERY TIME, but why not remember my preference, or give me a sane preference, based on the type of files found perhaps ?
Subscribe to:
Posts (Atom)