Crash from FWSavePreviewToPDF
Crash from FWSavePreviewToPDF
Hello Antonio, the new function FWSavePreviewToPDF( oPreview [, cPDFName ] ) crashes in WIN7! The Computer hangs.
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Crash from FWSavePreviewToPDF
I guess these days FWH is developed on Windows 7. Unexpected problems may arise in XP.
I can think of one reason of failing while running without administrative rights. Can you please help us to isolate the problem by running as Administrator and check?
Here is a small sample that works here for me ( on Windows 7 ). You may substitute "customer.dbf" with any small simple dbf. Also please make sure you have freeimage.dll in the path.
I can think of one reason of failing while running without administrative rights. Can you please help us to isolate the problem by running as Administrator and check?
Here is a small sample that works here for me ( on Windows 7 ). You may substitute "customer.dbf" with any small simple dbf. Also please make sure you have freeimage.dll in the path.
Code: Select all
#include "fivewin.ch"
function Main()
TPreview():bSaveAsPDF := { | oPreview, cPDF | cPDF := FWSavePreviewToPDF( oPreview ), ;
If( Empty( cPDF ), , ShellExecute( oPreview:oWnd:hWnd, "open", cPDF ) ) }
XBrowse( "CUSTOMER.DBF" )
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Crash from FWSavePreviewToPDF
I work with all privilegs in WIN7. Also I give the filename with a path with all rights. In VISTA all is OK! Whats the filename and path as default when not given?
Re: Crash from FWSavePreviewToPDF
If I wait a long time, these errormessage is coming:
Unrecoverable error 9006:
hb_xgrab cant allocate memory
Unrecoverable error 9006:
hb_xgrab cant allocate memory
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Crash from FWSavePreviewToPDF
I suspected rights issue, because in the released version, some temporary files are being written to default directory and later erased. This will not be so in next releases.byte-one wrote:I work with all privilegs in WIN7. Also I give the filename with a path with all rights. In VISTA all is OK! Whats the filename and path as default when not given?
If no file name is specified, the function prompts for a file name.
Have you tried the sample I posted? I understand you thought it might not be necessary, but I still request you to run the sample as it is and report the problem. That does help us. I would not have asked you, if we could reproduce the problem here.
This is a problem which may not happen on all systems at all times and if happens, is very difficult to debug, except by creating logs for each step.Unrecoverable error 9006:
hb_xgrab cant allocate memory
We saw here another report of this error in this post though for a different reason. http://forums.fivetechsupport.com/viewt ... hilit=9006
Once again I request to run the sample I posted and let us know the result.
By the way, may we know if you are using Harbour, xHarbour ( Borland / Microsoft ) or xHB commercial.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Crash from FWSavePreviewToPDF
Same error with your sample! I use normal xHarbour that came with FWH and Borland-Compiler.
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Crash from FWSavePreviewToPDF
Thanks for the information.
Revised build of FWH 11.06 is published a little while ago. There are some changes in this function, though I am not sure if these changes can solve the problem you reported. I request you to please download the revised build and try.
Here is a sample that I tried with different versions of Borlad xHarbour and is working fine here on Windows 7 professional 32-bits.
"wwonders.dbf" is a foxpro comatible file in the \fwh\samples folder.
Here is a screenshot of the pdf:
If you still have the problem, may I know what version of Windows-7 are you using? 32 or 64 bits? etc.
Revised build of FWH 11.06 is published a little while ago. There are some changes in this function, though I am not sure if these changes can solve the problem you reported. I request you to please download the revised build and try.
Here is a sample that I tried with different versions of Borlad xHarbour and is working fine here on Windows 7 professional 32-bits.
Code: Select all
#include 'fivewin.ch'
#include 'ord.ch'
#include 'xbrowse.ch'
REQUEST DBFCDX
function Main()
RPrevUserBtns( nil, 2007 )
TPreview():bSaveAsPDF := { | oPreview | FWSavePreviewToPDF( oPreview ) }
RDDSetDefault( "DBFCDX" )
XBrowse( "WWONDERS.DBF" )
return nil
Here is a screenshot of the pdf:
If you still have the problem, may I know what version of Windows-7 are you using? 32 or 64 bits? etc.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Crash from FWSavePreviewToPDF
What your sample is supposed to do? I only see the browse at the end and nothing else. Is it all what I should get?
EMG
EMG
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Crash from FWSavePreviewToPDF
Enrico,
Please click on the bottom left button "Print" and you will get the preview, from there select the save as PDF option
Here it is working fine with Borland and Windows 7 Ultimate 64 bits
Also is fine with FWH 64 and same Windows. FreeImage64.dll is still needed or a solution for it (access FreeImage.dll 32 bits from 64 bits app?)
Please click on the bottom left button "Print" and you will get the preview, from there select the save as PDF option
Here it is working fine with Borland and Windows 7 Ultimate 64 bits
Also is fine with FWH 64 and same Windows. FreeImage64.dll is still needed or a solution for it (access FreeImage.dll 32 bits from 64 bits app?)
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Crash from FWSavePreviewToPDF
Also fine with FWH 32 for Microsoft C++ 2010 and Windows 7 Ultimate 64 bits
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Crash from FWSavePreviewToPDF
I don't get any preview. What am I missing?Antonio Linares wrote:Enrico,
Please click on the bottom left button "Print" and you will get the preview,
EMG
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Crash from FWSavePreviewToPDF
Günther,byte-one wrote:If I wait a long time, these errormessage is coming:
Unrecoverable error 9006:
hb_xgrab cant allocate memory
Do you get a calls stack with the error ? It may help very much to know where that call is made from, thanks
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Crash from FWSavePreviewToPDF
I don't get any button "Print". I don't get anything at all, final browse apart. What am I doing wrong?Antonio Linares wrote:Enrico,
Please click on the bottom left button "Print"
EMG
Re: Crash from FWSavePreviewToPDF
Also with the new FWH the same error. I use WIN7 Home Premium 64Bits. Now the function ask to show the pdf. Should not be so!
All temporary files in the function should make in the temp-dir!!!
All temporary files in the function should make in the temp-dir!!!
No Antonio, no stack!Antonio wrote:
Do you get a calls stack with the error ? It may help very much to know where that call is made from, thanks
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Crash from FWSavePreviewToPDF
Günther,
Please let me know when should be possible to have a TeamViewer session with you, as I would like to review your pc settings and build the test myself, thanks
Please let me know when should be possible to have a TeamViewer session with you, as I would like to review your pc settings and build the test myself, thanks