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
PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox)
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox
Hello cew,
Can you please add the sample app with which we can reproduce this?
Best,
Stefan
Can you please add the sample app with which we can reproduce this?
Best,
Stefan
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox
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:
HTH
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();
}
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox
In the attachment I modified your FullDemo sample project including a video showing the bug.
I just extended the following function in Form1.cs:
Best
cew
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;
}
}
}
cew
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox
Problem is confirmed. Thanks for your detailed report.
It will be fixed in the next build (#200), please wait...
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- Site Admin
- Posts: 7370
- Joined: Wed Mar 25, 2009 10:37 pm
Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox
Ticket created : RT#1338: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox)
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- Site Admin
- Posts: 7370
- Joined: Wed Mar 25, 2009 10:37 pm
Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox
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
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
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: PDF-XChange Viewer crashes (Textbox, OnEvent, Messagebox
Great, thank you!
Best
cew
Best
cew
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am