Bug 31451 - mono_trace_set_printerr_handler calls g_set_print_handler instead of g_set_printerr_handler
Summary: mono_trace_set_printerr_handler calls g_set_print_handler instead of g_set_pr...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Tools (show other bugs)
Version: 4.0.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-06-29 03:37 UTC by ikolev
Modified: 2015-07-12 12:35 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description ikolev 2015-06-29 03:37:05 UTC
On line 340 in the function mono_trace_set_printerr_handler in mono-4.0.2\mono\utils\mono-logger.c g_set_printerr_handler should be called instead of g_set_print_handler.
Comment 1 Zoltan Varga 2015-07-10 15:41:16 UTC
This is already fixed in mono master and the upcoming mono 4.2.
Comment 2 ikolev 2015-07-12 10:27:36 UTC
Doesn't seem that way to me. Looking at

https://github.com/mono/mono/blob/master/mono/utils/mono-logger.c

I still see the same code:

void
mono_trace_set_printerr_handler (MonoPrintCallback callback)
{
	g_assert (callback);
	printerr_callback = callback;
	g_set_print_handler (printerr_handler);
}

while g_set_print_handler should be g_set_printerr_handler.
The same is true about the mono-4.2.0-pre-branch and mono-4.2.0-pre2-branch.
Unless the latest changes have not yet been pushed to github.
Comment 3 Zoltan Varga 2015-07-12 12:35:49 UTC
Sorry about that, should be fixed now.