Sunday, September 29, 2013

Windows Phone 8 Designer not painting properly

I experienced a painting problem  while working with windows phone 8 projects. Problem is, 
Ex:
When inserting a Text box to the form, that text box not showing properly at the designer or some time it is not  showing at the Designer. If we needs to see it, have to re size the area of the designer or need to Zoom in or out the designer. Then painting method works and show the inserted components in the designer. 

Try so-many things and finally found it's coming from my VGA card. I am using a Dell Inspiron 15 and its having a RADEON dedicated VGA card and once i disable it, now it is working.

To whom i have to make the Blame. 
RADEON or VS2012?



windows phone 8 Designer Load Failures

If you found an error  called  System.NullReferenceException in the Designer while creating a windows phone 8 project,

Solution is:

  1. Uninstall WP8 SDK
  2. Uninstall all instances of Silverlight SDK and Rutime (Silverlight 4, 5, etc..).
  3. Re-install WP8 SDK.

Error is not showing the preview of the designer and giving the following error:


System.NullReferenceException
Object reference not set to an instance of an object.
   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
   at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
System.NullReferenceException
Object reference not set to an instance of an object.
Server stack trace:
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)
   bei System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   bei System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d)
   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()
   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
System.NullReferenceException
Object reference not set to an instance of an object.
   bei Microsoft.Expression.Platform.PlatformService.PlatformEntry.get_PlatformCreator()
   bei Microsoft.Expression.Platform.PlatformService.GetPlatformCreator(String frameworkSpec)
   bei Microsoft.Expression.Platform.PlatformService.IsCompatibleFramework(FrameworkName hostFramework, FrameworkName guestFramework)
   bei Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)
   bei Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)
   bei Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken)
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e()
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
   bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

Wednesday, January 4, 2012

Delphi 2010 "expecting: String actual: WideString" on dbExpress for Unicode supportive DB's

When working with dbExpress with Unicode support and bound the fields to the ClientDataset, it create this "expecting: String actual: WideString" error. If you're database is setting up for Unicode, then only you will seen this problem.

If need to Ignore this problem, you need to
   set
    SQLConnection.Params.Values['UseUnicode'] := 'False';
or Open the .dfm file and replace  TStringField with TWideStringField. Remember to rename the field names define in the pas files too. 

Wednesday, December 21, 2011

Bought new Philips HTS3540 for 35,000 + free Philips BDP3200 as a Free Gift from Abans


Last night i bought this HTS3540 5.1 surround sound system from Homagama Abans show room for SL Rs. 35,000 . With that model they issue BDP3200 Blue-Ray player (SL Rs. 19,900/= Abans price) for free. So if someone interest about this deal please go for it.

Will put more details soon

HDMI cable also free with this Blue Ray player. Network features + Up conversion + 7.1 Dolby surround support with this too. I think this is a good deal



http://www.p4c.philips.com/cgi-bin/dcbint/cpindex.pl?slg=en&scy=nl&ctn=BDP3200/12

Monthly Installment available and I need to pay around SL Rs. 3600/= for 12 months. Because I bought a Bladeless Fan (4990/=) at the same time.

Still I didn't setup my Environment. :(

Wednesday, September 7, 2011

Android invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe

I don't know how this problem happen. Anyway before last update everything ran perfectly. But after the update and when i try to run the emulator i found this issue:

invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information


After several checks i found that Android not supports any spaces in between the folder path. Because in previous it's "C:\Program Files\Android\android-sdk " and now i set it as "C:\Android\android-sdk" (cut and paste to C: root)

Also changed the eclipse android SDK path as "C:\Android\android-sdk"




After change the directory structure it's working. I don't know Y?

Thursday, September 1, 2011

My Camera List

On these days i am looking to buy a good camera. It’s kind of a sick to me now. I am not a professional photographer. But I love to take some beautiful photos as they doing.
So I did some investigation to buy such item. Sometime this article may helpful to you to buy a camera if you’re same as me.
First I plan to buy a DSLR. But I removed my idea because of some reasons.
1.       Price of the Camera
2.       Need to change the Camera lenses every time with the situation. That mean, we have to spend more money for that. Because for
a.       Macro we have to buy a lens.  
b.      Wide angle we have to buy a lens.
c.       Long range we have to buy a lens.
3.       With those lenses and camera we have to keep a special space and also kind of a headache about the security while we are traveling.
4.       Huge size of the camera lenses also a matter at some time. Because 30x zooming lens mean a huge item like a RPG.
But I know it’s the item for professional photographers with its huge sensor.
So I decided to go for bridge type camera. Also firstly my plane was to go for a Compaq model and I selected HX9V as it. But while I saw that HX100V containing 30X zooming than the HX9V 16X zoom i chenged my mind. Also I consider about the problems in Compaq models. Because in HX9V, sonny inserted most of the features that they have into that tiny camera and I feel, it can make some troubles to the camera.
After that I am looking for Bridge type cameras. So my selected list is as follows.
1.       HX100V - SONNY
2.       SX30IS   - Canon
3.       P500      - Nikon
4.       HS20      - Fujifilm
Still I am varying in HX100V and SX30IS. In Sri Lanka we can buy the SX30IS for 58,000 RS with Metropolitan warranty and HX100V for 70,000 RS with SIEDLES warranty.
Please check the following link to compare the selected cameras
I never concern about the megapixels. Because 10 megapixels also enough for me.  Reason is I am not going to print any big banners with this camera. Also I know all the manufactures are lying at this stage. Because with this kind of small sensor cannot manage these number of megapixels with the camera.
Everybody having same1/2.3" (6.17 x 4.55 mm) size sensor and only HS20 contain ½ size of sensor (Bit larger than other sensors). Because of that HS20 sensor they have extra image reatio to continue (4:3, 3:2, 16:9).

