-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yet more frame frailty #30
Comments
Add another unit test for findbox. Part of series of changes to help with #30.
Also see #6 for yet more. General issue: Frame assumes quite consistently that the bounds max % line height is 0 and expects the caller to tend to this detail. Observation: I wonder if the first version of Frame was fixed width / fixed height only and variable width support was retrofitted? |
There have been several frame bugs related to the fact that Frame.box is a slice but with manual bounds management via Frame.nalloc and Frame.nbox. As a result, it was difficult and subtle to use Go constructs like append on the slice of frbox objects. Make this code more idiomatic and hopefully less buggy (in pursuit of great robustness per #30) by making Frame.box a true Go slice.
Another one. This is from executing a shell command that made a lot of output. The bad text.go line does t.fr.Delete(0, t.fr.GetFrameFillStatus().Nchars) which I would expect to aways succeed.
|
In an attempt to catch a race, I instrumented Frame.Init, Delete, Insert with a global mutex. Same outcome. More evidence of Nchars getting out of sync :-( |
And while typing in a frame just now:
|
We would appear to be running frame code from multiple go routines. In particular:
and obviously from And... |
Add code that permits frame.Delete and frame.Insert to validate the box model before and after execution. Use the -validateboxes flag to enable this mode. Part of ongoing work to address #30.
Now, that's interesting. |
I will remove the global so that every Frame instance can proceed in parallel. And maybe funnel interaction with Text's Frame through a channel? |
Frame was using a global Frame object for temporary storage during box insertion but was being accessed by different Go routines. This was highly not thread-safe. Make the Frame object different for each Insert operation. This change improves #30. It also fixes $PLAN9/bin/E.
|
There have been several frame bugs related to the fact that Frame.box is a slice but with manual bounds management via Frame.nalloc and Frame.nbox. As a result, it was difficult and subtle to use Go constructs like append on the slice of frbox objects. Make this code more idiomatic and hopefully less buggy (in pursuit of great robustness per #30) by making Frame.box a true Go slice.
Add an additional robustness check to Frame for chop failures. Part of improving #30.
Two additional/new issues:
|
Attempting to delete text from an already empty box? Stack trace looks like a race condition between the filesystem thread and the a different thread?
|
Today I was getting actual work done with edwood. |
Part of work on #30. Make chop immune to failure when attempting to chop the very end of the box model.
canfit was mis-measuring boxes and falsely wrapping when it shouldn't Part of addressing #30. This change makes canfit use the full width of the window.
Visual damage: type some invalid characters and tab and there will be some pixel turds on the screen. |
Unusual crash:
|
Previous two issues are connected. The crash happens when the state of the page is invalid after the tab/insert. |
Thread safety (as of b8089af) seems to improve robustness. |
I haven't seen any crashes in Frame for weeks now. I declare this fixed |
Frame has some bugs. Make it more robust.
The text was updated successfully, but these errors were encountered: