Category Archives: Uncategorized

Fix Unity Editor Crashing In KVM

Or: How to fix Unity error 0x0000142

I wish I could re-find the Unity Community article where I found this solution so I could credit the original source. If I find it I’ll link here.

Anyway, if you’re here you might be getting error 0x0000142 trying to run Unity Editor 2019.2.x in a virtual machine in KVM (or another hypervisor).

The culprit is openimagedenoise.dll

The fix is simple: Install any version of Unity Editor 2019.3.x (either directly or from the Unity Hub) and copy openimagedenoise.dll from the Unity Editor 2019.3.x folder to the Unity Editor 2019.2.x folder. Overwrite the existing file.

If you’re using Unity Hub that’s:
From: C:\Program Files\Unity\Hub\Editor\2019.3.0b4\Editor\openimagedenoise.dll
(Replace 2019.3.0b4 with whatever 2019.3 version you installed)
To: C:\Program Files\Unity\Hub\Editor\2019.2.18f1\Editor
(Again, replace 2019.2.18f1 with whatever 2019.2 version you’re using)

That’s it! Run Unity 2019.2 and everything should just work.

Upgrading to PostgreSQL 11 on Centos 7

Since my previous article Upgrading to PostgreSQL 10 on Centos 7 was so popular, I though I’d do a follow-up for anyone looking to upgrade a very simply configured PostgreSQL 10 server to PostgreSQL 11 on Centos 7.

First, and this goes without saying, backup your server!

Install the repo RPM for PosgresSQL 10
sudo yum install
Install PosgreSQL 11
sudo yum install postgresql11-server

If you’re using extensions like pg_crypto, you will also need the postgresql11-contrib package

sudo yum install postgresql11-contrib
Stop Postgresql 10 and Postgresql 11
sudo systemctl stop postgresql-10.service && sudo systemctl stop postgresql-11.service
Initialize the PostgreSQL 11 database
sudo su postgres
cd ~/
/usr/pgsql-11/bin/initdb -D /var/lib/pgsql/11/data/
Migrate your database from the 10.x version to 11.x
/usr/pgsql-11/bin/pg_upgrade --old-datadir /var/lib/pgsql/10/data/ --new-datadir /var/lib/pgsql/11/data/ --old-bindir /usr/pgsql-10/bin/ --new-bindir /usr/pgsql-11/bin/
Edit configuration files

Make any necessary changes to postgresql.conf . I’d recommend making the changes to the new version rather than copying over postgresql.conf from 10.

You can view your 10 configuration with:

nano /var/lib/pgsql/10/data/postgresql.conf

You can make your changes to the 11 configuration with:

nano /var/lib/pgsql/11/data/postgresql.conf

If you need to connect from other servers, make sure to change:

#listen_addresses = 'localhost'

to (apostrophes may not survive copy/paste, may want to hand enter)

listen_addresses = '*'

Now do the same with pg_hba.conf

View the old configuration

nano /var/lib/pgsql/10/data/pg_hba.conf

Edit the new configuration

nano /var/lib/pgsql/11/data/pg_hba.conf
Start the server
systemctl start postgresql-11.service
Analyze and optimize the new cluster
Enable the PostgreSQL 11 Service (to start automatically)
systemctl enable postgresql-11
Remove PostgreSQL 10 and its data (if so desired)
sudo yum remove postgresql10-server

That should do it!

Fix: Office Updates and Malwarebytes

If any of you are big fans of Malwarebytes (and why wouldn’t you be?) you may be experiencing crashes in Office 2013 and 2016 under Windows 10.

Microsoft has identified the problem:

The workaround is to use the latest beta of Malware Bytes:

Hope this helps!

Where’d the Timer Go?

So. System.Threading.Timer. Right.

I’m really starting to miss the old System.Timers.Timer. Built like a tank. System.Threading.Timer is a bit more finicky, but is the only option in .Net Core.

My fun of the day:

It turns out, when the timer goes out of scope, it will be disposed of. Even if you’d told it to, for example, tick every 3 seconds. Though I probably should have known that.

This will tick exactly once:

private void foo()
Timer t = new Timer(bar, null, 0, 3000);

Instead, you must do:

Timer t = null;
private void foo()
t = new Timer(bar, null, 0, 3000);

Just so you don’t waste a couple of frustrating hours like I did.

Happy coding!