discuss-gnustep
[Top][All Lists]
Advanced

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

Re: tests on OpenBSD


From: Sebastian Reitenbach
Subject: Re: tests on OpenBSD
Date: Thu, 23 Jun 2011 16:52:42 +0200
User-agent: SOGoMail 1.3.7

Hi again,

On Thursday, June 23, 2011 15:20 CEST, "Sebastian Reitenbach" 
<sebastia@l00-bugdead-prods.de> wrote: 
 
>  
> On Wednesday, June 22, 2011 12:47 CEST, David Chisnall <theraven@sucs.org> 
> wrote: 
>  
> > On 22 Jun 2011, at 11:43, Sebastian Reitenbach wrote:
> > 
> > > This is what I've seen too. Commenting out the line where it goes to 
> > > generates the exception in -[NSException raise] will make all tests 
> > > happy. The hanging tests, when you connect with gdb to it, you will see 
> > > they hang in the same place like Sudoku.
> > 
> > 
> > Can you try to narrow it down a bit?  Some things to try:
> > 
> > - Reduced test case just throwing an exception - does it crash?
> > - Reduced test case throwing a string with @throw - does it crash?
> > - Throwing a C++ exception instead, does that work?
> > - Using libobjc2 instead of GCC libobjc2 (completely different EH 
> > implementation), does that make a difference?
> 
> I wrote two test programs, both seem to work fine using libobjc2:

I recompiled with libobjc1, and I tested the first test program, with the 
NS_DURING below, and it still worked fine.
However, sudoku, still does hang.

Sebastian


> 
> #import <Foundation/Foundation.h>
> 
> int main(int argc, char **argv) {
> 
>         NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init] ;
>         
>         int result = 0  ;
>         
>         NS_DURING
>                 [NSException raise:@"EXCEPTIO" format:@"FORMAT"];
>         NS_HANDLER
>                 NSLog(@"%@", @"Trowing a test exception");
>                 result = 1      ;
>         NS_ENDHANDLER
>         
>         NSLog(@"Leaving ...");
>         [pool release]  ;
>         return result   ;
> }
> 
> $ obj/simple 1 2 3      
> 2011-06-23 15:19:07.861 simple[22686] Trowing a test exception
> 2011-06-23 15:19:07.867 simple[22686] Leaving ...
> 
> 
> 
> The second test program using @throw seems to work:
> #import <Foundation/Foundation.h>
> 
> int main(int argc, char **argv) {
> 
>         NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init] ;
>         
>         int result = 0  ;
>         
>         @try {
>            if (argc > 1)        {
>                 @throw [NSException exceptionWithName:@"Trowing a test 
> exception" reason:@"Testing the @throw directive." userInfo:nil];
>            }
>         } 
>         @catch (id theException) {
>                 NSLog(@"%@", theException);
>                 result = 1      ;
>         } 
>         @finally {
>                 NSLog(@"This always happens.");
>                 result += 2     ;
>         }
>         
>         NSLog(@"Leaving ...");
>         [pool release]  ;
>         return result   ;
> }
> 
> 
> 
> $ obj/simple            
> 2011-06-23 15:09:31.204 simple[30355] This always happens.
> 2011-06-23 15:09:31.210 simple[30355] Leaving ...
> $ obj/simple test
> 2011-06-23 15:09:37.859 simple[4040] <NSException: 0x2184ad68> NAME:Trowing a 
> test exception REASON:Testing the @throw directive.
> 2011-06-23 15:09:37.865 simple[4040] This always happens.
> 2011-06-23 15:09:37.865 simple[4040] Leaving ...
> 
> 
> both tested with libobjc2 and gnustep-make from svn. However, compiling and 
> running sudoku, it hangs...
> 
> I'm now going back and reinstall using libobjc1, and will retest with my test 
> program.
> 
> Sebastian
> 
> 
>  
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep
 
 
 
 



reply via email to

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