topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday November 11, 2025, 6:23 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 10 11 12 13 14 [15] 16 17 18 19 20 ... 23next
351
Living Room / Re: Is pranking Josh unfair?
« Last post by worstje on January 26, 2011, 09:42 PM »
Depends. Does it come with lifetime pranking upgrades?
352
N.A.N.Y. 2011 / Re: NANY MUGs
« Last post by worstje on January 26, 2011, 04:01 PM »
Awesome. I already have myself an awesome set of mugs (one for each nany app :D) and they are glorious!

All hail the NANY! All hail the mouser! All hail our DoCo! :-*
353
General Software Discussion / Re: C gibberish <-> English
« Last post by worstje on January 26, 2011, 03:12 PM »
So where's the C gibberish <-> English <-> Real English translator? :D
354
N.A.N.Y. 2011 / Re: NANY 2011 Release: JottiQ
« Last post by worstje on January 26, 2011, 07:09 AM »
Well, that is just a great bucket of poppycock. >:( I hate you, .NET framework.

Would either you or p1m35 be willing to run another testbuild? The code I removed, while not essential, is nice-to-have and present in about 5 other places where it apparently causes no crashes at all for you, and that confuses the hell outta me. I'd hate to release another version while I don't understand why this fixed it: by my logic it should still crash for you on the main screen, settings screen or the about box, and apparently it does not.

Another test build - the final one I'll ask you to test, promise. :)

355
N.A.N.Y. 2011 / Re: NANY 2011 Release: JottiQ
« Last post by worstje on January 25, 2011, 04:54 PM »
Yeah I heard from p1m35 that it didn't solve the issue for him either earlier today. :(

Sadly, the stuff happens inside .NET, and as long as I can't reproduce it or have access to a system to try and reproduce the issue on it is very damn annoying to try and figure the bug out.

Try this build. It will either 'fix' it because I removed some code just now out of desperation, or it will throw out some (hopefully extra-nice errors) to help me try and find the problem. Or it will throw out the exact same stracktrace.
356
Ah, great naps are great. :D

You probably want to try to use the ProcessReference class mentioned in these articles. While I am not 100% sure it will work, I am very hopeful.

Reading a contract from the other side: SHSetInstanceExplorer and SHGetInstanceExplorer
Simulating a drop, part two

I had to use it in order to get certain popup commands to work in Cautomaton, since Cautomaton has a habit of closing immediately. Your app would be the same, so instead you want to make sure to keep running till the window gets closed. :)

If you are unsure how to use it, let me know and I can probably whip out my Cautomaton code as an example (although it doesn't really change compared to the code in those links.)
357
Stoic Joker, does whatever you use to call the window open it asynchronously on its own thread, inside of your process? E.g. does your message loop actually matter and do stuff, or could you have used a Sleep(10000) and still have stuff basically function till the loop runs out and kills the app after 10s? In that case I might have a solution as I already bumped into such a problem once in the past.
358
N.A.N.Y. 2011 / Re: Major feature instead of new up for NANY?
« Last post by worstje on January 24, 2011, 06:57 PM »
Should NANY encompass any NEW apps made during the previous year.

It is somewhat illogical to think that someone who has released 10 coding snacks over the course of the year might not enter NANY just because their programs were released a month earlier as a NANY.

So one proposed change would be to say that NANY celebrates new applications released in the past year, regardless of when.

As much as I understand the logic, I say no. I have found that NANY brings DoCo together in a way that regular coding snacks do not seem to do. The IRC channel got busier (or well, at least I became a frequent visitor), people offer to help one another out, we test eachothers stuff, and so forth. In comparison coding snacks are usually a bit of a one-on-one operation with a requester who tests and the one obliging and serving the snack.
359
Sounds like a sort of mixup of various games. Mario, The Incredible Machine, Lemmings, what am I missing?
360
Yeah. Website and such will stay up, but to my knowledge FTP is turned off and SQL if you use that might or might not end up losing some data incurred between the time of backups and the sorts. Or so I understood from Gothi[c] in irc when I asked.
361
I've been unable to connect to my DC FTP account since 1/21.  Tried it again a few minutes ago.  Is this related to the server problem?  Not a problem, since I can back up my files to my other site.  Just curious.

See: moving DCMembers.com to the new server
362
N.A.N.Y. 2011 / Re: NANY 2011 Release: JottiQ
« Last post by worstje on January 23, 2011, 02:12 AM »
Thanks for the link. :)

