threading-model Cull/Draw

Just loaded 1.8 and tried this option in my config.prc:

threading-model Cull/Draw

When I try to launch my app, nothing happens. No Panda window at all.

I comment it out and everything works again.

Does it work if you try it in, say, one of the sample programs?

If it does, can you determine what’s different about your application?

David

Tried it on samples and sure enough, it worked.

So I started looking at my code.
Strangely enough, it seems to happen because of this line:

loadPrcFileData("", "icon-filename _start.ico")

Here’s a whole quick program that shows the problem. If you comment out the line above, everything is fine.

# Python imports
import csv, random, sys, os, datetime						# various std Python modules

# Panda3D imports
from panda3d.core import *									# use PRC settings, Vec3, Filename, etc.
from direct.showbase.ShowBase import ShowBase				# main app object
from direct.gui.DirectGui import *							# use DirectGUI
from direct.actor import Actor								# use Actors
from direct.interval.IntervalGlobal import *				# use Intervals
from direct.task import Task								# use Tasks
from direct.filter.CommonFilters import CommonFilters		# use Filters for graphic fx
from direct.stdpy.file import *								# use Panda file handling (replaces python version)

loadPrcFileData("", "icon-filename _start.ico") 			# Set window icon
loadPrcFileData("", "threading-model Cull/Draw")			# Enable auto multi-threading (Panda 1.8)

class myGame(ShowBase):
	def __init__(self):
		# Start this puppy up!

		ShowBase.__init__(self)											# init main Panda object code
		print "OK"

g = myGame()
g.run()

the file _start.ico does exist and this code worked fine in 1.72

Ah, this is the sort of thing that happens with new, experimental features. :slight_smile:

There must be some internal deadlock in the Panda code that loads the icon file when it happens in a sub-thread. Please submit a bug report via launchpad, so this gets on the record.

In the meantime, you can decide whether you’d rather run with pipelined mode, or with a custom icon. :slight_smile:

David

Bug report submitted.

I have gotten it to work by commenting out the icon line, but it now hangs at a later point in my app. Will try to find out where this is happening. Seems to be in my “cleanup” code when I try to go back to a title screen.