Archive for the ‘bugs’ Category

Bugzilla: Email::MIME::Modifier module is missing

Saturday, April 11th, 2009

I have recently update FreeBSD system and have encountered a problem with Bugzilla 3.2.2 and perl 5.8.9

After running checksetup.pl I’ve got the message, that required module Email::MIME::Modifier is missing and script suggested me to install it with the following command:

/usr/bin/perl -MCPAN -e ‘install “Email::MIME::Modifier”‘

I did it several times, but nothing happened. After some digging I found that the real culprit is a missing dependency from Email::MIME::Modifier to Email::MessageId.

So, you have to run the following command:

/usr/bin/perl -MCPAN -e ‘install “Email::MessageID”‘

or I prefer to use ports:
mail/p5-Email-MessageID

And everything will be just fine.

FlexBuilder.ini is ignored under Vista

Wednesday, January 21st, 2009

Just bumped into another nasty bug. FlexBuilder under Vista ignores C:\Program Files\Adobe\Flex Builder 3\FlexBuilder.ini file.

It seems like due to Vista “smarts” with user directories, compatibility issues and general MS idiocy FlexBuilder have no idea where to pick up the FlexBuilder.ini file. It works perfectly well on XP, but not on Vista.
It also grabs all default JVM parameters twice for some reason. Kind of an Irish approach 🙂

Bug is submitted.

Flex popup window disappears if x or y becomes negative number with fraction

Tuesday, December 9th, 2008

There is a strange glitch in the Flex SDK – if you center PopUp window by yourself, then you should check that x & y properties are always casted to integer values.

If x or y coordinate becomes negative number with fraction, the whole popup window disappears.  This is strange as positive numbers with fraction are valid. And what is most frustrative, DesignView sets them with fractional parts when you re-arrange elements. 

 

UPD: bug submitted

TortoiseSVN uses root account to check-in

Friday, November 28th, 2008

Normally I prefer the command line tools over the tools with GUI. CLI usually means that interface is clear, simple and it could be wrapped up in the script and run automatically.

I worked with all mainstream source control systems, but Subversion is the one which still puzzles me after a year of use.  That’s why I prefer to use TortoiseSVN, which seems to me really great thing (not the Subversion itself though). It’s a pity that it exists only in Windows version.

Anyhow, I was trying to understand why when I’ve got source tree checked out under my username, TortoiseSVN checks in modifications using root account, instead of my username. Subclipse does not have this problem at all.

Then I found the answer in the TortoiseSVN FAQ:

Why is there no ‘author’ shown in the logs when I commit changes via svn+ssh?
Since SSH completely takes care of the authentication process, Subversion won’t even see the author who does the commit. So to tell Subversion an author you have to specify the author in the URL itself. E.g. svn+ssh://username@server.com. You should do that when you check out your working copy.

When I tried it, TortoiseSVN used my username. Perfect! But Subclipse went nuts. It started to think that the repostory URL is username@ssh+svn://host/repository or similar. I tried both PureJava & SVNKit implementations with no luck. Nuts!

ComboBox madness continues

Tuesday, October 28th, 2008

The saga with data binding problems in ComboBox component continues. The selectedIndex/selectedItem concept seems to be just undeveloped.

My previous fix has not covered all possible scenarios of the property assignment order. If you set dataProvider property it kicks out selectedItem/selectedIndex values. Here is attempt to make Combobox more conscious about its data.

