small bug in catalog and inventory schema manager

When I click edit property metadata in the commerce server catalog and inventory schema manager the application crash with the following error in the application log:

Event Type: Error
Event Source: Commerce Server Business UI
Event Category: None
Event ID: 100
Date: 23-01-2007
Time: 09:48:54
User: N/A
Computer: PH
Description:
System.OutOfMemoryException: Error creating window handle. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.EditMetaData.SetPropertyLists()
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.EditMetaData.EditMetaData_Load(Object sender, EventArgs e)
at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
--- End of inner exception stack trace ---
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.get_ShowKeyboardCues()
at System.Windows.Forms.ControlPaint.CreateStringFormat(Control ctl, ContentAlignment textAlign, Boolean showEllipsis, Boolean useMnemonic)
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.CreateStringFormat()
at System.Windows.Forms.ButtonBase.CreateStringFormat()
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.CommonLayout()
at System.Windows.Forms.ButtonInternal.ButtonStandardAdapter.Layout(PaintEventArgs e)
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.GetPreferredSizeCore(Size proposedSize)
at System.Windows.Forms.ButtonBase.GetPreferredSizeCore(Size proposedConstraints)
at System.Windows.Forms.Button.GetPreferredSizeCore(Size proposedConstraints)
at System.Windows.Forms.Control.GetPreferredSize(Size proposedSize)
at System.Windows.Forms.ButtonBase.GetPreferredSize(Size proposedSize)
at System.Windows.Forms.Layout.DefaultLayout.LayoutAutoSizedControls(IArrangedElement container)
at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
at System.Windows.Forms.ContainerControl.OnLayout(LayoutEventArgs e)
at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
at System.Windows.Forms.Control.PerformLayout()
at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
at System.Windows.Forms.Layout.LayoutTransaction.Dispose()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.EditMetaData.SetLanguageEditing(Boolean enable)
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.EditMetaData..ctor(ExtensibleEntityType itemToEdit)
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.CatalogSchemaEditorObjectFactory.Create(CatalogSchemaEditorItem itemToCreate, CatalogSchemaEditorController controller, Boolean headerVisible)
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.EditDialogFormBase.Initialize(Dictionary`2 pagesToCreate, IDialogContainer dialogContainer)
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.EditCatalogMetaData.EditCatalogMetaData_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.CommerceServer.UI.UIProcess.WindowsFormViewManager.ShowModal(WindowsFormView winFormView, String previousView, Guid taskId, Object parentForm)
at Microsoft.CommerceServer.UI.UIProcess.WindowsFormViewManager.ActivateForm(WindowsFormView winFormView, ViewSettings viewSettings, Navigator navigator, Guid taskId, String previousView, TaskArgumentsHolder args)
at Microsoft.CommerceServer.UI.UIProcess.WindowsFormViewManager.CreateNewView(String viewName, Navigator navigator, Guid taskId, TaskArgumentsHolder args)
at Microsoft.CommerceServer.UI.UIProcess.WindowsFormViewManager.ActivateView(String previousView, String view, Navigator navigator, TaskArgumentsHolder args)
at Microsoft.CommerceServer.UI.UIProcess.GraphNavigator.StartTask(TaskArgumentsHolder holder)
at Microsoft.CommerceServer.UI.UIProcess.GraphNavigator.StartTask(Guid taskId, TaskArgumentsHolder holder)
at Microsoft.CommerceServer.UI.UIProcess.UIPManager.StartNavigationTask(String navigationGraph, TaskArgumentsHolder args)
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.CatalogSchemaEditor.EditMetaData(String navigationPath, OperationMode operationMode, ExtensibleEntityType type)
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.CatalogSchemaEditor.TaskEventHandler(Object sender, SmartPanelEventArgs e)
at Microsoft.CommerceServer.UI.ControlLibrary.SmartPanel.OnPanelItemSelected(SmartPanelEventArgs e)
at Microsoft.CommerceServer.UI.ControlLibrary.SmartPanel.PanelItemClicked(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.LinkLabel.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.LaunchPad..ctor()
at Microsoft.CommerceServer.UI.CatalogSchemaEditor.LaunchPad.Main()

Best Regards

Philip



Answer this question

small bug in catalog and inventory schema manager

  • HellsChicken

    I got the exactly same problem.(OS: Vista, KB922068)
    Thanks in advance for any help!

    Frank

  • Shajeel

    SP1 is due sometime mid year.

    -Max



  • minkee.s

    Seems like an "OutOfMemory" exception. Did you try restarting the app
  • AmR EiSa

    Are you all running Windows Vista If so can you start the app as an administrator and see if you still get the error

    -Max



  • __alex

    The app crashes totally if i click "edit property metadata " and does this consistently. The system have plenty of unallocated memory.

    To me it looks like the program is trying to access a handle to a window that is not set.

    Best Regards

    Philip


  • KitGreen

    We released the source code for the other applications, because they are meant for business users. The Catalog and Inventory Schema Manager is meant for developers and architects and it’s not really meant to be modified.

    -Max



  • Bill Oeftering

    No solution so far, i would run a debugger on it, unfortunately the code for the schema manager is not included in the SDK

    Any word on when SP1 for commerce server is schedualed to arrive

    Best Regards

    Philip


  • Anton Rapoport

    FYI - I am experiencing exactly the same problem.

  • zensunni

    Have you tried to debug with the applications in the SDK
  • Peppermint

    I think you are right. But need one more step. it also need to include the property definition to the entity like Product. You can find second section in the metadata xml file(ProductCatalogSchema.xml) as an example.
  • Dave21

    I never noticed that before! Why isn't the Catalog and Inventory Schema Manager included in the partner SDK That seems like a pretty large oversight!
  • CzechMate

    Frank, can you please ellaborate what you wrote in your last post. Where is the ProductCatalogSchema.xml file located Is it some sort of mappings xml file I could only find the 'CatalogAndInventorySchemaManagerConfig.xml' file in the business applications folder which lists the metadata properties column headers. I tried adding my metadata property to the list, but it still is not appearing in the catalog and inventory schema manager application.

    By the way, i tried changing the name/display name of existing metadata properties in the database, but it makes no change to the property names that appear in the management application. So i believe there must be some mappings file where these properties are defined along with their language specific display names.

    Those of you who are not facing problems with 'Edit property metadata' in the catalog and inventory schema manager, Can you please confirm if my assumption is correct that any property added to the property meta data appears when you go and add a new property. I mean on the 'Add new property' form of catalog and inventory schema manager like the other built in properties.

    Thanks,

    Agha


  • alecxss

    Has anyone found a solution to this problem yet I'm also facing the same problem.

    Also, i would be interested in knowing how can i add something to the metadata programatically. I couldn't find any documentation on this. I suspect the 'AddPropertyToEntity' method in CatalogContext is the one that assigns a property to be in metadata of a particular definition type. I tried adding a property to the 'ProductDefinition' entity through this method and the property seems to be added (I can see it in the properties collection returned by the 'GetEntityProperties' method), but it does not appear in the catalog and inventory schema manager when i add a new property definition. Is my approach correct If yes, why am i not seeing it on the new property defintion form


  • Andrew Feldman

    Has anyone found a solution to this yet. I'm getting the same behavior when I click "Edit Property Metadata". The rest of the application works fine.


  • small bug in catalog and inventory schema manager