[Mono-bugs] [Bug 699452] New: Web menu class crashes during render if LevelMenuItemStyles are used

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jun 11 20:15:49 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=699452

https://bugzilla.novell.com/show_bug.cgi?id=699452#c0


           Summary: Web menu class crashes during render if
                    LevelMenuItemStyles are used
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: jjackson at vortech.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.30
(KHTML, like Gecko) Chrome/12.0.742.91 Safari/534.30

An "Object reference not set to an instance of an object" exception is thrown
on line 379 of BaseMenuRenderer.cs if a LevelMenuItemStyles is used. The
offending line of code is:


AddCssClass (linkStyle, oc.LevelMenuItemLinkStyles 
[item.Depth].RegisteredCssClass);

I noticed that LevelMenuItemLinkStyles is not initialized during the class
constructor in the base class. I haven't dug any deeper at this point, but this
should be enough info for someone familiar with the class source to pin it
down.

The code works properly on Windows under .Net but not on Linux or Windows under
Mono.

Reproducible: Always

Steps to Reproduce:
1. Create a menu with at least 2 levels and the StaticDisplayLevels set to 2
(or greater)
2. Add at least 2 LevelMenuItemStyles
3. Compile and run the page
Actual Results:  
HTTP 500 Error with mono throwing a System.NullReferenceException error

Expected Results:  
A menu should be rendered

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list