Problem with All Save methods VB6 Crash on Reload Program  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Hi I've attached a sample project, and the problem is, open the project, and run, use load cmd to load document, choose any of the save commands, then the Close button far left, then restart the project, load the pdf, click any of the save commands again, will crash VB, please see if anything done wrong, just converted the save commands from full sample to VB6. At times the RunJS does the same thing, but very rarely, have not found the cause.

Save URL
Dim Doc As PDFXEditCtl.IPXV_Document
Set Doc = Me.PDF.Doc
Dim Path As IAFS_Name
Set Path = Me.PDF.Inst.PathToName(Me.Text1)
Call Doc.Save(Path, PXV_DocSave_NoOverwritePrompt)
Set Doc = Nothing
Set Path = Nothing

Save Local
Dim Doc As PDFXEditCtl.IPXV_Document
Set Doc = Me.PDF.Doc
Dim Path As IAFS_Name
Dim p_fsInst As PDFXEditCtl.IAFS_Inst
Set p_fsInst = PDF.Inst.GetExtension("AFS")
Set Path = p_fsInst.DefaultFileSys.StringToName(Text1.Text)
Call Doc.Save(Path, PXV_DocSave_NoOverwritePrompt)
Set Doc = Nothing
Set Path = Nothing
Set p_fsInst = Nothing

Save Custom:
Dim Doc As PDFXEditCtl.IPXV_Document
Set Doc = Me.PDF.Doc
Dim Path As IString
Set Path = Me.PDF.Inst.CreateString(Text1.Text)
Call Doc.Save(Path, PXV_DocSave_NoOverwritePrompt)
Set Doc = Nothing
Set Path = Nothing

Save Simple:
Me.PDF.Doc.Save Nothing, PXV_DocSave_NoOverwritePrompt
Attachments
testProject.zip
Sample Project
(68.43 KiB) Downloaded 114 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Sasha - Tracker Dev Team »

Hello prime clinical systems,

We are not experiencing a crash here, though we had troubles opening a PDF file from your program. The problem was in the Settings, that we don't have. Though after we commented the settings, the project did not crash after second launch and usage. We will need you to export your settings by this path: HKLM\SOFTWARE\Chart Manager\Settings\PCMPDFSettingsEditMode, because probably the trouble is with them.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Ok I removed the loading of presests and for me crashes every time. Prior to form unload I even added me.pdf.doc.closedoc and that does not help either.
Step one, open the project and run it
step two. Click the Load button
step three. Click Save URL button
step four, Click the close button
step five, run the project
step six, Load button for PDF
step seven, click Save URL, will crash every time.

The compiled version it does not happen every time, just once in awhile
Video of this:
https://www.dropbox.com/s/pigvhu7c9sg84 ... .webm?dl=0
Attachments
testProject.zip
(78.14 KiB) Downloaded 111 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Sasha - Tracker Dev Team »

Hello prime clinical systems,

This behavior is known and we are waiting for this to be fixed - this needs to be done by one of our lead devs. This occurs because the VB6 loads the dll when you run the project from it and holds it. From the code point of view we load the IPXV_Inst on the project run and Shutdown it on the project closing. Though when you run the project from the VB environment for the second time, we call the IPXV_Inst init again and this is where the problem lies - the IPXV_Inst should be a singleton for the process, meaning that it should load once and shutdown once.
This should be fixed soon though - it's a high priority problem, we already know about it and will tend to this, because it occurs not only in VB6 (though in other languages it's not as critical as here because this does not interfere with the common IDE usage).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

ok thanks, please let me know in which build it will be fixed
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Sasha - Tracker Dev Team »

Hello prime clinical systems,

We will notify when these changes will be applied.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

More than a month waiting on this issue, any progress? thanks CE
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Tracker Supp-Stefan »

Hello Clifford,

Unfortunately this is not an easy fix to implement so it will take us longer to make it live indeed.

Regards,
Stefan
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Gentlemen please, this issue makes it so hard to work, forces me to compile every time I run, can't use IDE except for first time project loaded. Please help.
ce
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Tracker Supp-Stefan »

Hello Clifford,

We are trying to find a solution for you - but as I said before - it is quite complicated - so it does need it's time. It is a high priority issue - so I expect it to be fixed in the next major build (323), and am currently speaking with some colleagues, to see if we can give you a more precise time frame as to when to expect the fix.

Regards,
Stefan
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Gentlemen, it has been 2 months on this issue, I am just about ready to deploy my application, and last I heard you thought would be ready for next build 323, please let me know if on schedule, thanks
ce
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Sasha - Tracker Dev Team »

Hello Clifford,

We will try tend to that problem tomorrow and hopefully will fix it.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Hi, I am ready to release my solution VB6, this is really urgent, progress update please.
ce
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6837
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Paul - Tracker Supp »

Hi Clifford,

