Category Archives

Archive of posts published in the category: Debugging

Modifying Android application on a binary level

Recently I had to modify an existing Android application for which I didn’t have a source code, only APK file. This may sound like an impossible task but actually it is pretty easy (very tedious, though). I didn’t want to use any compilers…

Spark and NegativeArraySizeException

Recently I was debugging the following crash in Spark:

Disabling Kryo solves the issue. To do that just set spark.serializer to org.apache.spark.serializer.JavaSerializer. Other workaround is to change Kryo’s reference management, as explained on Github:

Spark and NullPointerException in UTF8String.contains

Recently I was debugging a NullPointerException in Spark. The stacktrace was indicating this:

After some digging I found out that the following query causes the problem:

If I commented out the line with the comment the NPE was no longer there.…

Source compatibility issue with Google Guava library

Recently I was debugging a case of NoSuchMethodError when using the Google Guava library. Conceptually my code was doing the following:

In runtime I was using library in version 19 and I was getting the following error:

I decompiled the code…

.NET Inside Out Part 9 — Generating Func from a bunch of bytes in C# revisited

This is the ninth part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# We know how to generate delegate from a byte…

Windows Research Kernel Part 4 — New module

This is the fourth part of the WRK series. For your convenience you can find other parts in the table of contents in Part 1 — Compiling and debugging To create a new module, you need to prepare some directories and a make…

Windows Research Kernel Part 3 — Syscall

This is the third part of the WRK series. For your convenience you can find other parts in the table of contents in Part 1 — Compiling and debugging Today we are going to write a very simple hello world in the kernel…

Windows Research Kernel Part 2 — Monitoring the function invocation

This is the second part of the WRK series. For your convenience you can find other parts in the table of contents in Part 1 — Compiling and debugging In this part we are going to monitor the invocation of QuerySystemInformation system function…

Windows Research Kernel Part 1 — Compiling and debugging

This is the first part of the WRK series. For your convenience you can find other parts using the links below (or by guessing the address): Part 1 – Compiling and debugging Part 2 – Monitoring and function invocation Part 3 — Syscall…

Custom memory allocation in C# Part 8 — Unsafe list in .NET Core x64

This is the eighth part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack Today we are going to revisit an Unsafe list example…

Reordered code after compilation

Can one line of code in C# JIT compile into two different blocks of code in the same program? This sounds a little tricky but in fact is very easy and happens pretty often. Consider the following code:

Now let’s see the…

Custom memory allocation in C# Part 7 — Stack allocation once again

This is the seventh part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack We know how to allocate object on a stack, however,…

Debugging WCF high memory usage

If you are interested in the topic see the polish recording from Intive Lunch & Learn or slides Recently I was debugging high memory usage in application written in .NET 4 using WCF. After few hours application was eating almost 8 GB of…