Why I reject the HS20 and P500
1.    Image stabilization is Sensor-shift. This is something old passion and new way is Optical. Cannot believe why P500 (latest camera within the selected list) continue it with the Sensor-shift.
2.    HS20 not having number of focus points while it’s job.
3.    P500 maximum aperture is faulty. Because with it 24mm lens is useless with the F3.5 aperture. (Aperture is the place that decides how much light should take from the outside to the image). It’s most effective while taking some night shots (specialy ISO).
4.    P500 maximum shutter speed is not enough with the model. It’s 1/1500 sec with all the others having 1/4000 speed. (SX30IS having 1/3200 sec and that also far enough with 1/1500 sec)  
5.    And also lot people not happy with
a.    Battery life of P500
b.    Focusing on both P500 and HS20.

Links for P500 and HS20 sample images



Now I am staying at SX30IS and HX100V. But I love HX100V. Because it’s worth to it price with all the loving features it’s having. What I don’t like in SX30IS is
1.    Sensor is CCD (Old method)
2.    Continues shooting is 0.6 fps. L. That mean, within a minute, it canot take out a single image. So this is not a good camera for moving objects.
All the other things are superb and I love to 36x zoom on it. CCD is no need to much consider because CCD having 2 methods and this SX30IS using the finest method for that. But problem is, why they keep CCD inside the camera instead of CMOS.

Some people are not happy with the canon camera and some mention about problems on always bluer images, ASF not working properly, etc..

But for HX100V nobody has complained any problems and that also a one special point to go for HX100V. But only thing is, in Sri Lanka still we couldn’t find this camera in the market. All the people are saying, it’s shortage in this product. But in other countries, they have lot enough products for sale.  

Another thing we should have to consider is
SX30IS from 2010 – SPE
And
HX100V from 2011 – FEB
Different between both camera’s are 5 month and almost 1 year for the SX30IS. So now users using the Canon SX30IS and lot enough time for geting troubles with the camera.
HX100V only having 6-7 month time with users and still most of the people are planning to buy it but still not in stock to buy like me. J

Sample images for HX100V and SX30IS



Another thing I can feel. Actually beautiful image mean not the camera only. It’s the creativity of the camera men. Most of the ugly image reasons are not only the camera. It’s our inability J.
Why I said that because, Some people using a camera and taking some beautiful images and while that, some propel are scolding to the same camera for bad images. Mostly i am in the 2nd group. J




ලංකාවේ අරක්කූ

අරක්කු පෝලිම දැක්කම අරක්කු කියන්නේ අත්‍යවශ්‍ය ගනයට දැමිය යුතු දෙයක් බවටයි හැගෙන්නේ. ඒතරම් පොලිමක් අපි දකින්නේ පෙට්ට්‍රල් ගනන් යනවා කියපු දවසට සෙඩ් වල තියෙන පෝලිම. කවදාවත් කෑමක් ගන්න අපේ කවුරුත් පොරකනවා මම දැකල නෑ.
අනිත් බාන්ඩ ලංකාවේ ඉවර වෙලා ගන්න නෑ කියල ඇහුවත් කවදාවත් ලංකාවේ අරක්කු ඉවරවෙලා කියලා අහල තියෙනවාද?
ඇත්තටම කරන්න ඔනී ලංකාවේ අරක්කු හදන සහ අරක්කු විකුනන කට්ටිය රජය හැටියට පිලි ගැනීමයි. එදාට ලංකාවේ කිසිම දේකට ආහාර හිගවෙන එකක් නෑ. හැබැයි පොරකාලා කමිබි පොලු අස්සේන් ගන්න වෙයි.

මේ කියපු දේ දෙපැත්තක් තියෙනවා. අපිට දැනෙන විදිහට අත්‍යාවශ්‍ය බාන්ඩ හිගවෙන්නේ සැලැස්මකට. ඒවා හිගඋනාම ගනන් යවනවා. පස්සේ බඩු එලිට දාලා ඒ ගානටම තියාගන්නව L