my apologies for the delay in this. We have raised the priority of this and it will be done very soon. You should be able to expect something by the end of the week.

hth

Paul
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
User avatar
Roman - Tracker Supp
Site Admin
Posts: 303
Joined: Sun Nov 21, 2004 3:19 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Roman - Tracker Supp »

Hi Clifford,

Please verify that the issue has been resolved in the updated binary (see the attached file).
Replace the original DLL in the Editor SDK installation directory (the default path is %ProgramFiles%\Tracker Software\Editor SDK\bin\) with the unpacked DLL.
Make sure you did not move and re-register the editor SDK core DLL in another directory, in this case you will have to replace the DLL that is actually loaded by your application.

Please let us know the outcome.
Attachments
PDFXEditCore.x86.dll.zip
Version 6.0.322.5
(12.75 MiB) Downloaded 113 times
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program  SOLVED

Post by prime clinical systems »

Hi, nope, exact same behavior as I stated before, Attached is the project,
Open the project
Run the project
Click Save URL, or Any of the save commands
Close the project with close button left top, and exit program
Run the project
Click Save URL
Program crashes
It's only when you save, control dirty or not dirty this happens, If you just open and close the project it's fine.
Attached project, and link to video is below.
The compiled program is fine, it no longer crashes, so at least some progress, but while developing to crash like this and loose all my bookmarks, breakpoints, etc is sad
Video https://www.dropbox.com/s/oi1jy2nkws6fl ... h.mp4?dl=0
Attachments
testProject.zip
(109.37 KiB) Downloaded 105 times
User avatar
Roman - Tracker Supp
Site Admin
Posts: 303
Joined: Sun Nov 21, 2004 3:19 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Roman - Tracker Supp »

I could not reproduce the crash with the updated DLL and your fresh test project.
Please follow this guide to create a memory dump of the crashed VB6.exe process and send it to us (zipped). The dump file will most probably exceed the limitation of this forum for attachments, in this case please upload it to some file sharing service (like DropBox or Google Drive) and send us a link to the uploaded file.
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Hi, So sorry, it is fixed, I did not realize if I renamed the old dll and copied to same directory the new dll, that it would not load, so just registering the dll fixed the issue, thanks so much.

Is there any progress regarding this post?
https://forum.pdf-xchange.com/ ... 66&t=28826

Thanks again and I apologize
ce
User avatar
Roman - Tracker Supp
Site Admin
Posts: 303
Joined: Sun Nov 21, 2004 3:19 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Roman - Tracker Supp »

No problem, Clifford, glad to know it is fixed. You probably did this DLL replacement without closing VB6 IDE. In this case the same old DLL remained loaded into the VB6 process - Windows just kept mapping it to a renamed file.
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Is there any progress regarding this post?
viewtopic.php?f=66&t=28826

Didn't see this answered in your reply, and please see my latest post, as this build removed a function Alex added for me in 6.0.322.18704
text editor TxtEdit.FitByTextSize(True, True)

Thanks
ce
User avatar
Roman - Tracker Supp
Site Admin
Posts: 303
Joined: Sun Nov 21, 2004 3:19 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Roman - Tracker Supp »

prime clinical systems wrote:Is there any progress regarding this post?
https://forum.pdf-xchange.com/ ... 66&t=28826
I have to consult other guys to give you the answer - this question is a bit away from my sandbox. :)
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Also this build removed a function Alex added for me in 6.0.322.18704
text editor TxtEdit.FitByTextSize(True, True)
Please be sure it gets added back
thanks
ce
User avatar
Roman - Tracker Supp
Site Admin
Posts: 303
Joined: Sun Nov 21, 2004 3:19 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Roman - Tracker Supp »

Also this build removed a function Alex added for me in 6.0.322.18704
Are you aware that 18704 is an untested preview (alpha) version that should not be used in a public release of your product?
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

Yes I am, but I thought you geniuses would be adding to same code set, it's just that now, I have to comment that important line out to run the project without crashing with this build, just want to be sure that latest build should include everything to date, but I'll wait for next release to be sure it's all there
ce
User avatar
Roman - Tracker Supp
Site Admin
Posts: 303
Joined: Sun Nov 21, 2004 3:19 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Roman - Tracker Supp »

I gave you a fix derived from the latest release (build 322.4) code branch, as you told us that you need the fix asap for the upcoming release of your product.
322.18704 is a code revision from our development (trunk) branch. The trunk will eventually originate the next 323 release branch.
Of course my fix will be merged into the trunk branch and will be included in the final 323 release.
This is how our development cycle is organized. :)
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by prime clinical systems »

ok thanks, no I will have to wait because the other function is very important to the users, all I know is Alex said it would be in 323 release, thanks
ce
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Problem with All Save methods VB6 Crash on Reload Program

Post by Sasha - Tracker Dev Team »

Hello Clifford,

Yes, both of those fixes will be available in the 323 build.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply