• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
vsprintf crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vsprintf crashes


  • Subject: vsprintf crashes
  • From: Alfred Van Hoek <email@hidden>
  • Date: Fri, 21 Apr 2006 20:45:00 -0400

Could someone enlighten me why the following crashes in my dylib? It used to work with the previous version of Xcode, and works ok on windows:

void dlog(char *format, ...)
{
	va_list args;
	char    buffer[255];

	va_start(args,format);

	strcpy(buffer + vsprintf(buffer,format,args), "");
	Str255 dst;

	CopyC2P(buffer, dst);

	#ifndef WIN32
		DebugStr(dst);
	#else
		OutputDebugString(buffer);
	#endif
	va_end(args);
}

Thread 0 Crashed:
0   libSystem.B.dylib        	0x90002f48 strlen + 8
1   libSystem.B.dylib        	0x90011d7c __vfprintf + 5768
2   libSystem.B.dylib        	0x90031d20 vsprintf + 224
3   My.dylib 				0x0101a964 dlog + 44 (DConPrefix.cpp:200)

Alfred

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: vsprintf crashes
      • From: Dmitry Markman <email@hidden>
    • Re: vsprintf crashes
      • From: "Justin C. Walker" <email@hidden>
  • Prev by Date: Re: tech notes not part of offline docs
  • Next by Date: Re: vsprintf crashes
  • Previous by thread: [Admin] Apple Lists Policies — Reminder
  • Next by thread: Re: vsprintf crashes
  • Index(es):
    • Date
    • Thread