300
Views
7
Comments
Sharing a Tip: Object reference not set to an instance of an object
Discussion

Since there's nothing online anywhere or searchable for this issue, I am going to post about it even if it's just for me one day when I inevitably encounter this issue again and go searching for an answer.

I encountered an issue while publishing a module. The problem appeared out of nowhere but remained consistently in place, refusing me the ability to publish once it reared its ugly head:

Internal Error: Invalid compiler output.
Object reference not set to an instance of an object.

There's a known issue where if you have large components (like images) in a module, those large resources get stored in temporal storage on your PC as a performance measure. Unfortunately, as such, it's not entirely impossible for those files to get deleted or corrupted by some automated process or accidental manual deletion.

You can identify if you're having this issue in two steps. First, check the error logs and see if you have the following line in your stack trace:

at OutSystems.HubEdition.Compiler.Image.DumpFile()

If you do, open up your ailing module in Service Studio and click on each of your images. If the details pane in the lower right of Service Studio does not change when you click on an image, that image is not there anymore or is corrupted. Delete it, replace it. Do this for all images in your module and attempt to publish. If you're still not good, check your resources in a similar way.

Final note: it's probably a better architectural practice anyway to store images and large resource files in separate modules that you publish less anyway. It's very rare that you would need versioning of either to the same degree you want versioning for your code, so it's probably better to just cut the coupling and move it on out. 

2024-09-17 08-54-53
Jerome Rajadurai J

Thanks for Sharing @Grayson Udstrand 

2023-05-25 02-32-50
Leandro Daniel Lemos Murta

Thank you @Grayson Udstrand , had the same problem and your solution worked here for me!

2024-02-03 23-41-38
ROMMEL SIMUNDO

Thank you @Grayson Udstrand , I encountered the same problem and tried various solutions, like publishing the old version or republishing directly through the module management, but still faced the same error. Your solution worked! 

2025-04-22 05-54-18
Shashi Kant Shukla

Thanks @Grayson Udstrand, I had the same problem and your solution worked here for me! 

2022-01-14 22-32-23
Miguel Figueiredo

I can only say.. @Grayson Udstrand THIS POST SAVED MY DAY!!!
Thanks for sharing the knowledge.. I already lost 2h today, because of this error.

UserImage.jpg
Rahul Singhal

@Grayson Udstrand - Thanks a lot man. You saved the day.

2024-02-26 14-41-04
Giovanni Tonussi

@Grayson Udstrand Faced this error today and I don't what the team would do without knowing this type of error was possible.

Thank you very much for sharing!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.