package
{
    import mx.controls.ComboBox;
    public class SmartComboBox extends ComboBox
    {
        public function CSmartComboBox()
        {
            super();
        }

        /**
        *  bind to this property instead of selectedItem
        */
        private var _selectedItemEx:Object;

        public function set selectedItemEx(value:Object):void
        {
            _selectedItemEx = value;
        }

        public function get selectedItemEx():Object
        {
            return _selectedItemEx;
        }

        /**
         * This method fixes the nasty bug in ComboBox
         * If value is null, it tries to find in dataProvider, can't find it, so it leaves controls as is it is,
         * instead of resetting it.
         */
        override public function set selectedItem(value:Object):void
        {
            if (value == null)
            {
                //first check if our real selectedItem is set
                if (_selectedItemEx)
                {
                    //assign real value
                    // NB if _selectedItemEx contains invalid data, setter from the parent class
                    //will ignore the value and set the property to null.
                    super.selectedItem = _selectedItemEx;
                }
                else
                {
                    //reset the control
                    super.selectedIndex = -1;
                }
            }
            else
            {
                super.selectedItem = value;
            }
        }
 

        /**
        * After dataProvider assignment, restore real selectedItem
        */
        override public function set dataProvider(value:Object):void
        {
            super.dataProvider = value;
            //after assignment, restore real selectedItem
            //NB this is still safe, as setter check the value against the dataProvider
            super.selectedItem = _selectedItemEx;
        }


        /**
        *  reset control (-1) only if real selectedItem is null
        */
        override public function set selectedIndex(value:int):void
        {
            if (value == -1)
            {
                //reset only if we don't have a saved value!
                if (!_selectedItemEx)
                {
                     super.selectedIndex = value;
                }
            }
            else
            {
                super.selectedIndex = value;
            }
        }
    }
}

MacOS, Flex Builder, libs directory and nightmares

Thursday, October 16th, 2008

At some point of time I decided to be cool for once in my life and try to use this “libs” folder feature (See the overexcited Ted’s article here). Because I had to add a number of SWCs to the project I decided not to add them manually one by one as I usually do, but instead I created a sub-directory under libs (I should be listening to that ominous voices) and placed a bunch of SWCs there.  Then I just added a new “SWC Folder” location to the library path and I was enjoying the fact that as soon as I place anything in that directory, Flex Builder catches it up (after a refresh though).  But then storm cloud gathered. I.e. our Mac designer updated the code from the SVN.  The symptoms were:

 

a) Flex Builder hangs (freezes) at the startup while loading the project which referes to that libs/cool_dir directory.

b) In the log file we saw the following:
Caused by: org.eclipse.core.internal.resources.ResourceException: The resource tree is locked for modifications.

After 4 hours of the tambourine dancing around Mac we have figured out that the cause of the problem was my libs/cool_directory. As soon as you remove it, everything gets back to normal. And only Flex Builder for MacOs is prone to this problem.

Damn it!  The number of hours I’ve already spent in the last 2 years troubleshooting Mac’s problems is now probably equal to the unforgettable hours I’ve spent installing SCSI board drivers for WinNT3.51/4.0 on SMP servers.  Oh…. sweet unpretentious Windows…

 

NB On the way, I’ve been really pissed off  by MacOS again – if you download zip file in Safari, it automatically unpacks it. And if folder in the archive is org.eclipse.core smart Safari-MacOs-SteveJobs-whatever unpacks it into the org/eclipse/core.  This is so sweet, caring and mindful.
I’ve been told that there is a setting somewhere in Safari to stop doing this, but we’ve got a presumption of innocence, right? Why should arrogant, ill-mannered and unsophisticated bloke like me know, that there is an option somewhere in the MacOs which says “let’s be stupid, OK/Agree?”

Anyway, enough about this bloody MacOs.  Allons! Revenons à nos moutons! Qu’en fut-il?

Diff on mxml files in Flex 3 sucks big time

Thursday, August 21st, 2008

Internal diff tool in FB3 sucks big time. It worked in FB2, but someone decided that this thing is too good for this world and changed it. This ugly proportional font and this terrible performance are just unbearable!

Single diff on 1000 lines files takes around 50 seconds. Multiply it by 10-20 per day and this is a stolen time from you.

It is time to change this. Here is the place to vote for this bug:

http://bugs.adobe.com/jira/browse/FB-12492

Sweet Adobe, please have a mercy on us all and give us back the
simple, no-gimmick diff, which just works.

Cheers!

ComboBox selectedItem problem

Monday, August 18th, 2008

ComboBox is definitely one of the lousiest Flex components.
First, you can’t customise the itemRenderer for the main control (not the drop-down list).
Second, it has very uncertain behaviour with item selection.

Problem 1:
setting ComboBox.selectedItem = null does not do anything. Logically, it should be equivalent to setting selectedIndex=-1. But it does not work.
There is Flex bug registered and it is marked as Fixed in Flex 3 (Released), which is a bullshit. It is still there.

