Exception when starting 5.6.1 (5.3.3 works)

Posts   
 
    
Emmanuel
User
Posts: 167
Joined: 13-Jan-2006
# Posted on: 25-Jan-2020 01:33:10   

Just installed 5.6.1 (am currently still using 5.3.3) and fired it up and got an exception right away along with a "Thread: An Unhandled exception occured (sic)" dialogue box with cut-off text at the bottom. I'm running on Windows 10 on a Surface Book 2.

Exception information.

LLBLGen Pro version: v5.6. Build: 5.6.1

Exception details:

Message: Object is currently in use elsewhere. Source: System.Drawing Stack trace: at System.Drawing.Graphics.get_PageUnit() at DevExpress.Utils.Paint.XPaint.CalcDefaultTextSize(Graphics g, Font font) at DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSizeCore(GraphicsCache cache, String text, Int32 maxWidth) at DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSizeCore(Graphics g, String text, Int32 maxWidth) at DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSize(Graphics g, Boolean useDisplayText) at DevExpress.XtraEditors.ViewInfo.BaseEditViewInfo.CalcBestFit(Graphics g) at DevExpress.XtraEditors.ViewInfo.TextEditViewInfo.CalcMinHeightCore(Graphics g) at DevExpress.XtraEditors.BaseEdit.CalcPreferredHeight() at DevExpress.XtraEditors.BaseEdit.get_PreferredHeight() at DevExpress.XtraEditors.BaseEdit.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds) at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly) 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.Control.PerformLayout(LayoutEventArgs args) at System.Windows.Forms.Control.PerformLayout() at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout) at DevExpress.XtraBars.Helpers.SkinPopupControlContainer.Initialize() at DevExpress.XtraBars.Helpers.SkinHelper.InitDropDownSkinGallery(BarButtonItem barButtonItem) at DevExpress.XtraBars.SkinDropDownButtonItem.OnInitialize() at DevExpress.XtraBars.BarManager.InitializeSkinBarSubItemsIfExists() at DevExpress.XtraEditors.Container.ComponentEditorContainer.EndInit() at SD.LLBLGen.Pro.Gui.Controls.MainWindow.InitializeComponent() at SD.LLBLGen.Pro.Gui.Controls.MainWindow..ctor(LoggedUIState loggedUIState) at SD.LLBLGen.Pro.Gui.Program.DoApplicationStart(String appStartPath, String fileToLoad, Boolean startedFromVSNet)

Inner exception: <null>

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 25-Jan-2020 07:32:32   

This happens every time or just once? We've seen this very rarely and it's always something happening related to devexpress controls but we can't find what causes it (also because in general it doesn't happen, we can't really reproduce it... disappointed )

The root cause seems to be the application of the theme. The main window is initialized when the startup dialog is running, and this should be fine according to Devexpress is fine, but apparently it can bug occasionally. If we do it all on the foreground thread there's a significant delay when the startup dialog is closed and the main window opens.

Nevertheless, exceptions should be avoided. Please confirm you can reproduce this every time.

Frans Bouma | Lead developer LLBLGen Pro
Emmanuel
User
Posts: 167
Joined: 13-Jan-2006
# Posted on: 29-Jan-2020 20:00:13   

I did some experimenting.

It happens every time when I attempt to start the app with my laptop undocked.

It happens sometimes when I start the app with my laptop docked. When docked I am connected to 2 monitors. Here is the latest exception that just happened (I am docked):

Exception information.

LLBLGen Pro version: v5.6. Build: 5.6.1

Exception details:

Message: Object is currently in use elsewhere. Source: System.Drawing Stack trace: at System.Drawing.Graphics.get_PageUnit() at DevExpress.Utils.Paint.XPaint.CalcDefaultTextSize(Graphics g, Font font) at DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSizeCore(GraphicsCache cache, String text, Int32 maxWidth) at DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSizeCore(Graphics g, String text, Int32 maxWidth) at DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSize(Graphics g, Boolean useDisplayText) at DevExpress.XtraEditors.ViewInfo.BaseEditViewInfo.CalcBestFit(Graphics g) at DevExpress.XtraEditors.ViewInfo.TextEditViewInfo.CalcMinHeightCore(Graphics g) at DevExpress.XtraEditors.BaseEdit.CalcPreferredHeight() at DevExpress.XtraEditors.BaseEdit.get_PreferredHeight() at DevExpress.XtraEditors.BaseEdit.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds) at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly) 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.Control.PerformLayout(LayoutEventArgs args) at System.Windows.Forms.Control.PerformLayout() at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout) at DevExpress.XtraBars.Helpers.SkinPopupControlContainer.Initialize() at DevExpress.XtraBars.Helpers.SkinHelper.InitDropDownSkinGallery(BarButtonItem barButtonItem) at DevExpress.XtraBars.SkinDropDownButtonItem.OnInitialize() at DevExpress.XtraBars.BarManager.InitializeSkinBarSubItemsIfExists() at DevExpress.XtraEditors.Container.ComponentEditorContainer.EndInit() at SD.LLBLGen.Pro.Gui.Controls.MainWindow.InitializeComponent() at SD.LLBLGen.Pro.Gui.Controls.MainWindow..ctor(LoggedUIState loggedUIState) at SD.LLBLGen.Pro.Gui.Program.DoApplicationStart(String appStartPath, String fileToLoad, Boolean startedFromVSNet)

Inner exception: <null>

Emmanuel
User
Posts: 167
Joined: 13-Jan-2006
# Posted on: 29-Jan-2020 20:01:22   

I wonder if it is related to graphic acceleration. I'll try to turn off acceleration for LLBLGenPro 5.6 to see. (I'll have to figure out how).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 30-Jan-2020 09:17:46   

It certainly is related to timings somewhere, but the thing is: we have a wait handle in place which will continue the execution once the start dialog has been fully shown... if we remove that we can occasionally reproduce it but not always. Acceleration might indeed be part of it as it makes things faster.

We did make some changes however in the way the windows are started. We'll do some testing in a VM without acceleration. I'll also attach the 5.6.2 exe to this post for you to try to see if that makes any difference. Sorry for this inconvenience disappointed

Attachments
Filename File size Added on Approval
LLBLGenPro_Exe_562.zip 681,963 30-Jan-2020 09:17.53 Approved
Frans Bouma | Lead developer LLBLGen Pro