Issues after upgrade to .net 4.8

88 views
Skip to first unread message

Michael Højgaard Bojsen

unread,
Nov 29, 2021, 4:09:03 AM11/29/21
to Migrated By Firefly
Hi all

After upgrading to 4.8 we are seeing a "Class already exists" with the stacktrace below.

It looks like it happens in the instantiation of the RichTextBox, but besides that I do not find anything usable for me.


Best regards
Michael

at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()


at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)


at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)


at System.Windows.Forms.Control.CreateHandle()


at System.Windows.Forms.TextBoxBase.CreateHandle()


at Firefly.Box.UI.RichTextBox.WFRichTextBox.CreateHandle()


at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)


at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)


at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)


at System.Windows.Forms.Control.CreateControl()


at System.Windows.Forms.Form.SetVisibleCore(Boolean value)


at System.Windows.Forms.Control.set_Visible(Boolean value)


at Firefly.Box.UI.Form.DisplayShowAction(Form f)


at Firefly.Box.UI.Form.<>c__DisplayClass264_0.<InternalTestableDisplay>b__3()


at Firefly.Box.UI.Form.NotSubForm.ShowForm(Action show)


at Firefly.Box.UI.Form.InternalTestableDisplay(FormContainer container, FormsManager formsManager, Action`1 showAction)


at Firefly.Box.UI.Form.WizardOfOz.Witch.Engine.FormForTask.Display(FormContainer formContainer, FormsManager formsManager)


at Firefly.Box.Task.<>c__DisplayClass52_0.<Run>b__19(FormContainer container, FormsManager manager)


at WizardOfOz.Witch.Engine.CallStackClass.TaskInCallStack.DisplayForm(Action`2 display)


at Firefly.Box.Task.<>c__DisplayClass52_3.<Run>b__8()


at Firefly.Box.DataAccess.Transactions.TaskTransactionContainer.RunMonitoredCommand(Action command, TransactionRollbackDelegate callMeIfYouRollbacked)


at WizardOfOz.Witch.Engine.CallStackClass.TaskInCallStack.RunMonitoredCommand(Action command, TransactionRollbackDelegate callMeIfYouRollbacked)


at Firefly.Box.Task.myTaskTransactionManager.RunMonitoredCommand(Action command, TransactionRollbackDelegate callMeIfYouRollbacked)


at Firefly.Box.TransactionScopesStrategy.None.RunMonitoredTaskLevelCommand(Action action)


at Firefly.Box.Task.<>c__DisplayClass52_1.<Run>b__3(LoadTaskCommandDelegate loadTaskCommand, Boolean allowForm)


at Firefly.Box.RegularTaskRunner.LoadTask(LoadTask load)


at Firefly.Box.Task.<>c__DisplayClass52_0.<Run>b__0(TaskRunContext context)


at WizardOfOz.Witch.Engine.CallStackClass.RunTask(HostedItem task, Boolean isApplication, RunTask commandToExecute)


at WizardOfOz.Witch.Engine.CallStackClass.<>c__DisplayClass36_0.<WizardOfOz.Witch.Engine.HostEnvironment.ExecuteTask>b__0()


at WizardOfOz.Witch.Engine.CallStackClass.RunActionWithModuleController(ModuleController moduleController, Action action)


at WizardOfOz.Witch.Engine.CallStackClass.WizardOfOz.Witch.Engine.HostEnvironment.ExecuteTask(HostedItem task, ModuleController module, RunTask cmd)


at Firefly.Box.RegularTaskRunner.Execute(HostEnvironment host, HostedItem hostedItem, RunTask runTask, Action allowNestedRuns)


at Firefly.Box.Task.Run(TaskRunner taskRunner)


at Firefly.Box.Task.Run()


at Firefly.Box.UIController.Run()


at ENV.AbstractUIController.RunTheTask() in C:\xxx\ENV\AbstractUIController.cs:line 800


at ENV.ControllerBase.RunTask() in C:\xxx\ENV\ControllerBase.cs:line 862


at ENV.ControllerBase.<>c.<.ctor>b__3_2(Action y) in C:\xxx\ENV\ControllerBase.cs:line 413


at ENV.ControllerBase.Execute() in C:\xxx\ENV\ControllerBase.cs:line 459

Noam Honig

unread,
Dec 13, 2021, 9:40:44 AM12/13/21
to Migrated By Firefly
Hi,

Firefly works with .NET 4.8.

With regards to your error, you only included the call stack, and not the error itself - try adding it and maybe it'll include more clues.

Best

Harry Kleinsmit

unread,
Dec 13, 2021, 9:52:17 AM12/13/21
to Noam Honig, Migrated By Firefly

Hi,

 

See also my reply of 19 September 2021:

 

Just FYI, I did had an issue with migrating to .NET 4.8. The Target Framework of the FireFly.Box was 3.5. If you upgrade this too then you might run into a security issue that was introduced since .NET 4.0.

To solve this you only have to disable (/comment out) the [assembly: AllowPartiallyTrustedCallers] in the AssemblyInfo.cs.

 

Best regards,

Harry Kleinsmit.

--
You received this message because you are subscribed to the Google Groups "Migrated By Firefly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to migrated-by-fir...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/migrated-by-firefly/5d5bb6bf-eda8-42da-b50e-c1f2612206efn%40googlegroups.com.

noam honig

unread,
Dec 14, 2021, 5:08:58 AM12/14/21
to Migrated By Firefly
Hi, 

To fix that, go to the file:
Firefly\UI\RichTextBoxEx.cs

And change UseVersion41 to false in the constructor of RichTextBoxV5 class


2021-12-14_12h06_36.png

This bug was fixed in 2019.

That flag only applies to customers who migrated from older versions of magic (v9 etc...)

Best

Michael Højgaard Bojsen

unread,
Dec 15, 2021, 3:09:41 AM12/15/21
to Migrated By Firefly
Hi Noam

That worked! Thank you for your help.

Best regards
Michael

Reply all
Reply to author
Forward
0 new messages