The same 3.2.0-6 bug with RND 3.1.1:

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
asiekierka
Posts: 143
Joined: Fri Aug 19, 2005 6:18 am
Location: Poland
Contact:

The same 3.2.0-6 bug with RND 3.1.1:

Post by asiekierka »

Look:
rocksndiamonds.exe: warning: cannot open configuration file 'C:\Documents and Settings\Adrian.SIEKIERK-57OFPP\Moje dokumenty/Rocks'n'Diamonds/editorsetup.conf'
rocksndiamonds.exe: warning: cannot open configuration file 'C:\Documents and Settings\Adrian.SIEKIERK-57OFPP\Moje dokumenty/Rocks'n'Diamonds/levelsetup/Magic CE-s/levelsetup.conf'
rocksndiamonds.exe: warning: using default setup values
-------------------------------------------------------------------------------
rocksndiamonds.exe: warning: unknown token(s) found in config file:
rocksndiamonds.exe: - config file: 'C:\rocksndiamonds-3.1.1\rocksndiamonds-3.1.1/levels/minigame/graphics/graphicsinfo.conf'
rocksndiamonds.exe: - dynamic token: 'custom.12.left.anim_mode'
-------------------------------------------------------------------------------
rocksndiamonds.exe: warning: cannot open configuration file 'C:\Documents and Settings\Adrian.SIEKIERK-57OFPP\Moje dokumenty/Rocks'n'Diamonds/editorsetup.conf'
rocksndiamonds.exe: warning: cannot open configuration file 'C:\Documents and Settings\Adrian.SIEKIERK-57OFPP\Moje dokumenty/Rocks'n'Diamonds/editorsetup.conf'
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
And look at RND 3.2.0-6 bug stderr...

EDIT
IT work with that level in levels RND folder! no my documents!
GraphicsPack project: 90%
IconXT project: 100% (version final is ready)
User avatar
Rockford4ever
Posts: 152
Joined: Tue Jan 03, 2006 7:41 pm
Location: Belgium

Post by Rockford4ever »

It looks like the bug is still a bit different, since here the stderr does'nt search for editorcascade.conf. But hey, It's still a bug...
I don't know how that happened, did you just open the level editor?
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

asiekierka: Can you please describe the exact steps that I have to do to reproduce that crash on a Windows machine?

I never encountered any crash neither in version 3.1.1 nor in version 3.2.0-6 on my Linux box (but I have tested 3.2.0-6 on a Windows XP system and had a crash there as described in the other thread -- but don't know how to exactly reproduce it).

As this crash seems to occur only under Windows, and as I do not develop (especially debug!) on that platform, I need help from anybody who uses this operating system.

So, what exact steps have to be executed to reproduce that crash
- under version 3.1.1, and
- under version 3.2.0-6
when using Windows?

I really want to fix this, but currently I don't know how! :-(

(BTW1: Those warnings can be ignored -- they just say that a file can't be opened. In those cases, the program always uses safe default values.)

BTW2: Have to work again this week, so I will answer all those other posts and questions this weekend -- please stand by! :-)
asiekierka
Posts: 143
Joined: Fri Aug 19, 2005 6:18 am
Location: Poland
Contact:

...

Post by asiekierka »

when using Windows?
Holger that speak.

The my documents directory have spaces in it, this is proably a problem!

Not, in 3.1.1 it work when not in My Documents, 3.2.0-6 will not work fully!
GraphicsPack project: 90%
IconXT project: 100% (version final is ready)
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> when using Windows?
> Holger that speak.

I mean: "When using Rocks'n'Diamonds under Windows".

It does not crash under Linux. (Or does it? At least not on my box.)

> The my documents directory have spaces in it, this is proably a problem!

No, this is should not be problem.

> Not, in 3.1.1 it work when not in My Documents, 3.2.0-6 will not work fully!

Can you PLEASE give a more specific description?

I cannot fix bugs that I cannot reproduce.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Well.... let's see...
It happens only on Windows
It happens when switching levelsets or entering the level creator.
But it doesn't always happen. For example, if you start RND and directly switch levelset or enter the level creator, then it probably works ok. But if you enter the Setup and goes back to level creator, or switch to another levelset and then switches levelset again, THEN it could happen.

I've been thinking, and I compared the old source directory with the new source directory. A total of 25 files has been changed. Here are the suspicious ones:
screens.c
main.c/main.h
editor.c
files.c/files.h
init.c

Although the most suspicious ones of these are main, screens and init. I don't think the problem is within editor.c or files.c/files.h. Of course, these are just plain guessings. I haven't compared every single detail in those files (yet), but I'm suspecting them most...

I've also been thinking if it has to do with the new editorcascade stuff...?

A better bug report than that, I don't have yet.
But the reason why it doesn't happen in Linux is probably because it's an SDL problem. Maybe updating SDL version could fix the problem (if it's possible to update...), but I'm not sure and I think it would be best to fix the problem without updating SDL version.
That's it for now...
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

Zomis, thanks a lot for your bug description -- although it seems that the bug is not directly reproducible, it will help debugging better than nothing at least.

I don't think that it's SDL, as I haven't touched many things of the graphical representation layers. But I think that you're right with the element list cascading stuff, which is new and is a change of the level editor code.

I just wonder why it crashes in the level set selection then... :-o
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Holger wrote:I just wonder why it crashes in the level set selection then... :-o
So do I... since it crashes when loading a levelset (but not always), I wonder why it doesn't crash when starting the game...?

I don't know if it's good to know for you, but I think I got an "editorcascade.conf" file in my documents\RND for some reason...
And why doesn't the command --execute "print editorcascade.conf" work?
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> So do I... since it crashes when loading a levelset (but not always), I
> wonder why it doesn't crash when starting the game...?

BTW: Do you still have crashes with the updated 3.2.0-6?

> I don't know if it's good to know for you, but I think I got an
> "editorcascade.conf" file in my documents\RND for some reason...

This is as expected. As soon as you use the element list cascade buttons in the editor element selection list, the file is created to restore your cascading settings when you run R'n'D the next time.

> And why doesn't the command --execute "print editorcascade.conf"
> work?

Because no such command exists! ;-)

It would be useless, as it's only a configuration file like "setup.conf", which works on reliable default values if it does not exist.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Holger wrote:BTW: Do you still have crashes with the updated 3.2.0-6?

This is as expected. As soon as you use the element list cascade buttons in the editor element selection list, the file is created to restore your cascading settings when you run R'n'D the next time.

Because no such command exists! ;-)

It would be useless, as it's only a configuration file like "setup.conf", which works on reliable default values if it does not exist.
Nope. With the updated 3.2.0-6 it works great. I wonder what exactly caused the bug...? (Haven't tested the new 3.1.2 yet though, but I expect it to work).

Ah, then I understand why that command isn't there... :) But couldn't editorcascade be merged into setup.conf? Or maybe that also would be useless...
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> Nope. With the updated 3.2.0-6 it works great.

Goood to know. :-)

> I wonder what exactly caused the bug...?

I free()'d up some memory and then happily used it. Bad idea! ;-)

As this bug happened only under Windows (which seems to be more strict here -- or maybe Linux uses some sort of FIFO (first in, first out) strategy for freed memory?), I ran R'n'D within "valgrind", which perfectly showed me where this bug was hidden. Great tool! :-)

> (Haven't tested the new 3.1.2 yet though, but I expect it to work).

3.1.2 does not yet have the new cascading element lists...

> Ah, then I understand why that command isn't there... But couldn't
> editorcascade be merged into setup.conf? Or maybe that also would be
> useless...

Yes, of course it could! But then you would always have to go to the setup menu and save the setup! Or (if R'n'D would automatically save it) you would automatically save setup changes that you did not want to save. Therefore it's a separate config file! :-)
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Holger wrote:I free()'d up some memory and then happily used it. Bad idea! ;-)

As this bug happened only under Windows (which seems to be more strict here -- or maybe Linux uses some sort of FIFO (first in, first out) strategy for freed memory?), I ran R'n'D within "valgrind", which perfectly showed me where this bug was hidden. Great tool! :-)
Ah. Freeing memory and then using it is indeed a bad idea, I've done it myself. Although Delphi gives me an "Access Violation" error when doing it. But it's good to know that SDL results in a fatal segment error.

What's that valgrind tool? Could you give me a link to it? It sounds useful. But maybe it's only for C-programs?
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> But it's good to know that SDL results in a fatal segment error.

Well, in fact it has nothing to do with SDL. SDL just adds a handler to catch the crash, issue an error message and then try to leave the system in a state as sane as possible.

> What's that valgrind tool?

From the "About" page:

"Valgrind is a GPL'd system for debugging and profiling Linux programs. With Valgrind's tool suite you can automatically detect many memory management and threading bugs, avoiding hours of frustrating bug-hunting, making your programs more stable. You can also perform detailed profiling to help speed up your programs."

> Could you give me a link to it?

Sure: http://www.google.com/search?q=valgrind&btnI="I'm Feeling Lucky"

;-)

> It sounds useful. But maybe it's only for C-programs?

No, not only C programs -- again from the "About" page:

"Valgrind works with programs written in any language. Because Valgrind works directly with program binaries, it works with programs written in any programming language, be they compiled, just-in-time compiled, or interpreted."

It's a great tool! And it's free! (...as in "speech" and in "beer". :-) )
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Ah, but it's only for Linux..? There went my luck...

Interesting btw that it's current version is 3.1.0, while RND is 3.1.2 ;)
Post Reply