[Kmymoney] Graceful SQL error handling

Alvaro Soliverez asoliverez at kde.org
Wed Apr 16 10:43:52 UTC 2014


Hello Phil,
Just to be on the same page. What version are you running, on Linux and Windows?
Regards,
Alvaro

On Wed, Apr 16, 2014 at 5:06 AM, Phil Richardson
<ppslim+kmymoney at gmail.com> wrote:
> Absolutely.
>
> I see it as two conditions on occasion. Yesterday as an example the computer
> slept for the day.
>
> When it woke up, it had a visible SQL error exception window, though I
> cannot say for certain how long it took (though it was under 10 mins for
> waking to checking).
>
> When this exception occurred, it was due to the TCP connection having been
> closed. It did not attempt to start a new one, didn't ask me for any other
> info.
>
> After acknowledging the error, I let it be for a few minutes (I'm a coffee
> person and I needed on). On return, there was no error, but no other
> prompts/actions.
>
> Given past experience, I selected to exit from the file menu without taking
> any other action. The application clearly was not in a happy mood to proceed
> and Windows 7 did the whole "Looking for solution" dialogue due to it
> closing unexpectedly.
>
> I'll remember to grab some screenshots next time.
>
> I highly suspect the crash / abort at the end was when the app was
> attempting to perform the required SQL database updates, to mark the session
> over. This is suspected due to the "Another users has this open" when I
> started it again.
>
> Typically though, I will return the machine from sleep (I do try to avoid
> this), or change networks (I try to avoid, but not always possible) and
> there will be no error. Again, experience tells me to exit the application.
>
> Just clicking the close button (big windows red X in the top right) and it
> wont do anything. Quite literally nothing, no exit, no error. I have to end
> the process, or use Quid from the file menu.
>
> So yes, something is not quite right.
>
> Suggestions on what I can do to get more data on what actually is happening,
> and I will be more than happy to collect.
>
>
> On 16 April 2014 03:53, Fernando Vilas <fvilas at iname.com> wrote:
>>
>> On Tuesday, April 15, 2014 18:57:38 Phil Richardson wrote:
>> > So error handling seems to be something that needs a little improvement.
>> >
>> > I use KMyMoney using MySQL. Both on windows as a client local to the
>> > network it is on, as well as remotely over a VPN on Ubuntu (though only
>> > very occasionally).
>> >
>> > Windows being the primary client, I frequently have to swap between
>> > wireless and wired networks, as well as seeing the machine sleep.
>> >
>> > The network switch is not smooth (damn Dell for not providing a combined
>> > network interface with shared MAC), so my IP will change during the
>> > interface swap. Sleeping will also obviously potentially cause long
>> > periods
>> > in which the TCP channel may close.
>> >
>> > Overall, this leaves me with issues when I have KMyMoney open.
>> >
>> > I may only occasionally get an exception window about the error, but
>> > near
>> > always, I find KMyMoney still wants to try and use the closed MySQL
>> > connection long after it is closed.
>> >
>> > This can prompt the app to stall, not respond and otherwise act in an
>> > unfriendly way until I can close it.
>> >
>> > Is there not more that can be done during a SQL driver exception, such
>> > as
>> > instantly close the application without any further attempts to use the
>> > closed socket?
>>
>> It used to crash... The stall you are seeing should not be using the
>> closed
>> socket. Rather, it should be detecting that the connection was closed and
>> attempting to open a new one. If that is not the case, it needs fixing...
>>
>> Another option would be to percolate an error up the stack until the user
>> is
>> told that the connection was closed unexpectedly, and should be
>> reinitiated
>> manually from the menu.
>>
>> Thoughts?
>>
>> --
>> Thanks,
>> Fernando Vilas
>> fvilas at iname.com
>>
>> _______________________________________________
>> KMyMoney mailing list
>> KMyMoney at kde.org
>> https://mail.kde.org/mailman/listinfo/kmymoney
>>
>
>
> _______________________________________________
> KMyMoney mailing list
> KMyMoney at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney
>


More information about the KMyMoney mailing list