PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox)

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox)

Post by cew »

Hi,

the viewer crashes in the following scenario:
1. Create a TextBox in a pdf and save the file
2. In the OnEvent-Handler method show a messagebox in case of "Modified"
3. Open pdf again an move the textbox.
4. After show the messagebox the view will crash and collapse to an icon

You can edit or delete the textbox. The viewer is still working. Just moving kills it.
Moving other elements are ok. Only textboxes cause this problem.

Best regards
cew
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by Stefan - PDF-XChange »

Hello cew,

Can you please add the sample app with which we can reproduce this?

Best,
Stefan
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by Vasyl - PDF-XChange »

I think the raising message box from "Document.Modified" event directly is not a good idea. Sure, we will check and fix this bug, your example app. can helpful.
Temporary try to show msgbox but asynchronously, so:

Code: Select all

OnEvent(event)
{
    if (event == "Document.Modified")
    {
       StartTimer(tm_DocModified)
    }
}
........
OnDocModifiedTimer()
{
    StopTimer(tm_DocModified);
    ShowMessageBox();
}
HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by cew »

In the attachment I modified your FullDemo sample project including a video showing the bug.

I just extended the following function in Form1.cs:

Code: Select all

        private void axCoPDFXCview1_OnEvent(object sender, AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent e)
        {
            // in case of modified, show messagebox
            if (e.name.EndsWith("Modified")) {
              System.Windows.Forms.MessageBox.Show("Modified!");
            }

            switch(e.type)
            {
            case (int)PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnPropertyChanged:
                {
                    OnPropertyChanged(e.name);
                    break;
                }
            }            
        }
Best
cew
You do not have the required permissions to view the files attached to this post.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by Vasyl - PDF-XChange »

Problem is confirmed. Thanks for your detailed report.
It will be fixed in the next build (#200), please wait...
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7370
Joined: Wed Mar 25, 2009 10:37 pm

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by Paul - PDF-XChange »

Ticket created : RT#1338: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox)
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7370
Joined: Wed Mar 25, 2009 10:37 pm

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by Paul - PDF-XChange »

The issue is resolved - fix will be in the next build.

Build 200 is expected to be ready near the end of next week.

hth
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by cew »

Great, thank you!

Best
cew
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox

Post by Stefan - PDF-XChange »

:)