DisplayCancelableProgressBar NullReferenceException

I'm having trouble getting the progress bar to work. It does display and does show the progress, but it also results in a null reference exception that I can't figure out.

In my editor script during OnInspectorGUI, I'm calling this several times:

EditorUtility.DisplayProgressBar("My Task", "Operation...", progress);

At some point during execution, this error shows up:

NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUIUtility.GetControlID (Int32 hint, FocusType focus) UnityEditor.InspectorWindow.OnGUI () System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr,

System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)

Any ideas what could be wrong or what's missing? At this point I'm ready to give up and use some alternate method of showing progress.

I met the same problem, when using the DisplayCancelableProgressBar.
If i remove it, there is no null exception throw any more.

I came across the same issue after upgrading to Unity 2017.3. Before that, with Unity 5.6, DisplayCancelableProgressBar was acting perfectly with no error.