The perils of flutter's Table widget

I recently started exploring Flutter for mobile apps, and I have to say that I like it. But that's a story for another blog post.

Here I just wanted to warn flutter developers against using Table widget. The philosophy of widget itself it's fine, the problem is that it hides a very insidious bug which happens randomly, or better, just on some devices.

The thing is on certain screen dimensions, app gets stuck in calculating layout forever - it never exists a while loop. Which is the worst bug you can imagine - it happens only on some devices, it isn't obvious what's going on (app just becomes unresponsive), it is heavy on battery and there is no useful feedback whatsoever - like an exception being thrown or a log entry - nothing. The bug itself has to do with rounding double numbers which one should really be careful of when requiring precise results.

I reported the bug with a good description and fine folks at google created a PR in the same day or so and it is already merged in the master branch (hopefully the change does the job for good since it relies on a magic number).

TL;DR; Don't use Table widget before there is a new version of flutter with this fix since your app might bet stuck for good.

An odd error when adding items to toolbox in Visual Studio 2010

Ever got an error like this when trying to add a toolbox item?


Textual representation (for search engines):

Microsoft Visual Studio
Could not resolve mscorlib for target framework '.NETMicroFramework,Version=v4.1'.  This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.

and here is another one:


Microsoft Visual C++ Runtime Library 
Runtime Error!

Program: C:\Program File…

Please contact the application’s support team for more information.

The later one is really useful.

Note: It isn’t strictly linked to v4.1 – it happens with earlier versions as well.

Another side effect is that toolbox is somewhat corrupted, only certain tabs are loaded. But fear no more, here is the culprit and the workaround we found.

It turns out that there are problems when .net microframework is installed and its assemblies can’t be loaded.

Update (23.12.2011)

Microsoft wisely broke the link to the thread containing the solution - the solution thread has vanished into the black hole of the internet.
So, here is the solution as far as I remember :-):
Rename the files (or delete them) FrameworkList.xml which are installed in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETMicroFramework\v4.x\RedistList. Note that each .NET Micro Framework installs its own file in its own folder.