Bug 19436 - [eglib] GMarkup XML parser can't handle hyphens underscores and periods in element names.
Summary: [eglib] GMarkup XML parser can't handle hyphens underscores and periods in el...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: master
Hardware: PC All
: --- normal
Target Milestone: ---
Assignee: Aleksey Kliger
URL:
Depends on:
Blocks:
 
Reported: 2014-04-30 17:18 UTC by David Schmitt
Modified: 2018-04-16 18:27 UTC (History)
4 users (show)

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


Attachments
example project and binaries (4.02 MB, application/gzip)
2014-04-30 17:18 UTC, David Schmitt
Details


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 David Schmitt 2014-04-30 17:18:50 UTC
Created attachment 6686 [details]
example project and binaries

Steps to reproduce:

  * Create empty application referencing log4net
  * add log4net section to app.config
  * deploy log4net.dll to a subdirectory and add that directory to the privatePath in the app.config

Expected outcome: log4net is found in configured privatePath in all cases

Actual outcome: probing for log4net causes a System.IO.FileNotFoundException: Could not load file or assembly 'log4net, ...' if the log4net section is before the runtime section in the app.config file.



I've added a example project demoing the effect. running the test exe in the ProbingPathTest/bin/Works directory finds the log4net dll, with the config in the ProbingPathTest/bin/Fails the exception is thrown.


I'm testing on $ mono --version
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
Comment 1 Ludovic Henry 2018-04-05 20:49:01 UTC
Hi,

Thank you very much for the reproduction case, I can reproduce with 5.15.0.45 (master/df33c092de3).

Observed behavior:

 - download and unzip https://bugzilla.xamarin.com/attachment.cgi?id=6686
 - $> cd ProbingPathTest/bin/Fails
 - $> mono ProbingPathTest.exe # Fails

Expected behavior:

 - download and unzip https://bugzilla.xamarin.com/attachment.cgi?id=6686
 - $> cd ProbingPathTest/bin/Works
 - $> mono ProbingPathTest.exe # Succeed

The difference between both `Works` and `Fails` is in `ProbingPathTest.exe.config`:
 - in `Fails`: the `<log4net>` XML element is *before* the `<runtime>` XML element
 - in `Works`: the `<log4net>` XML element is *after* the `<runtime>` XML element.
Comment 2 Aleksey Kliger 2018-04-11 15:51:16 UTC
The mono native C XML parser doesn't like this element: "<appender-ref .../>"  The hyphen is a problem.  (It also doesn't like underscores and periods in element names).
Comment 3 Ludovic Henry 2018-04-11 18:57:30 UTC
https://github.com/mono/mono/pull/8176