discuss-gnustep
[Top][All Lists]
Advanced

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

GSFormat with %C, regression between 1.3.2 and 1.10.0


From: andre levy
Subject: GSFormat with %C, regression between 1.3.2 and 1.10.0
Date: Wed, 27 Oct 2004 11:17:23 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910

Hi all,

GSFormat causes a crash when used with format "%C".

This is something that used to work with GNUstep 1.3.2 and crashes with
GNUstep 1.10.0 using MinGW. It works on OSX.

Using this code (appends an unichar 'A' to a mutable string):


On Mac OS X:

cougar:/tmp fred$ cat AppendUnichar.m
#import <Foundation/Foundation.h>

int main()
{
        NSAutoreleasePool *thePool = [[NSAutoreleasePool alloc] init];
        NSMutableString *theString = [NSMutableString string];

        [theString appendFormat:@"%C", (unichar)0x41];

        NSLog( @"[%@]", theString );

        [thePool release];

        return 0;
}

cougar:/tmp fred$ cc -o AppendUnichar -framework Cocoa AppendUnichar.m
cougar:/tmp fred$ ./AppendUnichar
2004-10-26 18:37:35.982 AppendUnichar[766] [A]

cougar:/tmp fred$

On GNUstep 1.3.2 on mingw, with gcc 3.2:

fred@FLEA /c/tmp/AppendUnichar
$ shared_obj/ix86/mingw32/gnu-gnu-gnu/AppendUnichar.exe
2004-10-26 18:44:03.988 AppendUnichar.exe[2020] [A]

fred@FLEA /c/tmp/AppendUnichar




On GNUstep 1.10.0:

AppendUnichar.e caused an Access Violation at location 6de58669 in
module gnustep-base_d.dll Reading from location ffffffff.

Registers:
eax=0022e7e0 ebx=00000000 ecx=0022e7e0 edx=00000002 esi=00000108
edi=0022e060
eip=6de58669 esp=0022e7d0 ebp=0022f718 iopl=0         nv up ei pl zr na
po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000
efl=00000246

Call stack:
6DE58669  gnustep-base_d.dll:6DE58669  GSFormat  GSFormat.m:985
        ...
        
        T (PA_CHAR, pa_char, int); /* Promoted.  */
>    T (PA_WCHAR, pa_wchar, wint_t);
        T (PA_INT|PA_FLAG_SHORT, pa_short_int, int); /* Promoted.  */
        T (PA_INT, pa_int, int);
        ...

6DE69D71  gnustep-base_d.dll:6DE69D71  _i_GSMutableString__appendFormat_
 GSString.m:2803
        ...
        #endif
            }
>      GSFormat((GSStr)self, fmt, ap, nil);
          _flags.hash = 0;// Invalidate the hash for this string.
          if (fmt != buf)
        ...

004013AE  AppendUnichar.exe:004013AE  main  AppendUnichar.m:8
        ...
        NSMutableString *theString = [NSMutableString string];
        
>    [theString appendFormat:@"%C", (unichar)0x41];
        
        NSLog( @"[%@]", theString );
        ...

0040122D  AppendUnichar.exe:0040122D
00401258  AppendUnichar.exe:00401258
7C581AF6  KERNEL32.dll:7C581AF6  GetVolumeInformationA


Of course, there are plenty of workarounds, but I definitely don't
understand what is going on there in GSFormat.m

Don't hesitate to direct me to a more appropriate mailing list if
discuss is not the correct one to report issues.

Thanks for all the great work you all do on GNUstep,

--andre




reply via email to

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