What really excited me is the option to scan running processes.
-ILoveFreeSoftware

I have a feeling that is a common opinion, yet it is the buggiest feature there is in JottiQ to the point I'm thinking of removing it. JottiQ v1.1.0 might end up losing me a lot of users if I end up going that route. :D
363
Finished Programs / Re: ZIP to PHP converter
« Last post by worstje on January 22, 2011, 11:09 AM »
It could very well be a limitation from the server administrator. They can define how much memory php scripts can use, and if you have a large zip file I can imagine that amount gets exceeded. Especially when you use the stronger forms of compression as those take more memory to decompress as well. Maybe you can work around it by compressing the zip file a bit less?
364
Developer's Corner / Re: Skynet meets the Swarm: A fascinating article about AI.
« Last post by worstje on January 22, 2011, 02:41 AM »
I personally disagree. I don't play and love watching it. The biggest problem I think people face is that they do not know the units, thus can't see all the tactics going on even if there's a good commentator. Compare it to watching tennis without knowing the scoring system, which is pretty confusing, or golf, or baseball. The less you know of the rules, the more it will just look like something hitting a ball around that you can barely see on the screen. The more you watch, the more you know there's far more to it than just the ball itself.
365
Living Room / Re: ARTICLE: How not to change a licensing model
« Last post by worstje on January 21, 2011, 12:07 PM »
That's a disgusting practice. I read through those comments and they made me sick. It's all in the way they handle their customers; I can understand getting rid of the lifetime updates, but you don't treat the customers who bought your software in at least the last year like that. Nor do you get to be all sneaky and try to force upgrades, make your support people misrepresent the fact there's a free upgrade for very recent customers, and all that jazz. Bah.
366
Developer's Corner / Re: C# GDI+ Problem with byte[] and Bitmap - Memory Issues
« Last post by worstje on January 21, 2011, 11:01 AM »
My current pains actually involve BitmapFrame classes, so unless that isn't used by WinForms either, you might be up for some pain yet. It is a tried and true disaster, yessir. :( For now, I'd be happy enough to be rid of the crashes.

Edit:

Does the Bitmap.FromFile() call (or whatever) happen to use the System.Windows.Media.Imaging namespace? I think that one is WPF specific, but if it does there might be a solution in there. (I've been hating that one more than plenty so far.)
367
Developer's Corner / Re: C# GDI+ Problem with byte[] and Bitmap - Memory Issues
« Last post by worstje on January 21, 2011, 10:48 AM »
Touche. :) I tip my hat to you, good sir.
368
N.A.N.Y. 2011 / Re: NANY 2011 Release: JottiQ
« Last post by worstje on January 21, 2011, 10:34 AM »
pr1m35, it sounds like you might suffer the same issue jCat reported a few days ago. If you look on the previous page, only a few hours ago I posted a 1.0.3 test-build that might solve the issue. Can you test that one and report whether it fixes the issue?

In the case it does not fix the issue, can you per chance check your Event log, Application tab, and paste the stack trace? Hopefully yours is going to be a bit more useful that jCat, regardless of them being the actual same thing.
369
Developer's Corner / Re: C# GDI+ Problem with byte[] and Bitmap - Memory Issues
« Last post by worstje on January 21, 2011, 05:39 AM »
Random and not very (but still somewhat) relevant: don't use .NET if you are developing an application with XP as a supported OS. You'll regret it and regret it and regret it even more.

There's so many bugs in the .NET implementation for XP (or whatever system components it uses) that you spend crappy oodles of time figuring out why the hell you get random-as-hell crashes with totally useless stacktraces and shit.

