ddd does not restore window sizes

Hi there,

I use ddd alot for Perl (yes, it works with perl very well), and thus it became very important for me.

Now a bug has appeared in openSUSE 11.3, where everything was still ok in openSUSE 11.2.

In ddd, the user can modify the sizes of the three main windows: the data display window, the source window and the command line window. The values for the sizes are getting saved into ~/ddd/init, at the very bottom of the init-file. Several variables values are set to 1 at the start of ddd, regardless of the windows sizes real values, and thus the sizes are lost and have to be set manually at each new start of ddd. You can verify this in modifying the windows sizes and leaving ddd. Now the correct sizes are to be found in ~/.ddd/init, but if you start ddd anew, they are overwritten again.

I’ve compiled ddd from source to check if that would fix the problem, but nada. Also, I’ve installed the rpm from openSUSE 11.2 in openSUSE 11.3 to check if the bug comes with the newer version, but the bug was also there, so it must be something with the environment.

Can you confirm the problem, and are there any ideas how to solve the issue? :expressionless:

bump

I’m getting this too … try this workaround:

copy /usr/share/X11/app-defaults/Ddd to your home directory, and change Ddd*saveOptionsOnExit to “off” in this new file.

The init file should no longer be overwritten. The window sizes options don’t make very much sense to me, but I found the following configuration was what I wanted:

! Window sizes.
Dddgraph_edit.height: 80
Ddd
source_text_w.columns: 120
Dddsource_text_w.rows: 80
Ddd
code_text_w.columns: 1
Dddcode_text_w.rows: 1
Ddd
gdb_w.columns: 20
Ddd*gdb_w.rows: 20

(note these are in my .ddd/init file)

Thanks for the workaround, I’ve just tried it and its helping. :slight_smile:

I’ve modified the Ddd file in /usr/share/X11/app-defaults directly (using root),
because I don’t want to have the file in my home directory (its not hidden, is it).

Then I copied the window-sizes-block of your init file into my init-file, and tried altering
the rows and column values until it was ok with my desktop resolution.

Its only a workaround, but its helpful, since now I don’t have to resize ddd’s panes at every
start.

I had a **much more serious problem with ddd **over the last 2 years since I upgraded to openSUSE 11.3 and then to 11.4, which is now solved, thanks to the information I got from your post.

Whenever I try ddd on a C project I get the innocuous message about the UTF-8 problem and notice that output stops at the first ‘L’ of the developers name: “Barbara L(ue)ttkehaus” - the u-umlaut obviously causes grief …
But far worse - I see no source code window only the GDB window. When I then try File -> Open Source and select “code.c” I get the following in the (only) GDB window:
Line 1 of code.c is at address 0x804a048 <initcode> but contains no code.

I always assumed that this behaviour was caused by the UTF-8 incompatability. What I did not realize until today, is that the initial contents of my ~/.ddd/init is:

! Window sizes.
Dddgraph_edit.height: 1
Ddd
source_text_w.columns: 120
Dddsource_text_w.rows: 1
Ddd
code_text_w.columns: 1
Dddcode_text_w.rows: 1
Ddd
gdb_w.columns: 120
Ddd*gdb_w.rows: 66

which squashes the source windows nearly closed at the top of the large GDB window. You can actually pull that window open with the little square button and lo and behold, there is the source code, despite the ominous message “but contains no code”, which made me think there is no code loaded. As you remarked, the init file is overwritten every time ddd is exited. With your tip that should be fixed.

Thanx a million

PS: obviously I did not have to do much debugging in the last 2 years but it was always bugging me (pun intended)

  1. Following on from my previous post about a serious problem with ddd I found that Leitrim94’s workaround did not fully fix my problems. Whenever I start ddd it still opens with the full window area covered by the GDB window - this in spite of the ~/.ddd/init file not being altered anymore. The only thing which has changed, is that the total height and width has increased to the new values in the ‘init’ file.

  2. Interestingly I noticed something else, which seems to be closely related: whenever I do “View -> Machine Code” or any other View window on or off: all the windows flicker to full size - the GDB being last and ddd is left in the state it starts in now initially. Every time I change View windows I have to pull down the GDB window to uncover the window underneath - first the machine code window, which is also full size initially; then pull down that to uncover the source window.

This is a very repeatable bug and is not the behaviour ddd used to have before openSUSE 11.2 - I have been using ddd for at least 8 years and it is and has always been a wonderful tool. Once you know, it is not very hard to do those little steps but very frustrating when you do not realize what is wrong. That’s why I posted these two detailed descriptions.