Error in gis:paint

Dear all,

after updating all NetLogo extensions I suddenly get the following error message:

Extension exception: ‘void org.nlogo.api.Workspace.syncDrawing(java.awt.image.BufferedImage)’
error while observer running GIS:PAINT
called by procedure SETUP-ASCII
called by procedure SETUP
called by Button ‘setup’

The corresponding code lines are:

I changed nothing in my code, just updated the extensions. All other primitives of the gis extension work, it is only gis:paint that causes an error. Has anyone else encountered this?

Thank you in advance!

1 Like

Hi @M.Schäfer,

Thank you for reporting this bug! To help us diagnose the issue, could you confirm which version of NetLogo you are using and which version of the gis extension you are using? It would also be helpful if you could copy and paste the full error message into your response (you may need to check the “Show internal details” box).

Isaac B.

Hi Isaac,

thanks for your reply. I am using NetLogo 7.0.3 with the gis extension 1.4.2. Here is the full error message:

Extension exception: ‘void org.nlogo.api.Workspace.syncDrawing(java.awt.image.BufferedImage)’
error while observer running GIS:PAINT
called by procedure SETUP-ASCII
called by procedure SETUP
called by Button ‘setup’

org.nlogo.nvm.WrappedExtensionException: Extension exception: ‘void org.nlogo.api.Workspace.syncDrawing(java.awt.image.BufferedImage)’
at org.nlogo.prim._extern.perform(_extern.java:40)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:101)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.scala:65)
at org.nlogo.job.JobThread.runPrimaryJobs(JobThread.scala:133)
at org.nlogo.job.JobThread.run$$anonfun$1(JobThread.scala:68)
at org.nlogo.job.JobThread.run$$anonfun$adapted$1(JobThread.scala:78)
at scala.Function0.apply$mcV$sp(Function0.scala:42)
at org.nlogo.api.Exceptions$.handling$$anonfun$2(Exceptions.scala:41)
at org.nlogo.api.Exceptions$.handling$$anonfun$adapted$1(Exceptions.scala:41)
at scala.util.control.Exception$Catch.apply(Exception.scala:227)
at org.nlogo.api.Exceptions$.handling(Exceptions.scala:41)
at org.nlogo.job.JobThread.run(JobThread.scala:78)
Caused by: org.nlogo.api.ExtensionException: ‘void org.nlogo.api.Workspace.syncDrawing(java.awt.image.BufferedImage)’
at org.myworldgis.netlogo.Painting$PaintRaster.performInternal(Painting.java:232)
at org.myworldgis.netlogo.GISExtension$Command.perform(GISExtension.java:61)
at org.nlogo.prim._extern.perform(_extern.java:36)
… 11 more

NetLogo 7.0.3
main: org.nlogo.app.AppFrame
thread: JobThread
OpenJDK 64-Bit Server VM 17.0.2 (Oracle Corporation; 17.0.2+8-86)
Operating system: Windows 11 10.0 (amd64 processor)
Scala 3.7.0
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: WildCon_IBM_230426_MS

07:11:56.866 SwitchedTabsEvent (org.nlogo.app.AppFrame) AWT-EventQueue-0
07:11:56.742 RuntimeErrorEvent (org.nlogo.app.AppFrame) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$4 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.window.SwitchWidget) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.window.SwitchWidget) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$4 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.window.SwitchWidget) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$4 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$4 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
07:11:56.406 InterfaceGlobalEvent (org.nlogo.window.SwitchWidget) AWT-EventQueue-0

Hi @M.Schäfer,

Thank you for the confirmation. Version 1.4.2 of the gis extension only works with NetLogo 7.0.4, which was just released along with the update to gis. You should have no issues opening your existing model in 7.0.4, so I would recommend downloading it from https://www.netlogo.org/download and switching over. Let us know if that doesn’t fix the problem or if you have any other issues!

Isaac B.

2 Likes

Thank you Isaac, that worked. I was not aware of the new NetLogo Version.

1 Like

Great, I’m glad that solved the problem!