Bugs (fixed):
* Startup crash w/ error message: "A callback was made on a garbage
collected delegate of type ApiNativeMethods.raw_pb_callback"
Cause: The callback is only referenced in unmanaged c++. Without references
in managed code, the Garbage Collector deems the delegate eligible for
collection before the callback has finished execution.
Note: The original solution forced a reference in managed code by storing it
in a class-member 'keepalive' dictionary, whose life isn't bound to the
[synchronous] scope of the 'send' method. The callback would then remove
itself from the dictionary in its last line of code. While this reduced the
chance of such an error occurring, occassional crashes persisted
(particularly in low-bandwidth environments). I suspect the frequency at
which garbage-collector threads run is inversely related to the frequency
at which data arrives from the server, as the latter triggers execution of
higher-priority threads.
Steps to repro:
1. Insert a Thread.Sleep statement (1000 ms should be sufficient) after
the call that removes the last reference to the delegate (i.e., make
the thread sleep for a significant amount of time in the callback
AFTER it becomes eligible for garbage collection).
2. Build, run, and observe crash on startup.
Solution: Wrap the callback in another class, and store the wrapper
in the dictionary rather than the callback itself. The reason why this
works isn't totally clear, however its effectiveness has been verified
with the repro (described above).
The [vertical] alignment issue was only noticeable in the pnl settings dialog
(its cell params section is taller than those in other settings dialogs), where
the shorter columns list was center aligned with the taller cell params.
* Put attached props before regular (i.e., not attached) props
* Sort alphabetically, with exceptions for props that are logically
grouped together. For example Width/MinWidth/MaxWidth may be
adjacent, as they are all 'width' props.
* Improves readability
* Adds new lines to make navigating through the tags easier
* Mostly just white space changes
fix add empty lines
fix empty lines (reword commit to 'white space changes')
fix white space
Bugs (fixed):
* The volsurface graph settings dialog crashes when you click OK/Apply
Note: This fix is 'pre-emptive' because I saw the bug while working on the
vs graph settings dialog. That feat will be added shortly in a subsequent
commit (I wanted to commit the fix first so the bug wouldn't be in the
official 'feat' revision/commit).
Cause: A null ref ex is thrown in DisposeAll, because the List of IDisposables
to dispose contains null items.
Another way to fix the bug would have been to make sure null items aren't
added to these Lists in the first place. However, that places the burden (to
check for null) on the callers' shoulders, and leaves open the potential for
this bug in every place where 'DisposeAll' is called.
There were a few issues here:
* The ColorPickerPopup was binding it's own SelectedColor prop to the internal
ColorPickerControl's SelectedColor prop. The SelectedColor prop is typically also
bound to some (external) viewmodel's 'color' prop. This is problematic as
Dependency Properties can only be associated with one 'Write' binding.
* The code designed to keep various sub-color properties in sync with the
result color was confusing, and didn't seem to work. For example, the ARGB
sliders' values didn't match those of the 'result' color.
Bugs (fixed):
* The VolSurface graph colors don't reflect the settings. They appear to be
randomly generated.
Cause: The series vm's color prop was bound to 'TextColor' in the model; it
should have been bound to 'Color'