we create a one note file (*.ONE) with Aspose.note. When we open this file in OneNote, we experience the following behavior:
When selecting parts of the document’s content, and then moving the mouse over the selected area, OneNote crashes. This behavior is not deterministic, meaning it happens often, but not always.
When we export this file in OneNote to docx, OneNote is ALWAYS crashing.
I attach an example of a file that’s been created with Aspose.NOTE, and has the said problems. Can you please help us with this?
@stb_ag,
Regarding issue 1, share a movie which shows this issue as we are not able to reproduce it here.
For the second issue, we can observed the crash problem while exporting it to docx.
Please note that we need the runnable sample code which is used to create this OneNote file for analysis and further assistance as without the sample code it is not possible to provide our feedback. Once we receive the desired information, we will reproduce this issue here and log it in our database for a fix.
thank you for your answer. I send you my eclipse project, which produces one note files with the said problem. The main class is com.audimex.ee.simplereport.GuidelineList. The program needs one parameter, containing the files it needs to run. This directory is specified as command line parameter -p /tmp/dok4 (example). I attach such a directory also.
Concerning the movie: I will try to produce this and deliver it as soon as I got it.
@stb_ag,
We are working on this issue and need assistance. Could you please share what argument you pass to this program? If that file is not already shared, please share the file with us for our testing.
The parameter is, as I wrote in my previous message:
-p
Included in my previous mail, you find a file “dok4.zip”. Unzip it, it contains a directory with the name “dok4”. is the full path to this directory. It should contain everything needed.
I have observed this folder. It contains “result.one” file which is analyzed first by directly opening it in Microsoft OneNote and then exported to DOCX. It can be seen that OneNote crashes here which shows that there is some issue with this file as no Aspose.Note is used during this test. Could you please test this file at your end and share the feedback as this issue of crashing OneNote is reproduced using the original file without any change?
Regarding the selected text issue, I tried this with result.one file but not able to reproduce it. I have following view when I open the result.one file and hover mouse over the selected text. No crash is observed however once we are able to create this file here, we will check this issue again.
We need a code which creates a .ONE file from scratch and when this output file is opened in MS OneNote and exported to DOCX, it should crash MS OneNote for our testing. You may share the code which is used to create ‘result.one’ using Aspose.Note.
We are sorry for the inconvenience in this regard.
This file result.one has been produced with Aspose on our end. And it crashes Notes when exporting to DOCX, as you confirmed. I think the mistake is that you thought, result.one would be a file created with OneNote. But it is not. It is built from scratch with Aspose.Note from the project I sent to you. When you execute the project with the parameters I sent, result.one will be replaced by the newly generated file.
It is not too surprising to me, that you cannot reproduce the crash with the selected text. We can also not reproduce it in a deterministic way, this only happens on our client’s side. But when we examined this crash, we found out the crash that occurs by exporting the document to docx. So we think that both are possibly related to each other.
@stb_ag,
I am afraid that I could not find the sample code which is used to create this file from scratch. Following is the main function provided in your sample project:
if (args.length != 1) {
USAGE();
return;
}
String filePath = args[0];
File file = new File(filePath);
if ((!file.exists()) || (!file.isFile())) {
System.err.println(String.format("File does not exist: %s", filePath));
return;
}
try {
// Load the document into Aspose.Note
Notebook nb = new Notebook(filePath);
System.out.println(XmlConvert.convertToXML(nb));
} catch (UnsupportedFileFormatException e1) {
try {
Document doc = new Document(filePath);
System.out.println(XmlConvert.convertToXML(doc));
} catch (UnsupportedFileFormatException e2) {
System.err.println(String.format("Unsupported file format (allowed: one, onetoc2): %s", filePath));
return;
} catch (Exception e3) {
System.err.println(e3.toString());
return;
}
} catch (Exception e4) {
System.err.println(e4.toString());
return;
}
When we run this code, it reads a file and converts it to XML. Could you please assist me how to use this code to create result.one file from scratch for my reference?
@stb_ag,
There seems to be some confusion as there is no class com.audimex.ee.simplereport.GuidelineList in the sample code shared here:
There are only two java files Dumper.java and XmlConvert.java which do not contain this class. Only one main function is found which is already shared above. Please assist us to find this class for testing the issue here.
Oh, please excuse me! It is my mistake. I sent you a test project instead of the real project. I beg your pardon! Here comes the correct project:simple-report.zip (38.5 KB)
@stb_ag,
Thank you for sharing the required information. This issue is reproduced where result.one file crashes MS OneNote while exporting to DOCX format and is logged in our database for further investigation and a fix. You will be notified here once any update is ready for sharing.
It is logged as: NOTEJAVA-880 - OneNote crash when exporting to docx
This issue is not reproduced using the output file result.one. It is attached here for your reference. Please test this issue using this file and share the feedback. result.one.zip (12.8 KB)