Page 12 of 31

Posted: Fri Jan 28, 2011 3:16 pm
by cobra
Hi Sudi.

Thanks for your suggestions, but I already found these and fixed them last weekend for the next version that is coming in early February.

The second bug was actually a typo, as you can see:

Code: Select all

const irr::core::stringc& getName() { return name = shape->getName(); return name; };
I meant to remove the first "return," but I didn't.

ISoftBody also had a non-virtual destructor, which I have fixed.

If anyone finds more bugs, please let me know, because the 0.1.71 bug-fix release will be out soon. (It will be at least a week, because I am waiting on the makefile from Lo.)

P.S.:
The bug fixes and latest changes since 0.1.7 are available at
https://irrbullet.svn.sourceforge.net/s ... llet/trunk

Posted: Mon Jan 31, 2011 2:58 pm
by polylux
Yep, as Sudi already stated, there is quite a bunch of functions in the code that return a reference on temporary data. I guess you should also get the warnings on the windows version of GCC.

Posted: Tue Feb 01, 2011 5:20 am
by cobra
Hi Polylux. Could you give me the function names?

If there's more than one, it happened when I did a quick check of the methods right before releasing 0.1.7 to see where I could improve the const correctness. This was probably not a good idea to do it minutes before packaging the release. Shortly after, I regretted it, but it was too late, as I had saved it all and closed the project. :) I assure you, it wasn't intentional/lack of knowledge. ;)

If you can tell me where you found them, I'll fix them for 0.1.71.

Posted: Tue Feb 01, 2011 10:24 am
by polylux
I totally understand you, this happens quite easily!

Aside from many "unused variable" warnings, this one caught my attention:

Code: Select all

const irr::core::stringc& getName() const { return (irr::core::stringc)shape->getName(); };
- Where the typecast basically makes it a temp variable you return the reference for.

Code: Select all

IRigidBody* const addRigidBody(ICollisionShape* const shape);
Similar warnings at some other pos as well.
- Warns that the qualifier is basically without effect.

Hope that helps. :)

p.

Posted: Tue Feb 01, 2011 3:43 pm
by cobra
Hi Polylux.

It seems as though you're not even using 0.1.7 (I think this because getName() was fixed between 0.1.65 and 0.1.7, minus the typo that came with it; see above). Which version are you using?

These two problems you mentioned have already been fixed (for getName(), the typo in which I somehow forgot to remove the first "return," which came with the fix included for 0.1.7) since I updated the SVN version of 0.1.7 about a week ago.

For instance, the getName() fix has been in the trunk and 0.1.7 branch for quite some time now:

Code: Select all

const irr::core::stringc& getName() { name = shape->getName(); return name; };
And I just looked at addRigidBody(), and it doesn't return a const pointer.
(I think I changed that just before releasing 0.1.7)

Anyway, thanks for the report. :)

Posted: Tue Feb 01, 2011 10:36 pm
by polylux
Hey cobra!

I can only tell you, my folder reads "irrBullet-0.1.7". Maybe I picked it in a moment when you were updating your sourceforge repo.
If you've already taken care of these issues my post can safely be disregarded :)

Cheers,
p.

Posted: Wed Feb 02, 2011 6:07 am
by cobra
Ah, yes.

I did update the official SDK download once after 27 people had downloaded.

Perhaps you were one of the 27. :)


Did you get my PM about the Linux build targets? Anyway, I got them included.


Thanks again.

- Josiah

Posted: Fri Feb 04, 2011 10:29 am
by Whirled Peas
Hit a bug here, probably something simple and stupid. I managed to load the project up in code:blocks, and got all the libraries and headers linked up, but when I compile the program it gives me this error:
You must select a host application to "run" a library...

Why am I "running" a library? most searches that I have done for this error have turned up people trying to debug one thing or another, all I wanna do is build and run the program. What host application do I need to select to "run" the library?

I know that you can do that by going into Project->Set Program Arguments->Host application and then browsing the for the program. But I dunno what program I need. any ideas?


EDIT: UPDATE, So I did a little digging and thinking and then figured to use 'rundll32' as the host application, being that it is meant to 'run' a dll file. however when I did that it still didn't do anything, although it did get rid of the error message.

I get this info from the build log:
Checking for existence: C:\...\...\Documents\irrBullet-0.1.7\source\msvc\2008\.lib.lib
Executing: "C:\...\System32\rundll32.exe" (in C:\Users\Sean\Documents\irrBullet-0.1.7\source\msvc\2008\)
Process terminated with status 0 (0 minutes, 0 seconds)
so I'm not much better off, other than figuring out how to get rid of the darned error message from before.

Posted: Fri Feb 04, 2011 2:33 pm
by cobra
Whirled Peas:
You get this error because you're trying to run a library that is meant to be linked in with an executable.

Since you already built irrBullet, just build some of the examples (full rebuild) and then run those. :)

Posted: Fri Feb 04, 2011 4:20 pm
by Whirled Peas
ah, I see, so I'm supposed to build and run the c++ files found in the 'examples' folders?

Posted: Fri Feb 04, 2011 7:42 pm
by cobra
Yes. Right now there are no MSVC project files for the examples, but I'll try and include them as soon as I can.


Be sure to read the FAQ when you come upon a problem, for it might already be answered there.

Posted: Sat Feb 05, 2011 6:35 pm
by Whirled Peas
well, here's a bit of a problem that I've run into, on the collision example I've run into this error:

error: 'time' was not declared in this scope
which was in reference to line 114:

Code: Select all

        srand ( time(NULL) );
which kind of makes sense because 'time' as far as I can tell has not been declared prior to that reference. Although I'm not sure why it didn't give me an 'undeclared identifier' error in stead. Is 'time' supposed to be a class from one of the bullet header files? Although I did double check my linker and all of the .a files were included in the right order, and the search directories have all been selected properly.


and before you ask, I did check the FAQ already


thanks in advance.

Posted: Sun Feb 06, 2011 2:05 am
by cobra
Whirled Peas:

time() is part of the C time library.

Replace "time(NULL)" with "device->getTimer()->getTime()" instead. (this change has already been made for irrBullet 0.1.71)

Good luck.

- Josiah

Posted: Sun Feb 06, 2011 7:22 am
by Whirled Peas
thanks

I'm wondering why it wasn't updated in the version I got then, I downloaded v 0.1.7.7

EDIT: doy, that's not 0.1.7.7, that's 0.1.7.7z, I misread the file extension as part of the name :lol:

Posted: Thu Feb 10, 2011 11:44 pm
by cobra
irrBullet 0.1.71 is packaged and ready for release.

The last step is to have Lo do some Linux build tests.

Expect the release announcement on February 11th (tomorrow).