Quote from: hrb264 on April 08, 2026, 07:57:23 AMI'm playing through this now and finding 16 very difficult, I think because of the basher checks meaning it always hits the one way arrow really early![]()
System.NullReferenceException: Object reference not set to an instance of an object.
at SLXEditor.SLXEditForm.ReadLevelInfoFromForm(Boolean allowWriteBack)
at SLXEditor.SLXEditForm.CommitLevelChanges()
at SLXEditor.SLXEditForm.textbox_Leave(Object sender, EventArgs e)
at SLXEditor.SLXEditForm.chk_Lvl_AutoStart_Leave(Object sender, EventArgs e)
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.set_Checked(Boolean value)
at SLXEditor.Settings.ReadSettingsFromFile()
chk_Lvl_AutoStart.CheckedChanged -= chk_Lvl_AutoStart_Leave;
chk_Lvl_AutoStart.Checked = value;
chk_Lvl_AutoStart.CheckedChanged += chk_Lvl_AutoStart_Leave;

Quote from: WillLem on April 07, 2026, 10:39:10 PMAlways happy to accept help wherever offered! It's good to not have to always figure these things out on my ownI am SO happy to hear this.
Besides, I figured that some re-rendering prevention guard is what was needed. You helped pin it down to exactly where the guard needed to be - this is much appreciated!
Quote from: roltemurto on April 07, 2026, 09:18:38 PMI hope I don't overstep my boundaries by doing this but I just want to be helpful.

Quote from: roltemurto on April 07, 2026, 09:18:38 PMFix 1 — Re-entrancy guard on ResetLevelImage
Prevent NLEditForm_Resize from triggering a render if one is already in progress
Quote from: roltemurto on April 07, 2026, 09:18:38 PMFix 2 — Ensure UnlockBits is always called in BmpModify.DrawOn
The existing DrawOn method almost certainly does LockBits without a try/finally guarantee on UnlockBits. If any exception occurs mid-render, the bitmap stays locked forever for the lifetime of the object. Fix the locking pattern:
Quote from: roltemurto on April 07, 2026, 09:18:38 PMFix 3 (optional hardening) — Debounce resize events
Resize events can fire dozens of times per second during a resolution change. Even with the re-entrancy guard, it is worth debouncing to avoid hammering the renderer immediately after wake: