Author |
Message |
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | The mystery of the missing bug
I was working on the next version of OverviewCheck. I had tested about a dozen overviews, then I backed up to the first to watch them again, when - to my great surprise - every other overview came up blank. I did a little basic debugging, but found nothing that immediately stood out. Since the deconstructing of the overviews involve some rather complicated routines, I decided to go back to the previous version to see if the bug was there as well. It would be easier if I know for sure that it was caused by something I just had added.
Well, the previous version worked quite well, so I went back to my development version to dig deeper into the code. But now everything worked OK in this one as well! Try as I might I could not reproduce the problem again. This bugged (!) me no end. Seeing a problem and then not being able to reproduce it is so frustrating. Especially such a weird problem. I cannot fathom what could cause a flip-flopping like that.
There is of course the minute possibility that the problem isn't in my code at all, but some anomaly in Visual Studio when the program is run within Visual Studio. But that's extremely unlikely.
Since I can't reproduce it, I am still not 100% sure that it doesn't exist in the currently released version. If anyone experiences this problem in the current version (or in the next one, when it is released), I would surely like to hear about it. And if possible what lead up to the problem. This is a puzzler that I really would like to figure out! | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Oh no ... its me again. Not seeing your code, of course any guesses would be a total shot in the dark on my part. But in general, whenever I had some really weird behavior like that, it was often due to timing issues with background threads, or an accidental multiple or missing calls to a handler. You can also get strange "holes" on your code flow from a misplaced try / catch that suppresses an incorrectly handled error.
As before, of course you know all of that - just trying to spark an idea. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | As always - thanks for your input, mediadogg! No background threads except when loading the XML, so that's not it. All error handling is routed to the same place, popping my custom error window, so unlikely problem. I use a MZTools macro to insert try/catch code, where the catch code is just a call to a shared (static) subroutine in my error handling class. So all error catching should work the same. The weird thing was that it was not at all random. Exactly every other review came up blank. I'm officially stumped. | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | Version 3.3 introduces "greenlining" When I was reviewing the overviews in my collection I found that sometimes all the unrecognized names would tend to obscure the real spelling mistakes. I have tried to rectify this by identifying probable names by capitalization, and underlining unrecognized names in green instead of red. This is far from an exact science. I never greenline words at the start of a sentence, because those words should always be capitalized. I also never greenline uppercase words - impossible to tell if they are names. Of course, some words may be capitalized without being names, especially titles of movies, plays etc. Start of sentence is defined as anything coming after a period, exclamation mark or question mark. This means that a name like "Dr. Acula" will not be recognized as a name. The whole idea, though, is to focus first on the words underlined in red, and second on the ones underlined in green. Don't skip looking at the "greenies", though. If you don't like the greenlining, you can turn it off in Settings. Minor fixes in this release:- Genitives (words ending in 's) are spellchecked by their base word. - Edits in the language list are now activated without having to restart the program. - Verified.txt is not created on exit unless there actually are verified profiles. | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | Another update, again?Ah, yes. Somehow my brain seems to start working overtime after I release a version. I realized that unrecognized words that occur more than once probably are not misspelled. So I have chosen to underline them in orange. All to put the main focus on the most likely suspect words. But remember that even repeated words can be misspelled. I have seen it happen. So this is now version 3.4.0. And the help file has been updated. | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | Here's a problem that almost drove me crazy.How the feck can half a word be misspelled? I opened the XML file in Notepad. It actually showed as "tech-nology". Hm? Why does the program not show the hyphen, and why does it seem to split the word at the hyphen when it isn't supposed to? It works eslewhere - I thought. (Yes, it does) It took me quite some time and a lot of digging before I came upon the answer. It's a bloody soft hyphen! I have no effin idea how you create a soft hyphen in an overview. My best guess is that whoever wrote it did it in a word processor and copied it into Profiler. Thanks! There went most of my Saturday afternoon ... | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | The flip-flop bug revealedI just found the reason for the flip-flopping overview "bug". Basically it has to do with how events are handled in WPF. If you catch an event like KeyDown and do something - like reading in the next profile - WPF will still continue processing the event unless you tell it differently. So Right Arrow will do whatever Right Arrow does. If the keyboard focus is on the RichTextBox that displays the overview, the new overview will load, moving the keyboard cursor to the start, and then the cursor will move one character to the right. And that's fine. You probably won't even notice it. However, if the focus should for some reason be on the Overview tab itself, something entirely different happens. The focus moves to the next tab. And that switches the tabs so the Notes tab is shown. And unless you've made any notes, it will be a blank tab. So I saw the new cover image come up in the right half of the window, and saw the left half of the window go blank. I didn't notice that it was no longer the Overview tab, but rather the Notes tab. And of course pressing the Right Arrow again would switch it back to the Overview tab. DOH!So, it's not so much a bug as it is unwanted behavior. If I had just been a tiny bit more observant when it happened, I could so easily have prevented it. Double DOH! | | | My freeware tools for DVD Profiler users. Gunnar | | | Last edited: by GSyren |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | I suspected it was in a handler. Tricky stuff. A couple of things I do:
- Experiment with with using Key Up instead of Key Down. That way, a text box change, for example, will have been committed - Use EndEdit() on relevant controls to force the change before using the value - On entry to any handler, temporarily disable all handlers that might cause trouble, then re enable after doing your work
That latter tip has saved me masses of trouble. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | Thanks mediadogg, but since this is WPF, the simple solution is e.handled = True after doing the work in the handler. Setting isTabStop to False for the TabItems would also have avoided the problem. But 20/20 hindsight is always easy. | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,461 |
| Posted: | | | | Quoting GSyren: Quote: Thanks mediadogg, but since this is WPF, the simple solution is e.handled = True after doing the work in the handler.
Setting isTabStop to False for the TabItems would also have avoided the problem. But 20/20 hindsight is always easy. Guess I need to look at WPF. I don't see why e.handled = true would solve the issues that I mentioned. For example, if you are inside a "Text Changed" handler, and you write text to that same text box (or do something else which causes the text to change), what stops that handler from being re-entered? Seems like it would defeat the purpose. But again, I don't know WPF. Maybe I should. Might save me some grief. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | Quoting mediadogg: Quote: I don't see why e.handled = true would solve the issues that I mentioned. Ah, no, what I meant was that it was the way to solve my problem. Quote: I don't know WPF. Maybe I should. Well, there is definitely a learning curve going from WinForms to WPF. But I definitely feel that it's worth it. I made the switch many years ago, and I have never gone back to WinForms. | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | The last version of OverviewCheck? Probably!Since almost all the features in OverviewCheck have been prompted by my needs (except the one requested by Surfeur51), now that I have checked my entire collection (c:a 7500 profiles - whew!) I guess there won't be any need for more. The last feature that I added was Font Size in settings. I wanted to sit back and get a good look at the overviews so I could see the problems more clearly. Getting old, and the eyesight isn't quite what it has been. I also fixed it so the flip-flop problem cannot occur. So that's version 3.5.0. No need for more features? Well, feel free to prove me wrong, if you feel OverviewCheck is missing something. (Does the headline on this post sound like a Danish beer commersial? Probably!) | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 19, 2007 | Reputation: | Posts: 6,018 |
| Posted: | | | | That's one more great little project under your belt, Gunnar! Congratulations! But you do need to tell us more about Danish beer commercials! |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| Posted: | | | | Quoting dee1959jay: Quote: That's one more great little project under your belt, Gunnar! Congratulations!
But you do need to tell us more about Danish beer commercials! You haven't seen Mads Mikkelsen plugging Carlsberg? | | | My freeware tools for DVD Profiler users. Gunnar |
|
Registered: March 19, 2007 | Reputation: | Posts: 6,018 |
| Posted: | | | | Nope. never saw that one - probably it's not being used over here. But I get it now. Nicely done, by the way. Although... Carlsberg: best beer in the world? You and I know better. |
|
Registered: March 14, 2007 | Reputation: | Posts: 4,678 |
| |