Problem 2:
The whole Flash/Flex framework is event-driven thing. But sometimes developers forget about it. Unfortunately, including the framework designers.
Somehow, someone thought that dataProvider property will be always set first, and selectedItem second. This is wrong. Here is an example how it could be in a real world:

A multi-state Panel has Combobox. The Panel is cached (after creation it is saved to be reused in later calls).

Here is the sequence of events:
1. Already cached Panel is opened up by PopUpManager
2. Panel is initialised with new data
3. selectedItem property is getting initialised first (by data binding)
4. Panel performs the state change
5. Panel in new state initialises ComboBox by setting the dataProvider (by databinding)

Because there are no new dataChange events coming after this point, selectedItem won’t be set.

Touché!

Here is the overridden class which addresses both problems.

package
{
    import mx.controls.ComboBox;

    public class RightComboBox extends ComboBox
    {
        public function RightComboBox ()
        {
            super();
        }

        override public function set selectedItem(value:Object):void
        {
            if (value == null)
            {
                super.selectedIndex = -1;
            }
            else
            {
                super.selectedItem = value;
            }
        }

        override public function set dataProvider(value:Object):void
        {
        var l_savedSelectedItem:Object = super.selectedItem;
            super.dataProvider = value;
            super.selectedItem = l_savedSelectedItem;
        }

    }
}

Midnight Commander under Cygwin/Vista

Saturday, August 2nd, 2008

For many years I’ve been using Far Manager which is really great commander for Windows.
It has many useful plugins like SCP/SFTP, Network Browser, reasonably good editor with Colorer, PocketPC connection etc.

On the downside FAR editor has a couple of problems which bothered me a lot:
– Internal editor which is quite powerful, sometimes starts using Windows line endings (CRLF) and because I am working in a mixed environment I had to run the dos2unix utility on the routine basis to convert all the files into the UNIX format.

– FAR has a mysterious feature of changing file permissions or file sharing by adding user “None” with special permissions which were preventing files from to be executed. I.e. you’ve download ZIP file using FAR’s FTP browser, unpack it, try to run EXE file, Windows says:

"You don't have permissions to run the file"

. So you have to Explorer->Security settings and kill this None user.

After my recent upgrade from XP to Vista these problems became even worse.
So, I tried to start using the Midnight Commander, which I’ve been using for ages in Unix environment.
But under Cygwin/Vista it behaves quite differently.

Problems I’ve met so far are:

– no mouse support under Vista.
I’ve even tried to use Cygwin’s SSH port with PuTTY and then run MC – no way to have mouse working in Cygwin window.

– I am unable to browse/open any .zip files.
MC says:

 ./file.zip: ./file.zip: cannot execute binary file

.
What the heck? Somehow it opens the TAR files, but only by F4(Edit) command. If you try to open TAR file it writes similar bullshit about running a binary file.

-And the last thing which drives me mad – I am unable to save some of the MC’s config files, such as .mc/bindings. Every time it accesses it, it sets up the sharing, adding this infamous user None with special permissions and this file becomes read-only for MC.

PS While writing this post, I have found that you can get a Midnight Commander’s subshell working under Cygwin – you have to explicitly enable the subshell support via parameter (even if it is a default):

#> mc.exe -U

“She’ll be right!”

Wednesday, June 11th, 2008

Just after I wrote a previous post I realised that when Adobe is committed to bug fixing it does not bring much excitement as well.

My first bug submitted to Adobe was that one: the last comment on the page

Guess what happened in the next Flex2 hotfix? This bug was fixed. In the shortest period of time.
Was it mentioned in the Release Notes? No, it wasn’t.
As the result my app started to crash on List selection as if you process selected cells you have to rely on the order of indices.

ComboBox selection behavior was fixed in Flex3. Perfect!
Was it mentioned in the Release Notes? Nope. Crash, crash and one more crash!
Who cares?

Do you need to mention everything you fix in the Release Notes?
No. She’ll be right!

PS This is how losers do – they put every bug fixed in the Release Notes

This is so boring to read! It is much better to read some overexcited evangelist’s diary about new cool features.

[UPD] Looks like this thing bothers some other people as well.