[Gnustep-cvs] r39771 - /libs/back/branches/gnustep_testplant_branch/Source/gsc/gscolors.c

2016-05-16 Thread gna
Author: mlytwyn
Date: Mon May 16 19:24:26 2016
New Revision: 39771

URL: http://svn.gna.org/viewcvs/gnustep?rev=39771=rev
Log:
Try to address real problem of unknown crash

Modified:
libs/back/branches/gnustep_testplant_branch/Source/gsc/gscolors.c

Modified: libs/back/branches/gnustep_testplant_branch/Source/gsc/gscolors.c
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/gsc/gscolors.c?rev=39771=39770=39771=diff
==
--- libs/back/branches/gnustep_testplant_branch/Source/gsc/gscolors.c   
(original)
+++ libs/back/branches/gnustep_testplant_branch/Source/gsc/gscolors.c   Mon May 
16 19:24:26 2016
@@ -280,35 +280,38 @@
Temp = (r < g ? r : g);
Temp = (b < Temp ? b : Temp);
diff = V - Temp;
-   if (V == r)
- {
-  if (diff == 0.0)
+  
+  // TESTPLANT-MAL-05162016: customer getting crashes in this
+  // code somehwere - only case I can find that could cause one
+  // is V == 0...
+  if (V == 0.0)
+{
+  _hue_component = 0;
+  _saturation_component = 0;
+  _brightness_component = r;
+}
+else
+{
+  if (V == r)
 {
-  // Invoke same code as r=g=b above...
-  H = 0;
-  // diff == 0 so diff/V == 0
-  // V already == r
+  H = (g - b)/diff;
+}
+  else if (V == g)
+{
+  H = (b - r)/diff + 2;
 }
   else
 {
-  H = (g - b)/diff;
+  H = (r - g)/diff + 4;
 }
- }
-   else if (V == g)
- {
-   H = (b - r)/diff + 2;
- }
-   else
- {
-   H = (r - g)/diff + 4;
- }
-   if (H < 0)
- {
-   H += 6;
- }
-   _hue_component = H/6;
-   _saturation_component = diff/V;
-   _brightness_component = V;
+  if (H < 0)
+{
+  H += 6;
+}
+  _hue_component = H/6;
+  _saturation_component = diff/V;
+  _brightness_component = V;
+}
  }
color->field[0] = _hue_component;
color->field[1] = _saturation_component;


___
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs


[Gnustep-cvs] r39770 - /apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m

2016-05-16 Thread multix79
Author: rmottola
Date: Mon May 16 11:36:35 2016
New Revision: 39770

URL: http://svn.gna.org/viewcvs/gnustep?rev=39770=rev
Log:
clean PID before running

Modified:
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m

Modified: apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m?rev=39770=39769=39770=diff
==
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m   
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m   
Mon May 16 11:36:35 2016
@@ -250,7 +250,7 @@
   kill(subProcessId,SIGINT);
 #else
   HANDLE proc;
-  NSLog(@"Windows - sending interrupt to %d", subProcessId);
+
   proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)subProcessId);
   if (proc == NULL)
 {
@@ -275,7 +275,8 @@
 // action methods for toolbar...
 - (void) go: (id) sender
 {
-  // [self setStatus: @"Running..."];
+  /* each run makes a new PID but we parse it only if non-zero */
+  [self setSubProcessId:0];
   [debuggerView putString: @"run\n"];
 }
 
@@ -295,6 +296,8 @@
 {
   // [self setStatus: @"Restarting..."];
   [self interrupt];
+  /* each run makes a new PID but we parse it only if non-zero */
+  [self setSubProcessId:0];
   [debuggerView putString: @"run\n"];
   // [self setStatus: @"Running..."];
 }


___
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs