Posts

C#.Net Static Linking Adventures

My app uses two DLLs - say Lib1 and Lib2 from a CommonDll folder. With normal linking these DLL's also need to be placed with App executable. But previously we have been providing only App exe only. Hence to keep the compatibility and to lessen deployment headaches, the above 2 DLLs will be statically linked in the executable. In .Net world this not so straightforward as setting a static linking flag in linker. Here we need to provide following steps. I have added the rationale for each step alongwith. 1. Add the DLL's to project as resources - preferably in a Resources folder. Go into these DLLs properties and change "Build Action" from "Content" to "Embedded Resource". Now the DLLs shall get embedded in the exe. 2. Provide a handler for AssemblyResolve event. This new handler looks for assemblies in Resources and if found, loads them there. This handler is like below: private static Assembly ResolveEventHandler(Object sender, Resol...

ROM adventures on Nubia Z9 mini

Remember this one I gave to my Sis last year... Well since last month it started giving problems. What happened was the phone would get stuck in starting apps phase and zombie out. Only way to bring it back from zombie mode is to factory reset from recovery. But after a few days, some things related to Google Play Services would update and the phone would zombie out again. Sister got fed up and gave me the phone to fix. So I went through a number of hoops to fix this issue and it's still not fixed. To start with, the phone ran Mokee ROM v6.0 - marshmallow based with open gapps. Now all this is about two years old - things from 2016. And it all worked fine for last two years. So what I did was reflashed everything and tried to see what's wrong. Worked fine till play services are updated. as soon as play services are updated, phone zombies out. Ok. Get new version of gApps. Got it but after clean flashing that too, no change. Same issue. So maybe the Rom is gone. So I download la...

.Net Solutions, DLL's, Build orders etc

Got to learn some new thinigs about Visual Studio today. Basically I wanted to build a library and integrate it into an existing solution.  Steps: 1. Open Solution, Add new project of type "Class Library". Then create namespaces, classes, static library functions etc. Build it. Build OK, DLL ready. Step 2: In other project ( where DLL is to be used), Add reference, Browse, Select Newly created DLL. Add using for DLL namespace. Call function in DLL. Call OK. Build this project.  Hiccup! Issue no 1: DLL project was using newer .Net version while other project (Lets say App project) was using slightly older version and so it's build was giving error - Type or namespace for Library namespace not found.  Bit of googling gave me solution. So set Lib's .Net version to same as App. Build OK.  Next step: Verify solution is building correctly. For this there's something called build order to consider. For this in VS there's a setting - "Project Build Order..."...

Maybe nothing can fix it [SailfishOS Enterprise WiFi]

So yesterday I re-updated my AquaFish from 2.0.4.3 to 2.0.5.6 and then to 2.1.3.7. This halfway update was because 2.0.5.6 is a major update and we can't directly update from 2.0.4.3 to 2.1.3.7. So instead we have to update in steps.  Anyway, just reached office and checked the connection. Sadly nothing! I checked dmesg output and there was a boatload of vos_malloc errors. So looks like there's some bug somewhere where something critically dies and the connection fails.  Anyway my curiosity is satisfied. Maybe the one working connection instance I observed was a fluke, a mere chance, an aberration and looks like the universe has fixed it!  Alas! Sometimes we can do with some error! Cheers!

Jolla Recovery - last resort for Enterprize WiFi bug

So today I decided to take the plunge and completely reset my Aquafish to recovery image to see if I can get the enterprize WiFi working. A bit of background: SFOS did not support Enterprize WiFi using TLS etc back in 2.0.5.6. In 3.1.2 I guess, they added support for that. I have Work WiFi at office that uses TLS with MSChapV2. And on 3.1.2(or whatever that release was), I did manage to connect to my Work WiFi once. The Captive portal login appeared in SFOS browser, I logged in and was able to access the internet. But after that one time it never connected. So I reset Jolla, upgraded once again and tried but to no avail. Now Recovery image reset is something else. It does not just reset the settings. But rather wipes out the partitions and writes partitions from recovery image. The process is straight forward. Remove the battery and after inserting use [power] + [vol+] button to power device in Recovery Mode. The phone displays message to conenct to PC using USB cable and ssh to it...

(Meld, Gnome, Crap) All in one sentence

I have been using Meld for about 3 yrs. And it has been solid. Until today! Actually what happened is I have not been using Linux and Meld for last 3-4 months. Today I required some code merging in Linux. So I fired up Meld and started going at it. I was about halfway, when suddenly my laptop hung. Wait! Ubuntu never hangs! So after struggling to open a System Monitor windows for five minutes I went through the apps and voilla. It is meld! WTF! Then I saw that Meld has opened separate threads for all the docs I have opened and merged and closed. But it conveniently forgot to kill those threads and each thread was eating about 120MB memory and there were about 30+ of them. Gods! Anyway, I killed Meld and the system recovered from the butchery. Then just to coonfirm I opened the folders in merge and confirmed that my analysis is correct that indeed for each opened file a new thread is getting created and when file is closed it's not getting closed. Ok, I check the version - it's ...

SFOS new update, SFOS 3 and new tablet in family

Image
Last week a new update for SFOS is released to early subscribers. Thats v2.1.4 Lapuanjoki. I have been using v2.1.3 kymijoki on my Intex Aquafish for a while as my main phone. And I think SFOS is god enough for daily use. I have a few android apps like - WhatsApp for communication, WPS Office for PDF EBooks, A Better Camera as better Camera app, todoist as TODO app and that's it. I'm getting decent battery life on an average of two days. Of course I had to shoot down couple of problems of errant android apps and downgrade Play Services version. So now the android apps display an annoying pop-up for upgrading Play Services, but they work fine beside this. The upgrade breaks a lots of things - causes battery drain, instability etc etc. So I'm better off with older version and few annoying pop-ups.  Of course I can always get rid of android apps, but right now that's not possible, so I live with compromises. On system front the few things I miss are - apps should be ab...