Free Support Forum -

OneNote crash when exporting to docx

Hello support,

we create a one note file (*.ONE) with Aspose.note. When we open this file in OneNote, we experience the following behavior:

  1. 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.

  2. 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?

Thank you!

Questionnaire Entity 2 (ohne Anhang) (9.1 KB)

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 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.

Kind regards,
Markus (14.9 KB) (71.9 KB)

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:


Included in my previous mail, you find a file “”. Unzip it, it contains a directory with the name “dok4”. is the full path to this directory. It should contain everything needed.

it is

-p <folder>

The “<folder>” has disappeared in my last message…

And here is the video you requested. It shows the crash of OneNote while just only selecting text areas in the created (563.2 KB)

I have observed this folder. It contains “” 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 file but not able to reproduce it. I have following view when I open the 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.

SelectedTextIssue.png (108.7 KB)

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 ‘’ using Aspose.Note.

We are sorry for the inconvenience in this regard.

This file 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, 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, 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.

Just to state it clearly: You have the code that produces what you request, I sent you the whole project.

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) {

        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));

        try {
            // Load the document into Aspose.Note
            Notebook nb = new Notebook(filePath);
        } catch (UnsupportedFileFormatException e1) {
            try {
                Document doc = new Document(filePath);
            } catch (UnsupportedFileFormatException e2) {
                System.err.println(String.format("Unsupported file format (allowed: one, onetoc2): %s", filePath));
            } catch (Exception e3) {
        } catch (Exception e4) {

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 file from scratch for my reference?

As wrote in my 2nd message (see above), the main class is:

This class contains a main method which can be called with a command line parameter


where is the path to the folder contained in the zip archive which I sent.

-p directory

where directory is the path to the folder contained in the zip archive which I sent.

There seems to be some confusion as there is no class in the sample code shared here:

There are only two java files and 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 (38.5 KB)

Thank you for sharing the required information. This issue is reproduced where 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 It is attached here for your reference. Please test this issue using this file and share the feedback. (12.8 KB)