I bet that at some point, Vista and the likes will head into the same general direction after W8 comes out. :(
370
N.A.N.Y. 2011 / Re: NANY 2011 Release: JottiQ
« Last post by worstje on January 21, 2011, 05:24 AM »
I might have joyous news for all... or a huge disappointment. :tellme:

The attached file should fix the About box crash, and very hopefully it also fixes jCat's crash upon starting. I am very interested in hearing how it works out for all people with problems (especially jCat as I cannot reproduce his particular usecase). To test it just replace your JottiQ.exe with the one inside the archive and run as usual.

If this test build fixes the issues, I will likely soon release an official v1.0.3 with one or two more minor tweaks but no changes feature-wise. There's plans for new features, but they are being saved up for a v1.1.0.
371
N.A.N.Y. 2011 / Re: NANY 2011 Release: JottiQ
« Last post by worstje on January 21, 2011, 02:39 AM »
Ok, I dug into the stuff jCat gave me but can't really find anything that is wrong. The buffer overflows are apparently pretty normal - Windows causes them tons, and it is mostly a side-effect of its internal workings as some blogs of Mark Russinovich explained to me. I did some further digging into the guts of the .NET framework, and while I can't find the cause just yet most signs seem to point towards it indeed being a font issue. 9/10 references to (=uses of) that FileFormatException are in code that deals with fonts. I'll try to keep looking tho - for now I'm gonna see if I can find my laptop somewhat at all. :)
372
N.A.N.Y. 2011 / Re: NANY 2011 Release: JottiQ
« Last post by worstje on January 21, 2011, 12:58 AM »
Hi worstje,

Sorry for the delay ... I found some time only today and ran ProcMon

I didn't fing anything "bad" related to fonts, but to my surprise there are many (I mean a lot! of) "Buffer Overflow" Errors.

I saved reports in <>.XML and native <>.PML formats. The files are 69MB and 95MB respectively
I'll try to attach the latter archived ~5MB , but if that fails you can tell where to upload in case you need whole report.

In addition attached are just few examples of those Error entries and respective exports from the Registry (suffixes ".txt" were deliberately added to the ".reg" extension)

Cheers!

Thanks, I'll go dig into those! :) Buffer overflows do sound surprising as (last I knew) the code it crashed in wasn't mine, and I tend to be rather careful where buffers are concerned.

Hi worstje,
I stumbled upon a small JottiQ-bug: I can make JottiQ crash by opening/closing the About box several times.
I'm running the latest version on my laptop running Windows XP SP3.

Kind regards and keep up the good work

Hmm, I can't reproduce it on W7 64-bit either. I've opened the About box like 50 times in a row just now and could not repeat it. Skwire, do you use WXP SP3 as well? I'll give it a test-run later. I suspect the icon stuff is causing these crashes again, although I am pretty sure I hard-coded that stuff. Hmm.

Is there anyone who can reproduce the crash who can give me the stack trace and such as it ends up in the Windows Event log? I gave pointers to the exact place to find it up there when trying to deal with that other crashy behaviour.
373
Developer's Corner / Re: Rock physics math-thing [PHP]
« Last post by worstje on January 20, 2011, 12:37 PM »
That one is so simple and so standard I actually redid the math twice to make sure I wasn't getting it wrong (you implied something like challenging and that it is about sharp wits, and I'm afraid it ranks nowhere close to that for me. 8))
374
N.A.N.Y. 2011 / Re: NANY Techniques, Tributes and Tribulations
« Last post by worstje on January 20, 2011, 11:23 AM »
Seeing how you ask so nicely, I'll oblige for both my applications.

JottiQ

How Why was the NANY application coded?
In my free time. But seriously - I edited this a few times now since what I thought it meant ended coming up in later questions. :D I think you might need to clarify what you mean. Nevermind, long posts mean others beat me to that horse.

