Hello,
So, I'm testing the Telerik suite, part of which is the RadSpreadSheet. I'm currently using the 30 days trial.
So, when I'm debugging it and I'm instantiating a new form that contains the RadSpreadSheet, the programme will about 50% of the time create an exception of object reference not set to an instance of an object
Now, I've only noticed this with forms that contain a radspreadsheet but it could have nothing to do with it.
What always happens before I get the exception is that the reminder to buy a Telerik License appears (the programme halts until I choose an option) and when the dialogue disappears, the exception happens.
Please note that if I just push "F5" again in VS, without changing anything anywhere, so after the crash immediately debug (F5) again, the exception will not occur.
Hello Dess,
I was actually wrong about it not happening outside of VS debugging.
I had actually just been lucky and it didn't happen immediately, but it does happen. It also happens on different computers as well.
I took the binary files of the program and run it on my work computer, and it crashed, producing this JIT exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.WinForms.Controls.Spreadsheet.Commands.Descriptors.CommandDescriptorsManager.Owner_LayoutUpdated(Object sender, EventArgs e)
at Telerik.WinControls.Layouts.ContextLayoutManager.fireLayoutUpdateEvent()
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayoutCallback(ILayoutManager manager)
I have also tested it in a brand new project, adding just a form and the spreadsheet control. The exception still happens there as well.
I am actually now wondering if we could reproduce the error on your computer by running my already compiled binaries (I understand that this would be little to no help, however since I get the exception on other computers too, I'd be really interested to see if you can experience the same exception when I build it)
You can download the whole VS project here: https://www.dropbox.com/s/abagt1yf8ea8dvb/TelerikWinFormsApp1.rar?dl=1
On the usual "bin\debug" folder is the built TelerikWinFormsApp1.exe file.
So, this is a more general problem than I first assumed it was.
I'm also wondering if it has anything to do with the lag I experience in the Spreadsheet's form.
From scrolling up and down to changing sheets, the control seems to lag significantly even when filled with a mere 32x35 table
It's not that it is rendered unusable - the lag just shows.
But that's a different matter - I have already asked about this on: https://www.telerik.com/forums/noticeable-lag-in-spreadsheet
Okay, I've tested the new dlls, followed your suggestion to the letter.
Unfortunately, the exception still occurs in the same fashion.
However, I did notice a slight decrease in its frequency (thought I could be wrong about it - the sample of how many times I've tried it is very low).
I haven't noticed anything else - just that I still get the exception.
P.S. on the zip folder there wasn't any Telerik.Windows.Documents.Spreadsheet dll, so this and only this one dll was referenced from the trial installation folder (C:\Program Files (x86)\Progress\Telerik UI for WinForms R3 2018\Bin40\Telerik.Windows.Documents.Spreadsheet.dll)
Thank you very much :)
Unfortunately, when I reference the new "Telerik.WinControls.UI.dll", I get loads of errors (attached picture) when I try to show anything with a Telerik control.
As soon as I reference back the dll installed from the trial (on C:\Program Files (x86)\Progress\Telerik UI for WinForms R3 2018\Bin40), all those errors disappear.
I'm going to need a new dll, or a way to circumvent those errors in order to test the candidate fix.
I have also updated your Telerik points.
Since we can't replicate the issue locally, please refer to the provided Telerik.WinControls.UI.dll where a candidate fix is available for the specific case. Could you please give a try in your project and share with us whether it covers the problematic case? Thank you in advance.Oh yeah, makes perfect sense for the trial.
Things I tried
At this point, I firmly believe this has something to do with the RadSpreadsheet and trial version. I also noticed that a second consecutive Evaluation-Copy-dialogue tried to appear before the crash (but sometimes it happens when the normal 1st one tries to appear).
I'm pretty sure that having 2 consecutive evaluation-copy-dialogues appearing in one form.show() is not the intended behaviour. If that is the case, perhaps the exception has something to do with this.
As far as I know, the trial assemblies are referenced directly; I only use nuget for some other assemblies this programme would need.
Yeah, if the problem cannot be reproduced, it's totally understandable that it's hard/impossible to fix.
I thought that the source files I sent would reproduce the problem on your end, but the video proves my hypothesis wrong.
Additional Information:
4. I have Windows 10 Pro (Genuine) version 1803build 17134.472 with the latest updates and VS 15.9.4
5. When I opened VS and loaded the project, having the form with the SpreadSheet to appear, before the form actually appeared on Design time, I got an "object reference not set to an instance of an object" exception for the property "Theme" as my attached screenshot shows. Not sure if I nailed it with this or not (at runtime, it's the same exception, only it doesn't say exactly where it originates - perhaps it's the Theme?)
6. The exception seems to only happen when F5/Debugging. If I run the program from the .exe instead of VS, then the form with the spreadsheet won't produce an exception any more.
7. I set the "ThemeName" property on both the ribbon menu and the spreadsheet to "ControlDefault", but the exception persists on debugging.
Hello Dess,
I'm attaching a stripped-down version of my programme (it basically has no functionality other than instantiating a new telerik form with a RadSpreadSheet in it and attaching an empty workbook
I opted to do this instead of creating a new empty project because it could be something particular to how this project is set up (version of dot.net? nuGet packages? etc...)
I have also attached a video file showing what I described (exceptions are non-deterministic and seem to follow a "buy telerik license" dialog.
Basically just click on any of the Tiles on the RadDock.
Download the VS project from my dropbox: https://www.dropbox.com/s/vgdvuc54wvpp5t3/Telerik-Trial-Bug-Sample-Code.rar?dl=1
(File is larger than 20MB due to the nuget packages, so couldn't upload it to the form)
(Irrelevant question: Is the get-a-license dialogue supposed to appear at runtime?)
Best regards,
Ioannis Mamalikidis