[fixed] createNewSceneManager should copy GUI env too

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

[fixed] createNewSceneManager should copy GUI env too

Post by MasterGod »

I'm using createNewSceneManager() method and when I needed the GUI Env I used smgr->getGui..() but I got a NULL pointer and when I checked why I saw this:

Code: Select all

ISceneManager* CSceneManager::createNewSceneManager(bool cloneContent)
{
	CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache);

	if (cloneContent)
		manager->cloneMembers(this, manager);

	return manager;
}

Code: Select all

CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
			gui::ICursorControl* cursorControl, IMeshCache* cache = 0,
			gui::IGUIEnvironment *guiEnvironment = 0);
So I'm asking why doesn't it send the GUI Environment too?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

So?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Yes you're right, a valid bug report since it breaks text scene nodes etc ;)

Thank you.. Keep them coming!
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

bitplane wrote:...a valid bug report...
Ha ha :D ! What do you say about that hybrid? I do improve, don't I? :lol:
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I would submit a patch but I guess that fix is too short for a patch so how about changing:

Code: Select all

CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache);
to

Code: Select all

CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache, GUIEnvironment);
already :roll:
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Is there a reason I just don't get it doesn't get fixed? :roll:
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Yeah. Time. All the coders have a list of things to fix/add/remove and are going through it as fast as their FREE time permits. Also, most often than not, fixes ends up in the fix branch. So commit a patch, it'll be faster. Else, wait.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I didn't receive your payment, yet. Until then, all things in here are on a completely voluntary basis. So calm down and let things happen as they come.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Sorry for being like that I just wanted it to be fixed soon cause I really need it.
An example of this bug can be seen when trying to access the gui env in a scene manager created with the method createNewSceneManager().
Before Patch:
Image

And here's a patch that fixes it:

Code: Select all

Index: source/Irrlicht/CSceneManager.cpp
===================================================================
--- source/Irrlicht/CSceneManager.cpp	(revision 1275)
+++ source/Irrlicht/CSceneManager.cpp	(working copy)
@@ -1642,7 +1642,7 @@
 //! Creates a new scene manager.
 ISceneManager* CSceneManager::createNewSceneManager(bool cloneContent)
 {
-	CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache);
+	CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache, GUIEnvironment);
 
 	if (cloneContent)
 		manager->cloneMembers(this, manager);
After Patch:
Image

On Tracker: https://sourceforge.net/tracker/index.p ... tid=540678

Using XP SP2. Latest revision, trunk branch.

Is there anything else I can do to speed it up?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Sorry for being like that I just wanted it to be fixed soon cause I really need it.
I don't understand why you need it to be committed with such urgency. I see three scenarios that allow you to use fixed code.
  1. wait for someone to commit the fix, then wait for the next release distribution to be made.
  2. wait for someone to commit the fix, then rebuild the library and use that until a new distribution is made.
  3. use your own patch, then rebuild the library and use that until a new distribution is made.
So, one of the three possible scenarios require you to wait until the next full release of Irrlicht, which could be several months away. The two other scenarios require you to rebuild the library yourself. One of them offers instant gratification. The other requires you to wait until someone commits it to subversion.

Sounds like a difficult decision to me... You've already created a patch. Why can't you just rebuild the Irrlicht dll and use it?
Is there anything else I can do to speed it up?
Yes, wait patiently. Bitplane already acknowledged that it is a legitimate bug. Posting pages of screenshots won't help your cause.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Committed fix to 1.4 branch, will be copied to trunk next time hybid merges them.
The gui environment is grabbed by the scene manager on creation and dropped during destruction, so it was a one-line change with no chance of side-effects (like cyclic references or bad pointers). It might not have been, I didn't investigate it until now because of a lack of time due to doing paid work and also because my local trunk repository is in a bit of a mess at the moment.
The best way to speed up bug fixes is to describe the fix better, show that you've already investigated the problem and say why you believe it's a one line change with no side-effects, post a test case.
I'd commit a one-liner by vitek or rogerborg with minimal testing as they've proved that they are capable of submitting decent, well thought out, well described fixes. You're bound to get put to the back of the queue if I've spent hours and hours trying to find bugs you've reported in the past with no joy ;)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

bitplane wrote:The best way to speed up bug fixes is to describe the fix better, show that you've already investigated the problem and say why you believe it's a one line change with no side-effects, post a test case.
I'd commit a one-liner by vitek or rogerborg with minimal testing as they've proved that they are capable of submitting decent, well thought out, well described fixes. You're bound to get put to the back of the queue if I've spent hours and hours trying to find bugs you've reported in the past with no joy ;)
:oops: I'll try improve my reports in the future, sorry for being jerk about this one.. :oops:
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Post Reply