I always loved Jotti's malware scan and felt it didn't get the praise or attention it deserves. To boot, it's a pain in the arse to use to the point where I often don't bother and just take a risk when I'm in a crabby enough mood where otherwise I might Jotti-19-check it to be safe.

What IDE did you use, if any?
Microsoft Visual Studio 2010.

What language(s) is the application written in?
The main application was developed in C#. It is based on the Windows Presentation Foundation (WPF) framework because I wanted to learn how it works. The end result targets the .NET framework v4 and can work fine with just the Client Profile installation (which is basically a Lite version with less features that's featureful enough for these purposes.)

The shell extensions for 32-bit and 64-bit were developed in C++.

Does it rely on any 3rd party libraries / code / graphics?
I used a lot of sources on the internet for my development. I took some public domain code as bases for things I knew how to generally do but knew I would mess up if I fully reinvented the wheel. However, the only libraries/assemblies it uses are all standard Microsoft related stuff. The only images used are vlastimil's custom-made lady bug, and a free-to-use magnifying glass by a dude whose name I can't possibly remember, so if you want that look in the Readme or About box. And there's the Silk icon set by FamFamFam, which are also great and yet so easy to forget. :)

Were any clever design principles used?
There aren't any particularly clever design principles. As I never really use threading in other apps, I had to reacquaint myself with all the proper knowledge, and C# just has so many classes for so many different situations that I ended up getting lost in them. Sure, there's tutorials on what classes are good for what situation and simple examples, none of them really matched my situation. In the end, I ended up bastardizing some example, rewriting it and generally making a mess of it for as far most C# programmers would be concerned. But it functions well enough.

