# "NullPointerException" when I try to create a MidiBus object from The MidiBus library

**URL:** https://discourse.processing.org/t/nullpointerexception-when-i-try-to-create-a-midibus-object-from-the-midibus-library/47445
**Category:** Libraries
**Created:** [October 25, 2025, 10:12pm UTC](https://discourse.processing.org/t/nullpointerexception-when-i-try-to-create-a-midibus-object-from-the-midibus-library/47445 "2025-10-25T22:12:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JakeFromJakku](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@JakeFromJakku](https://discourse.processing.org/u/JakeFromJakku)
#### Post date: [October 25, 2025, 10:12pm UTC](https://discourse.processing.org/t/nullpointerexception-when-i-try-to-create-a-midibus-object-from-the-midibus-library/47445/1 "2025-10-25T22:12:21Z")

</div>

Hello, does anyone know how I can open up libraries that I’ve imported so I can investigate why I’m getting a null pointer when I make a new midi bus? I need to get into “The MidiBus” by Severin Smith

I’m following the youtube tutorial here:[https://www.youtube.com/watch?v=5VdeOb7PoQc&t=4s](https://www.youtube.com/watch?v=5VdeOb7PoQc&t=4s)

My code is showing this below:

```auto
import themidibus.*;

MidiBus midi;

// run when your sketch runs
void setup(){
     midi = new MidiBus(this, “VBUS_A”);
}

```

Result:

NullPointerException  
NullPointerException  
NullPointerException  
NullPointerException  
NullPointerException

I have created a virtual midi bus called “VBUS\_A” that is functioning as you can see:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/3/93a2de6a4bf9b8addfa660340bfa35f7ce410bb7.png)

Thanks!

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [October 25, 2025, 10:18pm UTC](https://discourse.processing.org/t/nullpointerexception-when-i-try-to-create-a-midibus-object-from-the-midibus-library/47445/2 "2025-10-25T22:18:11Z")

</div>

Hello @JakeFromJakku ,

It worked with Processing 3.5.4 (used in video) with the examples from the library:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/8/d85b8e5d385b3dc1fab3eee9a81f625c5fee3329.png)

I got errors with Processing 4.4.10 with the examples.

`:)`

---

<div class="post-metadata">

### Author: ![JakeFromJakku](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@JakeFromJakku](https://discourse.processing.org/u/JakeFromJakku)
#### Post date: [October 26, 2025, 12:14am UTC](https://discourse.processing.org/t/nullpointerexception-when-i-try-to-create-a-midibus-object-from-the-midibus-library/47445/3 "2025-10-26T00:14:18Z")

</div>

Brilliant, thank you @glv
