NullPointerException "w" is null

Hi,
I was working with my model and suddenly it crashed because of i used too much heap space, or something like that.
Now I try to reopen the model and I get this error:

How can I fix it?

Oct 2, 2024 11:28:56 PM null
Warning
Unexpected Exception NullPointerException: Cannot invoke “de.grogra.imp.IMPWorkbench.setFile(java.io.File, de.grogra.util.MimeType)” because “w” is null Stack Trace: java.lang.NullPointerException: Cannot invoke “de.grogra.imp.IMPWorkbench.setFile(java.io.File, de.grogra.util.MimeType)” because “w” is null at de.grogra.imp.IMP.open(IMP.java:895) at de.grogra.imp.IMPWorkbench.open(IMPWorkbench.java:306) at de.grogra.imp.IMPWorkbench.openRecent(IMPWorkbench.java:342) at de.grogra.pf.ui.Workbench.openRecent(Workbench.java:518) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at de.grogra.util.Utils.invoke(Utils.java:745) at de.grogra.util.Utils.invokeStatic(Utils.java:713) at de.grogra.util.Utils.invoke(Utils.java:702) at de.grogra.pf.ui.registry.CommandItem.run(CommandItem.java:259) at de.grogra.pf.ui.registry.CommandItem.eventOccured(CommandItem.java:352) at de.grogra.pf.ui.tree.RegistryAdapter.eventOccured(RegistryAdapter.java:120) at de.grogra.pf.ui.tree.UITreePipeline.dispatchEvent(UITreePipeline.java:699) at de.grogra.pf.ui.tree.UITreePipeline.eventOccured(UITreePipeline.java:638) at de.grogra.pf.ui.awt.ButtonSupport$Dispatcher.run(ButtonSupport.java:119) at de.grogra.imp.IMPJobManager.run(IMPJobManager.java:558) at de.grogra.imp.IMP.runImpl(IMP.java:199) at de.grogra.imp.IMP.run(IMP.java:167) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at de.grogra.util.Utils.invoke(Utils.java:745) at de.grogra.util.Utils.invokeStatic(Utils.java:713) at de.grogra.util.Utils.invoke(Utils.java:702) at de.grogra.pf.registry.Application.run(Application.java:105) at java.base/java.lang.Thread.run(Unknown Source)

Hi @Michele_Butturini ,

The error you provide is very broad and could come from many reason. Could you share the project.gs file of you project? or even the whole project?

hI @gaetanH , thank you for the answer, I sent you a private message with the model that should show the error, let me know if it does the same with you

Hello, has your problem been solved? I downloaded an FSPM project on the Internet and I got a similar error when I opened it with GroIMP, how can I fix this problem?

Hi,
This issue usually occurs when there is an issue with the project.gs file. There is not much you can do to recover the project metadata (the imported objects, datasets, shaders, …).
If you have an older version of the file (the project.gs file / all other files can remains) you can try replacing it.
Otherwise, you can replace the project.gs file by an “empty” one.
Here is the minimum info it needs to contains :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://grogra.de/registry" graph="graph.xml"/>

So you could open the current project.gs and replace all its content by these two lines. You will need after to re-import all files/shader/images/… in the project.

So basically you create a new project and re-import everything in.

Sorry for not replying to you in time.
It is strange that there is no project.gs file in the project I downloaded. Is it a necessary file? I created a project.gs by myself and pasted the content of <?xml version="1.0" encoding="UTF-8" standalone="no"?>
into it, but I still cannot open the project.

Hi,

To work, a groimp project require 3 files:

  • project.gs : an xml file that includes all the content of the project, except for the graph.
  • graph.xml : the project graph of the project as xml.
  • META-INF/MANIFEST.MF : a file that list all files and their types of your project.

Notice that :

  1. The project.gs and graph.xml can be renamed as long as their references are also renamed.
  2. The project can be compressed into a .gsz file. In that case, the 3 files and probably others are contained in the .gsz file.

The .gs file (or .gsz) of your project is the one you select when opening it. If it is a .gsz, you can either extract it and modify the .gs, or modify the archive itself.

Additionally, in your message, only half of the content you need to copy paste in is displayed. It might comes from the forum display, but make sure you have the 2 lines in your .gs file.