Clearing kept events in vis

When visualizing events with a bazillion secondaries, I get the warning.

********************* WARNING! ********************
*  Display list limit reached in OpenGL.
*  Continuing drawing WITHOUT STORING. Scene only partially refreshable.
*  Current limit: 50000 primitives.  Change with "/vis/ogl/set/displayListLimit".

Any event generated thereafter briefly flashes on the visualizer screen and disappears.

It looks like it’s refusing to keep the latest one because it is keeping previous ones in some store, and that store is full. If I don’t care about the previous ones and just want to see the latest, then clearing that store should do the trick.

How can I persuade the visualizer to keep displaying this last event?

First, increase the display list limit to - well, millions, even 100 million, if you have plenty of memory (perhaps, with computers and laptops nowadays, we should increase this default).
/vis/ogl/set/displayListLimit 9999999

Still, even with the default, and after getting that warning, drawn tracks should stay on the screen until you try to interact with it. I have just tried with OGLSQt - you are right, many tracks disappear at end of run. I don’t think that should happen. Maybe you have found a bug - we will investigate.

You can display events one by one:
/vis/scene/endOfEventAction refresh

You can keep more events with, e.g.:
/vis/scene/endOfEventAction accumulate 1000

Try some of those things and tell us what happens.

Hi John,

Increasing the displayListLimit solves my immediate problem: I am now able to view events one by one to get the insight I need, so thank you for that suggestion.

The disappearance of tracks at the end of the run does seem odd. Will you report any discoveries about this here, or should I keep an eye out for them elsewhere?

Thank you for your help.

Hi Jacek

Re the disappearance of tracks at the end of the run: it will go on my job list as “medium priority” I guess. Look out for it in the Release Notes of Geant4 11.0.

My recollection is that it works with OGLSX. Are you in position to try that?


Running my app showed

You have successfully registered the following graphics systems.
Registered graphics systems are:
  ASCIITree (ATree)
  G4HepRep (HepRepXML)
  G4HepRepFile (HepRepFile)
  RayTracer (RayTracer)
  gMocrenFile (gMocrenFile)
  OpenGLImmediateX (OGLIX, OGLI)
  OpenGLStoredX (OGLSX, OGL, OGLS)

So I changed OGL to OGLSX in

/vis/open OGLSX 1000x700-0+0

and verified that it’s this line which is being used, by changing the 1000 → 100 and observing its effect.

Additionally, I see

/vis/open OGLSX 1000x700-0+0
/vis/sceneHandler/create OGLSX
/vis/viewer/create ! ! 1000x700-0+0

in the G4 output.

In this configuration (without increasing displayListLimit), after the first complex event is displayed, subsequent events’ tracks disappear at the end of the run.

In short, changing from OGL to OGLSX seems to have no effect in this respect.

Thanks, Jacek. Important information. I will look into it.

In fact, I think this warrants a bug report. If you are willing, please raise a report at


I’ll try to produce an MRE (though MREs in G4 apps aren’t ever going to be very M :smiley:) and submit it.

Can’t promise I’ll find the time soon.