On 09/23/2017 01:35 PM, fredvs wrote:
> Hello Martin.
> 
>> I can reproduce it now if not compiled with -gh
> 
> Ha here it appends even with -gh.
> 
I can't reproduce it anymore. If it is reproducible for you I fear you
need to debug yourself.

>> But sometimes there is a libc memory error
> 
> How do you get that error ? Even with -ghl + debugger I cannot have errors.
> Very difficult to debug then.
> 
Seems to be fixed with the attached patch.

Martin
diff --git a/src/drums.pas b/src/drums.pas
index 292b60c..d2b31ae 100644
--- a/src/drums.pas
+++ b/src/drums.pas
@@ -247,7 +247,8 @@ begin
  
  if noanim.value = false then
 begin
- application.lock();    
+// application.lock();    not necessary, timer tick runs in main thread context
+                        //and the application.unlock() below looks suspect
 label2.visible := true;
 
 if (posi = 1) or (posi = 9) then
@@ -469,7 +470,7 @@ posi := posi + 1;
 // Timertick.Enabled := true;
   Timertick.tag := 0 ;
   
-    application.unlock();
+//    application.unlock(); ???
  end else 
  begin
  Timertick.Enabled := false;
@@ -645,7 +646,6 @@ procedure tdrumsfo.createdrumsplayers;
 var
 i : integer;
 begin 
-
 for i := 0 to 3 do   
  begin
  uos_Stop(i);
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to