[GRASS-user] v.edit bus error
Hazael Maldonado Torres
hmaldonado at itxolutions.com
Thu Aug 9 08:33:55 EDT 2007
Hi there,
Before answering the questions from William, I would like to mention that GRASS
is being run on an Intel Mac and that as far as I can tell (using the activity
monitor) it is the Intel binaries of GRASS that are being used (no Rosseta).
> Hazael, can you check Console.app for a crashlog for v.edit? It would
> be in ~/Library/Logs/CrashReporter in the log list.
There is nothing in the logs regarding the v.edit error message. I also tried at
/Library/Logs/CrashReporter
>>> http://wald.intevation.org/tracker/?func=detail&atid=204&aid=455&group_id=21
>>>
>>
>> Not related.
>>
> If it's the null message causing the v.edit bus error, then it is, since
> I found a null message in v.edit, among others.
I have written an small program to test the G_message("") vs G_message(NULL) and
I can confirm that on Mac OS X 10.4.10 G_message(NULL) triggers a bus error. The
function responsible for the error is vsprintf(). I tried the same program on
another computer running Ubuntu Linux and both G_message("") vs G_message(NULL)
works perfectly fine.
The content of the test program is listed below which contains the function
G_message() whose content was taken from GRASS's source code.
#define MSG 0
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
void
G_message (const char *msg,
...);
int
main(int argc, char **argv)
{
printf("Test for GRASS\n");
G_message("test");
printf("\n");
G_message("");
printf("\n");
G_message(NULL);
printf("\n");
return EXIT_SUCCESS;
}
void
G_message (const char *msg,
...)
{
char buffer[2000]; /* G_asprintf does not work */
va_list ap;
va_start(ap, msg);
vsprintf(buffer, msg, ap);
va_end(ap);
print_error(buffer,MSG);
}
Regards,
Hazael
More information about the grass-user
mailing list