Ticket UUID: | 689258 | |||
Title: | Segmentation fault when restoring sash coords | |||
Type: | Bug | Version: | None | |
Submitter: | jaspert | Created on: | 2003-02-19 13:31:11 | |
Subsystem: | bwidget | Assigned To: | hobbs | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2003-02-21 09:05:39 | |
Resolution: | Fixed | Closed By: | hobbs | |
Closed on: | 2003-02-21 02:05:39 | |||
Description: |
We have a tool that uses the BWidget MainFrame to display data on a number of panes and notebook pages. Part of the functionality is that it can save and restore the configuration of the various subdivisions within the frame. We found that if these were saved under Windows and then restored under Linux a segmentation fault resulted. Attached is the file mre.tcl which implements our tool, and the saved state file from Windows which causes the crash when loaded under Linux (Red Hat 7.3/8.0) Here's how to reproduce it: [jaspert@spirograph Run]$ wish % source mre.tcl % RunEnv::Create dummy .mre % open EmptyWindows.shf r file4 % RunEnv::LoadViewFile file4 {600 400 0 0} Segmentation fault Also attached is a corresponding viewfile produced under Linux which does not cause the crash | |||
User Comments: |
hobbs added on 2003-02-21 09:05:39:
Logged In: YES user_id=72656 I went ahead and fixed this for 8.4. The code is actually an error - the first sash only exists when 2 panes exit. This is in 8.4.2. You will get an error now from your original code sequence. hobbs added on 2003-02-21 04:56:03: Logged In: YES user_id=72656 It's much easier on developers when problems like this are distilled down. This can be repeated in 3 lines of code: panedwindow .p .p add [frame .f -width 20 -height 20 -bg pink] .p sash place 0 2 5 It's also a core bug, not a bwidgets bug. Please reissue in the Tk tracker (unfortunately SF doesn't allow moving bugs between projects). jaspert added on 2003-02-21 02:13:57: File Added - 43020: mre.tcl Logged In: YES user_id=456242 OK I've edited mre.tcl and removed the references to other things that were lying around my system (I hope...) Also I found that after the frame is drawn by the RunEnv::Create dummy command, you can get the segfault directly with the command .mre.mainframe.frame.mainpw.mainDisplayPane.notebook.fpage/1.panedwindow sash place 0 2 5 (but change that last 5 into an 8 and it accepts the command) Hopefully that makes it easier to trace hobbs added on 2003-02-21 01:01:11: Logged In: YES user_id=72656 When trying with those files and your example, it complains about a missing image and nothing works ... perhaps rework without the images? jaspert added on 2003-02-20 18:25:47: Logged In: YES user_id=456242 You should be able to reproduce the problem with these files. I didn't develop this code I am just trying to port the tool to Linux. If I have time I'll try and find a simpler procedure that causes the segfault. hobbs added on 2003-02-20 08:39:23: Logged In: YES user_id=72656 The attached patch is not a self-contained example. Could you narrow it to a smaller code snippet? jaspert added on 2003-02-19 20:37:55: File Added - 42845: buginfo.tgz Logged In: YES user_id=456242 Oops, seems my files didn't get uploaded, I'll try again |