Very often, the app freezed and crashed under WineHQ when i moved the cursor of the mouse on certain elements of the gui. This was due to the timer interval set at 1ms for screen.mousex and y. Under Wine, Screen.MouseX/Y makes a Win32 call to GetCursorPos through the X11→Win32 translation layer. This bridge can block the main thread if there is a synchronization issue with the X server, causing an apparent freeze. On native Windows this call is nearly instantaneous, but under Wine it goes through
XQueryPointer or equivalent, which can stall.
Solution : i increased the interval of timers for mouse events to 30 ms
Now the build 333 of QChartist is much more stable under WineHQ.
If you have not made it yet, run update to obtain the build 333 ! Or if you are on build 332, download the archive of the build 333 from the website and overwrite the files.
The app is still freezing and crashing sometimes under WineHQ.
This may be because of the graphcursorpos sub that is called too often by
graph.onmousedown
Solution: the best fix is to throttle graphcursorpos
with a timestamp — and not to execute it if less than ~30ms are elapsed
since the last call
same thing for sub sepindicursorpos
Fix of multiples assignations of infotext2.Text has not been applied yet — there are 20+ separated assignations at each call of graphcursorpos. It is probably the remaining cause of crashes because infotext2.Text = forces redraw X11 synchrone under Wine.
Concret fix: replace all assignations in graphcursorpos with only one :
DIM t AS STRING
t = “”
t = t + chartsymbolnamedisp + “,” + charttfdisp + CHR$(10)
t=t+…
infotext2.Text = t
Added IF LIKE(frmmain.caption, “wait“) = 1 THEN EXIT SUB in
sub graphcursorpos and sepindicursorpos
build 334
Cheers and enjoy!