Or any really hairy algorithms that you'd like to boast about?
Plenty.

  • One might notice how JottiQ tends to remain stuck on 'Awaiting further processing' for some items. This is because at one point in time, it seemed useful to optimize in speed and in the general case one would expect most of the time spent processing an item to be inside the uploading or result-requesting process. Yet the caching mechanism requires the calculation of hashes and those can take several (gasp) seconds, which is a disk IO and CPU bound process as opposed to networkbound. So, in order to minimize wasted seconds, right as the more time-consuming tasks take place, an extra thread is kicked off to pre-emptively calculate the hashes of the first fully unprocessed object. That way, once some item is completed, it can move right-up with the rest of the network-related activities, ensuring most efficient ('maximum') use out of your internet connection. Of course, in the end it turned out JottiQ became so popular that most time is now spent waiting for Jotti's malware scan to give you permission to upload... :D A future version is going to need tweaking for the sort of situation where JMS is overloaded - I want it to process cached items first in those cases without canceling the non-cached ones (as it does now). I wasn't able to hack that in thus far as I need the time... and as it is now, stuff is functional and usable enough that I'm just biding my time, collecting feature requests and studying other general issues that come up.
  • Displaying an icon in a popup menu is hell. Thankfully, I am not supporting anything pre-XP, but even as it is, I had to take care of several different approaches. First of all, one has to convert an icon to an image. Second, the actual displaying is different for each OS, with different gotchas and ugly glitches. The very old, original method of adding an image to a menu item is from the Win3.1 era and W95.

    For example, the XP method will turn any Vista+ machine into having the most ugly horrifying XP-style menus (some sort of compatibility downgrading involving Aero), or has a tendency to make it an ugly aliased pain (assuming you get the background to be transparent at all, which was a frustration on its own. 'Yeeaah I did it... wait, no, crap, it is a slightly different bg color than all the other icons!' :(). For those who know a bit more about the details, this method involves custom-drawing the icon, and apparently Windows 98 (or maybe 2000) had an ugly bug involving that. But as I said above, that is something I could thankfully ignore. Oh, and I need to make sure the icon fits on the line, too. And some really short sentence involving the IContextMenu3 interface got overlooked, which is why TotalCommander and other programs had a habit of crashing when JottiQ was in the menu.

    The Vista+ method goes back to the roots, and uses the old original method of adding an image to a menu item. But of course it can't be simple. It takes a MSDN page (full with oodles and oodles of code) with custom processing of the image to pre-multiply alpha levels and do some other magic-fu in order to get the icon drawn properly with its proper alpha transparency. Then throw in that for good performance it needs to make some calls to the theming engine, but said calls don't exist on XP, so I have to load those dynamically, and.... well, it's a pain.

    I'm half tempted to throw up an example project at some point in time, since even with the example project I used as a base (and it was pretty good!) I had to do so much tinkering just to get an icon to show up properly that I think it could save people a lot of time in the future. But I'd need time for that which I do not have at present.
  • Why code something custom for the context menu in the first place rather than just dumping an entry in the registry? One reason, and one reason alone: placement. Windows puts stuff 'fully defined' in the registry at the far top of the context menu, in the same sort of spot as the usual Open, Explore, etc commands. The stuff that is really specific to this sort of file. But JottiQ is an entry you'd find in all files, and not a specific action for that file. Over the years, people (or at least I have) come to expect that the more general stuff that applies not specifically to this sort of file comes lower in the popup menu where it is out of the way. And I simply could not meet that simple requirement through the registry alone, since if I could I'd never have written the context menu shell extension in the first place. :(

What was the trickiest part?
Windows XP and the .NET WPF framework. And cranioscopical by proxy. :o

WPF and .NET have so many bloody annoying bugs or visual glitches on XP, it makes it a real pain. Let's see what I can remember off the bat...

  • .NET on XP simply crashes hard upon accessing a high-resolution, Vista-era icon of I think 128x128 dimensions or higher. This is why the faded lady bug is missing on XP.
  • Thus, since WPF could not properly determine the right icon to load for my aboutbox, I figured I would do the looping myself based on meta-properties, which should be safe enough. But it did not work. Why? Because the meta-properties are also BUGGED on _all_ platforms and always saying one of those png-encoded icon sizes has all the bitdepth and colors in the world. Thus, my code would spit out ugly 16 color dithered icons, or some other variety.
  • In the end, I ended up hardcoding the internal frame index for the proper icon size with the proper bit depth and alpha channels for those places that used a small icon. I'm sad if it looks ugly for people on crappy displays, but .NET forced my hand.
  • WPF as a whole is a nightmare. Just once you think you figure some of that XAML stuff out, and need to make one last tweak, you find out it isn't possible and end up reading a few hours to try and make an attempt for a different method of doing things. (That bloody lady bug put me through so much pain, as did that toolbar, as did that bloody UAC shield, as did that ugly white background on XP...)
  • WPF is meant to deal with different DPI settings. But it doesn't deal well with specially changed font sizes on its own. In the end, I figured out the general trick to playing nice with that sort of stuff, but it was by trial and error as opposed to documentation pointing me to it. (And trust me I looked.)
  • Oh, and a golden oldie that I almost forgot about as it was one of my first frustrations. Of course there's the matter of images being fuzzy and fonts being fuzzy. The second tends to show itself as being an easy fix with the SnapToPixels property, but the other takes a fix that is new to .NET v4 (yes, WPF could not display fonts nice and crisp until now) and was hell to find. In general: avoid WPF if you want your UI to blend in real well with the rest of your apps.

Would you like to make a mention of any other DC members who helped out?
Ath for the installer and relentless testing on different OSes, cranioscopical for crashing JottiQ on XP and throwing it through the wrangler with his odd fonts, vlastimil for the awesome icon.


I'll do Cautomaton when I feel like it - I spent way more time on this one than expected.

Edit: Holy turd that's a far longer post than I thought. I guess I wanted to vent about .NET and WPF a bit more than I thought. :-[
375
Developer's Corner / Re: C# GDI+ Problem with byte[] and Bitmap - Memory Issues
« Last post by worstje on January 20, 2011, 09:41 AM »
Is it indeed Win2003 or WinXP you are devving on? Otherwise, that problem you just linked to wouldn't even be related. (Sorry if you posted it somewhere up there; I didn't notice it.)
Pages: prev1 ... 10 11 12 13 14 [15] 16 17 18 19 20 ... 23next