Closed alainaecon closed 2 months ago
@alainaecon, please click the "Details" button and provide a screenshot of what is displayed. Thanks.
Note that 8.1.2 is working on our Windows 10 PCs, but this error is showing on our Windows 11 PCs. We tried 8.1.3, but the error remains.
@alainaecon, @khart20. Is this happening with batch print preview as reported in issue #70, or is it a different workflow? Thanks.
@mgobat We do not use batch print. This is when we scan a single barcode and the XML is returned, as we can see it in the Current XML tab, but this error pops up and if we continue it does not process the XML into the preview.
This is the message under "details". I copied and pasted the message instead of screenshots due to its length. :
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
** Exception Text ** System.ArgumentException: Argument 'Length' must be greater or equal to zero. at Microsoft.VisualBasic.Strings.Mid(String str, Int32 Start, Int32 Length) at SpineLabeler.Form1.aboveCall(String libname, String liblocation) at SpineLabeler.Form1.printCallNum() at SpineLabeler.Form1.getBarcodeFile() at SpineLabeler.Form1.callAlma() at SpineLabeler.Form1.InputBox_KeyPress(Object sender, KeyPressEventArgs e) at System.Windows.Forms.Control.OnKeyPress(KeyPressEventArgs e) at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m) at System.Windows.Forms.Control.WmKeyChar(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.TextBoxBase.WndProc(Message& m) at System.Windows.Forms.TextBox.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
System
@alainaecon, @khart20. So that I understand all circumstances with the problem, let me summarize.
Please confirm I have the problem steps correct. If I do, please copy the XML from the "Current XML" tab (make sure the "include settings" checkbox is checked) after you have scanned in the barcode and gotten the "unhandled exception" error, and paste it into a text file. Please remove the restfulapikey entry in the XML before posting here. You can then add the file to a comment by dragging/dropping the file.
Thank you.
Let me know if you need any more information, thank you so much!
If it helps. Here is a comparison/diff view of that XML output between 8.1.3 and our working 8.1.2 for same item barcode.
@alainaecon, @khart20, thank you for the additional information.
I should have thought of this yesterday. Starting with version 8.0.0 of SpineOMatic, version 4.8 of the .Net Framework is required. I'm not sure which version is the default for Windows 11. Please check if version 4.8 is installed, and if not, install it from this link. If that solves the problem, great!
If that doesn't solve the problem, the only thing I see in the xml you provided is possibly the different label printer on the Windows 11 computer. Does your Windows 11 computer have the "Microsoft Print to PDF" driver? If yes, could you try selecting it as your printer on the "Print Setup" tab, scan in the barcode, and click the "Send to desktop printer" button to see if you get the same "Unhandled exception" error? Clicking the "Send to desktop printer button" with the "Microsoft Print to PDF" printer should result in a "Save Print Output As" dialog box. Enter a "File name", click "Save", then look at the resulting PDF file to see if the label looks correct. If that works, then there may be some issue with SpineOMatic and the label printer attached to your Windows 11 computer.
Thanks.
The Windows 11 computer has version 4.8 of the .Net Framework. I uninstalled and reinstalled "Microsoft Print to PDF", then changed the printer in SpineOMatic, and I still get the same error message as before when I scan a barcode.
Thanks for running that test, @alainaecon.
@alainaecon, @khart20, I'm trying to isolate where the problem may be in the code. Based on what I'm seeing, I'm assuming you have label prefixes defined on the "Label Prefixes" tab. If that is correct, can you confirm that the problem does not happen if you delete the label prefixes defined on the "Label Prefixes" tab? If the problem does not still occur, then try recreating your label prefixes and test again.
We isolated our label prefixes and were able to discover the issue! We are undergoing a library renovation and had to create some new label prefixes for our temporary location, and there was an error in one of those prefixes. Ultimately has nothing to do with Windows 11, just a coincidence that the Windows 10 computer did not have those new label prefixes added yet.
Thank you so much for your help in resolving this!
That's great, @alainaecon. Sorry I didn't think of that first.
@mgobat Mark Thank you for your help!
We are getting the same error message as Issue #70, even after installing 8.1.3. I have included a screenshot of the error message.