Hi Alan,
It is not zeroed out or nil'd on the Smalltalk side. The PlatformFunction is called with an actual Number.
So I guess there is some situation that needs to be checked before SQLEndTran is called.
>But I'd have suspected that at the driver level a rollback
transaction would have failed with a you're not connected >rather than a
general protection fault.
So would I. I can see the error code returned from the platform call is 53, and that is a GPF read error.
And it seems it is related to long inactivity, because I only get the error when I haven't started new sessions for quite a while, so that the ones that get unregistered are "very" old. If I constantly work in the app, rolling back works like a charm.
I tend to exitWith: nil the PrimitiveFailed for now, even if it leaves a bitter taste... I cannot be sure that Windows survives the real problem for a long time, because invalid handles are not a good omen... So I'll just see how far I get with it...