Page 2 of 2

Posted: Thu Feb 03, 2005 11:37 am
by Pajarico
Flumminator wrote:Obvious errors like this one can (and should) easily be detected during compilation.

Why not set a breakpoint on 'Error'?
The problem is that i don't know how to set a breakpoint. Can you tell me how to do it?

:wink:

Posted: Thu Feb 03, 2005 11:54 am
by Pajarico

Code: Select all

lxuser@localhost lxuser $ rocksndiamonds.sdl -v
rocksndiamonds.sdl: warning: cannot open configuration file '/home/lxuser/.rocksndiamonds/editorsetup.conf'
rocksndiamonds.sdl: gadget incomplete (missing Bitmap)
rocksndiamonds.sdl: aborting
There is no editorsetup.conf on my entire hd.

:wink:

Posted: Fri Feb 04, 2005 11:24 pm
by Holger
[No idea why I posted my last post as "Guest". Probably I logged out without noticing... ;-) ]

> Obvious errors like this one can (and should) easily be detected during compilation.

Yes, that's right of course. But I think it should only generate a warning, but not an error, as it is a semantical error, but not a syntactical error. (And strictly speaking not even a semantical error...) But compiler creators probably know better -- until now, it was just an easy way to get a stack trace if the target audience may have no deeper knowledge on debugger handling...

> Why not set a breakpoint on 'Error'?

For developers, this would be the obvious thing to do, yes. :-)

> There is no editorsetup.conf on my entire hd.

That's no problem -- if there's no editorsetup, then reliable defaults are used. Therefore, only a warning is generated. (Probably this should better be "info" log level rather than "warning" ...)

Posted: Mon Feb 07, 2005 11:10 am
by Pajarico
> Why not set a breakpoint on 'Error'?

For developers, this would be the obvious thing to do, yes. :-)
Tell me how to set a breakpoint.

Posted: Sat Feb 12, 2005 11:31 pm
by Holger
> Tell me how to set a breakpoint.

First make sure that R'n'D was compiled with the "-g" switch to include debugging symbols in the program binary. To achieve this, go to the R'n'D base directory and change the line "# DEBUG = -DDEBUG -g" in "src/Makefile" to "DEBUG = -DDEBUG -g". Then type "make clean; make sdl". This should recompile the game, but now with debugging symbols.

Run R'n'D in "gdb", the GNU debugger, by starting it with "gdb ./rocksndiamonds" in the R'n'D directory. Set the breakpoint by typing the following: "break gadgets.c:992". Then run the game, by typing "run -v". (The "-v" is just the R'n'D "verbose messages" switch.)

Instead of terminating, the debugger should stop at that line. Now you can type "bt" to get the program stack backtrace.

Posted: Sun Feb 13, 2005 1:14 am
by Pajarico
This is weird, now i compile without uncommentig the debug line and it works, don't know what i did.
At least i've learnt how to set a breakpoint. :D

Posted: Sun Feb 13, 2005 2:27 pm
by Holger
> This is weird, now i compile without uncommentig the debug line and it works, don't know
> what i did.

So you haven't changed the "src/Makefile" at all, but just recompiled by "make clean; make sdl"?

That's strange -- but I'm glad to hear that it works now.

> At least i've learnt how to set a breakpoint.

:-)

Posted: Sun Feb 13, 2005 3:08 pm
by Pajarico
So you haven't changed the "src/Makefile" at all, but just recompiled by "make clean; make sdl"?
Yes, exactly. Me start to think that sdl libs and rocksndiamoonds were compiled with differents versions of gcc, maybe was that.

Posted: Sat Mar 05, 2005 4:00 pm
by Guest
I can't strat too. WINDOWS Version 3.10, unpacked from zip archive. If I try to start it, i got this:

C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: warning: cannot open configuration file 'C:\My Documents/Rocks'n'Diamonds/setup.conf'
C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: warning: using default setup values
C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: SDL_DisplayFormat() failed: Out of memory
C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: aborting

HOW TO START???

Posted: Sat Mar 05, 2005 5:39 pm
by Holger
> C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: warning: cannot open
> configuration file 'C:\My Documents/Rocks'n'Diamonds/setup.conf'
> C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: warning: using default setup values

These warnings can safely be ignored.

> C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: SDL_DisplayFormat() failed: Out of memory
> C:\My Documents\Rocks'n'Diamonds\rocksndiamonds.exe: aborting

Here we have the reason why you cannot start R'n'D: You ran out of free memory!

How much memory (RAM) have you installed on your computer?

Posted: Sun Mar 06, 2005 1:06 pm
by Guest
64 MB RAM have I full.

Posted: Sun Mar 06, 2005 2:53 pm
by Holger
How much free memory did you have available when you tried to start R'n'D?

(R'n'D is quite a bit memory-hungry, probably more than it should be, but 64 MB physical RAM should be sufficient. But of course it depends on the amount of *free* memory when starting the game.)

Posted: Sun Mar 06, 2005 3:47 pm
by Guest
FREE??? But where I can see free memory, not full?

Posted: Sun Mar 06, 2005 4:00 pm
by Holger
> FREE??? But where I can see free memory, not full?

You mean there is no way to view the currently used and free memory under Windows???

What about the task manager? I think it also shows the memory usage of each process...

Besides that, the SDL version of R'n'D (and therefore the Windows version) seems to eat up quite some memory -- when loading the BD2K3 level set, it uses nearly 100 MB memory (which is also strange to me). When not loading sets with custom artwork, it needs something around 30-40 MB, which should work fine on your system.

You can make R'n'D use less memory for graphics by using 16 bit color depth instead of 32 bit color depth on the desktop, btw...

But it seems that I should further investigate the memory hunger of R'n'D...