discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSThread and problem posting notification


From: Philippe Roussel
Subject: Re: NSThread and problem posting notification
Date: Mon, 05 Mar 2012 12:46:29 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Hi,

Le 05/03/2012 10:52, Lucas Schnorr a écrit :
Hi,

Everything below use the latest base, gui and the gnustep runtime, from
the subversion repository at gna. All compiled with clang in an ubuntu
system, 64 bits.

I have a program that launches a thread to do some background work.
After the thread finishes, I get an exception:

2012-03-05 10:08:26.409 tobjc[6709] Problem posting notification:
<NSException: 0x7f22d8005658> NAME:NSRangeException REASON:Index -1 is
out of range 1 (in 'objectAtIndex:') INFO:{Array = ("<NSRunLoop:
0x1cfe998>"); Count = 1; Index = 4294967295; }

Could you try with the following patch ?

Index: Source/NSConnection.m
===================================================================
--- Source/NSConnection.m       (révision 34875)
+++ Source/NSConnection.m       (copie de travail)
@@ -1583,11 +1583,11 @@
   GS_M_LOCK(IrefGate);
   if (IrunLoops != nil)
     {
-      unsigned pos = [IrunLoops indexOfObjectIdenticalTo: loop];
+      NSUInteger pos = [IrunLoops indexOfObjectIdenticalTo: loop];

       if (pos != NSNotFound)
        {
-         unsigned      c = [IrequestModes count];
+         NSUInteger c = [IrequestModes count];

          while (c-- > 0)
            {


Philippe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]