topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
hb_xFree invalid pointer | You may download the most recent xharbour build we have published at:
<!-- w --><a class="postlink" href="http://www.fivetechsoft.com/files/xharbour.exe">www.fivetechsoft.com/files/xharbour.exe</a><!-- w -->
and try it again. |
hb_xFree invalid pointer | [quote="Antonio Linares":1gso0pqk]You may download the most recent xharbour build we have published at:
<!-- w --><a class="postlink" href="http://www.fivetechsoft.com/files/xharbour.exe">www.fivetechsoft.com/files/xharbour.exe</a><!-- w -->
and try it again.[/quote:1gso0pqk]
I download it but i have this problems:
Error: Unresolved external '_hb_stack' referenced from C:\FWH\LIB\FIVEHC.LIB|FFW
NDRUN
Error: Unresolved external '_HB_FUN_DBF2TEXT' referenced from C:\XHARBOUR\LIB\RT
L.LIB|dbdelim
Thanks Antonio
A.S.K |
hb_xFree invalid pointer | Please send me a private email to <!-- e --><a href="mailto:alinares@fivetechsoft.com">alinares@fivetechsoft.com</a><!-- e --> |
hb_xfree | Buenas, estoy intentando generar un fichero rtf siguiendo el ejemplo testtrich.prg
hago esto:
oRich = TRichEdit():Redefine( 4001, { || " " }, oDlg )
oRich:LoadFromRTFFile( cGetFile( "RTF file (*.rtf) | *.rtf" ) )
oRich:SaveToRTFFile( cGetFile( "RTF file (*.rtf) | *.rtf",;
"Please write a filename", "test" ) )
Y me da un casque monumental
hb_xfree called with a NULL pointer.
Alguien sabe porque ocurre esto y como solucionarlo?
Gracias
Juanjo |
hb_xfree | Juanjo,
Las llamadas a esos métodos las haces una vez que el diálogo esta visible ?
Es decir, estas ya en ACTIVATE DIALOG oDlg ? |
hb_xfree | No, entre otras cosas porque no quiero sacarlo a pantalla, sólo queria generar un fichero rtf.
Además cuando intentó incorporar el diálogo a mi .res me da error en tiempo de ejecución de que no puede crear el dialogo |
hb_xfree() error message | Hello Users,
I found when I input data into TGet again, again
I got error message below:
hb_xfree() Pointer Overflow 'xxx'
[url:xnf2tatu]http://img205.imageshack.us/img205/271/image27xh.jpg[/url:xnf2tatu]
I use xHarbour 0.99.4+BCC55+FWH26 SEP version
Any idea or suggestion for it?
Thank you.
Richard |
hb_xfree(00E5C368) Pointer Overflow'' '' | Llevo varios intentos de poder hacer un Directory vía FTP con el siguiente código pero no encuentro la manera. Necesito que alguien me diga donde puede estar el error. Subir y Bajar archivos y comprobar si están lo hago sin problemas pero con la secuencia de comandos para hacer Directory no hay forma:
[code=fw:akcoy0t3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> FTPFINDFIRSTFILE <span style="color: #000000;">)</span> <br /> <span style="color: #000000;">{</span><br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> FtpFindFirstFile<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HINTERNET <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">(</span> WIN32_FIND_DATA * <span style="color: #000000;">)</span> hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>, hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>, hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> INTERNETFINDNEXTFILE <span style="color: #000000;">)</span> <br /> <span style="color: #000000;">{</span><br /> BOOL lSuccess = InternetFindNextFile<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HINTERNET <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <br /> hb_retl<span style="color: #000000;">(</span> lSuccess <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> </div>[/code:akcoy0t3]
[code=fw:akcoy0t3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">function</span> FTPDirectory<span style="color: #000000;">(</span> cMask,cIP,cUser,cPass <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> hFTPDir, aFiles := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> oWin32FindData, cBuffer<br /> <span style="color: #00C800;">local</span> i:=<span style="color: #000000;">0</span><br /><br /> <span style="color: #00C800;">default</span> cMask := <span style="color: #ff0000;">"*.*"</span><br /><br /> STRUCT oWin32FindData<br /> MEMBER nFileAttributes AS DWORD<br /> MEMBER nCreationTime AS STRING LEN <span style="color: #000000;">8</span><br /> MEMBER nLastReadAccess AS STRING LEN <span style="color: #000000;">8</span><br /> MEMBER nLastWriteAccess AS STRING LEN <span style="color: #000000;">8</span><br /> MEMBER nSizeHight AS DWORD<br /> MEMBER nSizeLow AS DWORD<br /> MEMBER nReserved0 AS DWORD<br /> MEMBER nReserved1 AS DWORD<br /> MEMBER cFileName AS STRING LEN <span style="color: #000000;">260</span><br /> MEMBER cAltName AS STRING LEN <span style="color: #000000;">14</span><br /> ENDSTRUCT<br /><br /> hInternet = INTERNETOPEN<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Anystring"</span>, INTERNET_OPEN_TYPE_DIRECT, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> hConnect = INTERNETCONNECT<span style="color: #000000;">(</span> hInternet, cIP, INTERNET_INVALID_PORT_NUMBER, cUser, cPass, INTERNET_SERVICE_FTP, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">if</span> hConnect != <span style="color: #00C800;">nil</span><br /> cBuffer = oWin32FindData:<span style="color: #000000;">cBuffer</span><br /> hFTPDir =<span style="color: #000000;">[</span>b<span style="color: #000000;">]</span> FtpFindFirstFile<span style="color: #000000;">(</span> hConnect, cMask, @cBuffer, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span>/b<span style="color: #000000;">]</span><br /> oWin32FindData:<span style="color: #000000;">cBuffer</span> = cBuffer<br /> <span style="color: #00C800;">if</span> ! empty<span style="color: #000000;">(</span> oWin32FindData:<span style="color: #000000;">cFileName</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aFiles, <span style="color: #000000;">{</span> oWin32FindData:<span style="color: #000000;">cFileName</span>,oWin32FindData:<span style="color: #000000;">nSizeLow</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">while</span> <span style="color: #000000;">[</span>b<span style="color: #000000;">]</span>InternetFindNextFile<span style="color: #000000;">(</span> hFTPDir, @cBuffer <span style="color: #000000;">)</span><span style="color: #000000;">[</span>/b<span style="color: #000000;">]</span><br /> <span style="color: #000000;">[</span><span style="color: #0000ff;">color</span>=#FF0000<span style="color: #000000;">]</span>oWin32FindData:<span style="color: #000000;">cBuffer</span> = cBuffer<span style="color: #000000;">[</span>/<span style="color: #0000ff;">color</span><span style="color: #000000;">]</span> <span style="color: #B900B9;">// ¡¡ Aquí es donde se produce el error !!</span><br /> aadd<span style="color: #000000;">(</span> aFiles, <span style="color: #000000;">{</span> oWin32FindData:<span style="color: #000000;">cFileName</span>,oWin32FindData:<span style="color: #000000;">nSizeLow</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> end<br /> <span style="color: #00C800;">endif</span><br /> InternetCloseHandle<span style="color: #000000;">(</span> hFTPDir <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #00C800;">for</span> i=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">(</span>aFiles<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>aFiles<span style="color: #000000;">[</span>i,<span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span> i <br /><br /> <span style="color: #00C800;">return</span> aFiles<br /> </div>[/code:akcoy0t3]
Se obtiene el siguiente error: hb_xfree(00E5C368) Pointer Overflow'' '' |
hb_xgrab can't allocate memory. | I am receiving this message "hb_xgrab can't allocate memory.", any body know how to eliminate.
Byron... |
hb_xgrab can't allocate memory. | Byron,
Are you managing a large string from your code ?
Usually you get that error, when you try to create a string larger than 2 GB. Sometimes your application may have a bug that creates such a large string.
<!-- m --><a class="postlink" href="http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx">http://www.microsoft.com/whdc/system/pl ... AEmem.mspx</a><!-- m --> |
hb_xgrab can't allocate memory. | perhaps you are using a combo with images ?
and there are not in resource the images ?
I saw this error .... |
hb_xgrab error | Saludos foro.
En una mas de los problemas de mi actualizacion me encontre con este error:
Error irrecuperable 9006
hb_xgrab no puede asignar memoria
Checanco en el foro, es por manejo de cadenas muy largas de infomarcion. (no me pasaba con fwh 8.11, bcc 5.5, xH 11)
esto tendra que ver por el equipo y/o version de windows, generalmente XP?
o en concreto como puedo resolverlo?
Gracias. |
hb_xgrab error | Noé ese tipo de archivo ocurre cuando la memoria de la pc ha sido consumida
puedes revisar el administrador de tareas de windows para confirmarlo, por favor indica
bajo que tipo de proceso te ocurre, para ver que funciones estan involucradas, por favor
da mas informacion para poder asistirte.
salu2 |
hb_xrealloc | ---------------------------
Erro irrecuper vel 9009:
---------------------------
hb_xrealloc nao pode realocar mem¢ria
[i:265iopda][translation]
hb_xrealloc can't realocate the memory
[/translation][/i:265iopda]
---------------------------
OK
--------------------------- |
hb_xrealloc | Samir,
It means that for some reason the C runtime libraries haven't been able to redimension a memory block.
I haven't seen that error in many years. Are you able to reproduce it ? |
hb_xrealloc | Antonio, I use the fivewin 8.02 with some modifications so if "in many years" mean 2 years, it can be my trouble....
The error occurs when I call a lot of functions from DLL's in sequence, when I use a sysrefresh() or change some window/dialog property between the calls the error don't occur. |
hb_xrealloc | Samir,
I was wrong, in fact we have commented several times here about hb_xrealloc() problems and the source of the problem in those cases, even some examples to reproduce it:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/search.php?st=0&sk=t&sd=d&keywords=xrealloc">search.php?st=0&sk=t&sd=d&keywords=xrealloc</a><!-- l --> |
hb_xrealloc | Samir,
Could you provide a small and self contained example to reproduce it ? thanks |
hb_xrealloc | [quote="Antonio Linares":7t8wovz1]Samir,
Could you provide a small and self contained example to reproduce it ? thanks[/quote:7t8wovz1]
Unfortunately I can't, I've tried to recreate the error but without success. Probably a series of specific calls to memory that triggers the error. |
hb_xrealloc can't reallocate memory | I checked old posts, found two with this error, but never a resolution.
I have a Function creating an XML file for a data submission. It reads through several files, creates data lines, and then writes the results to an XML file.
It starts by opening a file on the drive:
nFileHandle := FCREATE( filename, 0 )
Then data is stored in a variable,
oxData := ""
oxData += newdata
The file tree is:
Customer
Service Item
Service Tickets
After each customer, I issue:
FWrite( nFileHandle, oxData )
sysrefresh( )
This works well for about 9 MB of data. Then, I suddenly get:
Unrecoverable error 9009 hb_xrealloc can't reallocate memory
After the error, I can look at the XML file, and it is written to the same point each time. I checked and there is no error in the database. I figure that the FWRITE( ) function must have a limit in file size. I'm using the latest xHarbour.com for this build.
There is plenty of memory on the computer. In fact, it has happened on two different computers ( maybe more ).
Can anyone provide suggestions for how I might work around this issue ? Your thoughts would be greatly appreciated.
Tim |
hb_xrealloc can't reallocate memory | Found the cause of the problem ... fixed it ... but still ... any thoughts on this error would be nice ...
In this case, a key field was empty on one record, sending the program into a looping search. I'll build a trap for that !
Tim |
hb_xrealloc can't reallocate memory | Tim,
If the memory was allocated from an endless loop then you could experience that error |
hb_xrealloc can't reallocate memory | It's not necesary to be in an endless loop or sth like that to be in trouble with memory reallocation.
Clipper and [x]Harbour do a great job managing memory for us. Those who have written programs in low level languages as C or Pascal know what i mean.
Every not fixed lenght var, like strings or arrays, allocates memory outside the regular stack and data segment, in the memory heap. Harbour provides the management services required for that, so usually there ir no problem, but under certain circunstances that service is unable to handle the requirement.
That condition is usually produced by the progressive incremental allocation of memory, like Tim's code shows, concatenating small strings into a buffer. oxData, as a (I guess) LOCAL var resides in the stack, but just only the 'var' component of it. It's value is stored in the heap, using the Harbour services. The stack portion of oxData stores the handle of that memory chunck.
At startup, all the available heap conforms a big unique block of memory. Usually a several Gb segment free.
Let's take an example to make it more graphic: oxData:= Space(100). That means that there is a piece of 100 bytes stored in the heap. If originaly the original heap had 1000 bytes we got the heap split in two fragments, one of 100 byte and other, free, of 900. That limit of 1000 bytes is not real, it's for the sake of the example, usually it is way bigger than that, in the order of Gb, but an small heap is needed to show how the problem arises.
Now lets do a concatenation over the same var: oxData += 'xyz' . Harbour estimates the resulting string, what will be 103 bytes long, so it issues a hb_xrealloc() to the current pointer stored in oxData. The memory service will look for a 103 byte chunck free in memory, copy the curren 100 bytes content, amd return the new pointer. So far so good. But the problem comes from the old 100 byte chunck. What happen with it? It's not neccesary anymore, so it's marked as available, and now the memory has got fragmented into 3 pieces: 1 of 100 bytes (free), 1 of 103 (oxData), and the remaining 797 bytes as the last free block.
Do it again: oxData += 'xyz'. Now the resulting string will be 106, so, after processing it, the heap memory map becomes: 1 of 100 bytes (free), 1 of 103 (free), 106 used (oxData), and the last 691 free bytes.
One more time: oxData += 'xyz'. Now the heap is: 1 of 100 bytes (free), 1 of 103 (free), 1 of 106 (free), 109 used (oxData), and the last 582 free bytes.
In few iterations we will run out of memory, but not for not having free memory, but because the memory has got so fragmented that the memory service cannot provide a big enough piece of memory as required.
There is a very well known process called 'Garbage collection', wich among other things, recovers all the free pieces into bigger ones, defragmenting the memory.
Usually our processor intensive functions don't allow the Harbour's core to activate the garbage collector, but we are able to manually execute it calling HB_GcAll(). In Clipper that process was triggered by calling Memory(-1). So you can introduce calls to the garbage collector in your code so your memory don't get fragmented.
Arrays also have the same problem (issuing aAdds to create long arrays), but are less frequent and have a much better solution: Preallocation.
There is a way to warn Harbour that we are creating an array but it will be x elements long, check the xHarbour functions ASIZEALLOC() and ALENALLOC(), and the Harbour counterparts.
The real memory management is more complicated than all this, it includes things like virtual memory and much more, but basically the example shows the concept behind the problem.
Sorry for the long speech, but it's a little bit difficult to me to explain this concept without all this. And no graphics. |
hb_xrealloc can't reallocate memory | Carlos,
Thanks for that detailed explanation.
So, are you saying that you could reduce the fragmentation by pre-allocating a string of spaces, the replacing the spaces sequentially rather than starting with an empty string and adding strings to it? I suppose we could create a class to handle this.
I still remember on my first computer, a Radio Shack TRS-80, when I was processing lots of data (in 8K of RAM), the garbage collection would sometimes take up to an hour. At that time, myself, and nobody I knew, understood what was going on. The computer would just appear to freeze. I accidentally discovered that if I waited long enough it would continue. Of course, waiting an hour was still better then doing the work by hand.
James |
hb_xrealloc can't reallocate memory | Hi James
[quote="James Bott":1ivzgxeg]So, are you saying that you could reduce the fragmentation by pre-allocating a string of spaces, the replacing the spaces sequentially rather than starting with an empty string and adding strings to it? I suppose we could create a class to handle this.[/quote:1ivzgxeg]
In my case, i changed the function to not use the buffer, but write directly to the resulting file, but it may not be the case.
I have to check the Harbour's sources. There should be functions to make the preallocation, so we don't need to do nothing special.
In xHarbour
May be adding some well-timed hb_GcAll() calls do the job as well.
Last minute news:
2010-06-02 10:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/garbage.c
+ added new PRG function HB_GCSETAUTO( [nNewVal] ) - nPrevVal
which allows to set the frequency of automatic GC activation.
nNewVal is number of GC items (in thousands). If total number
of new GC items allocated from last GC pass exceed this value
then GC is automatically activated. Setting 0 disable automatic
GC activation. Automatic GC activation is necessary for programs
which allocates big number of complex items with cyclic references
without entering any idle state which can activate GC. In such
case users have to add to their code call to hb_gcAll() function.
In xHarbour they used sometimes background task for this job
but it's inefficient workaround for the problem due to reduced
performance.
This code is still experimental code enabled by HB_GC_AUTO Harbour
compile time macro. |
hb_xrealloc can't reallocate memory | Carlos,
Thank you very much for the detailed explanation. That really helps me better understand how memory is managed.
I assumed the function SysRefresh( ) was issued to clean up the memory
Tim |
hb_xrealloc can't reallocate memory | James,
[quote="James Bott":1gffqr4y]I still remember on my first computer, a Radio Shack TRS-80,[/quote:1gffqr4y]
<!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
hb_xrealloc can't reallocate memory | Was it this?
[url:2kbvtcf5]https://en.wikipedia.org/wiki/TRS-80[/url:2kbvtcf5]
EMG |
hb_xrealloc can't reallocate memory | My first was a Toshiba T100 running CP/M ( with dBase II even ), pictured here: [url:2zbv7n1d]http://www.oldcomputers.net/toshiba-t100.html[/url:2zbv7n1d] Not shown in this listing are the Dual floppy drive box and the monitor. |
hb_xrealloc can't reallocate memory | Tim,
great! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
hb_xrealloc can't reallocate memory | Carlos,
[quote:2vk01tmb]In my case, i changed the function to not use the buffer, but write directly to the resulting file,[/quote:2vk01tmb]
Just a few days ago I was processing a lot of large files with a program I wrote in FWH. It was reading and writing each line from and to disk. I was taking an incredibly long time with the disk thrashing all the time.
I converted it to using a 400 line buffer for the output and the time decreased by at least an order of magnitude.
Also, you may remember just a week or two ago we discovered that the ADORDD was doing a commit after each record during APPENDs. This was taking 11 hours to append 26 thousand records. Appending the same file using DBFs took 1 second.
So, buffering before writing to disk provides a tremendous increase in speed. One would expect this since writing to disk is a physical process which will be much slower than a computation process.
So I am thinking that in order to use a buffer and prevent memory fragmentation I could pre-allocate a blank string of 400 line by 80 characters as my buffer. Then just keep replacing the spaces in the string with text until it is full, then write to disk.
Thoughts?
James |
hb_xrealloc can't reallocate memory | Enrico,
Yes that is the one. It only had a cassette drive to store data. It took about a half hour just to load the program I wrote (in BASIC). Then another half hour to load the data. Then after it started processing it would hang for 10 minutes to an hour. Whew!
It was still better than a pocket calculator.
James |
hb_xrealloc can't reallocate memory | James,
I think that you must have the problematic code in your hands, then try a possible solution.
EMG |
hb_xrealloc can't reallocate memory | James,
[quote="James Bott":2x6as86d]Enrico,
Yes that is the one. It only had a cassette drive to store data. It took about a half hour just to load the program I wrote (in BASIC). Then another half hour to load the data. Then after it started processing it would hang for 10 minutes to an hour. Whew!
It was still better than a pocket calculator.
James[/quote:2x6as86d]
Other times...
My first computer was a Sinclair ZX81. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
hb_xrealloc can't reallocate memory | Enrico,
[quote:87sevvtg]I think that you must have the problematic code in your hands, then try a possible solution.[/quote:87sevvtg]
I'm not sure what you mean--that the problem was in my code? Which example are you referring to. For one the code was simply APPEND FROM [filename]. The other was read line, write line. In both cases they were reading and writing every line (or record).
[quote:87sevvtg]My first computer was a Sinclair ZX81.[/quote:87sevvtg]
Wow, I forgot about that one. I still think I have it out in the garage.
James |
hb_xrealloc can't reallocate memory | When I first started working with dBase in CP/M, the machine had little memory, used floppy disks, and drove a monochrome monitor.
The programming skills I learned by working in the very small resource setting is a benefit today, even with our faster machines that have ample resources.
James,
Initially I was creating the XML document, mentioned at the beginning of this thread, all in memory. I assumed I had plenty. Then I could write them all at once to disk. I figured it was no problem since I had many gigabytes of available RAM and the XML might reach 10 MB. In theory that might be OK, but in practice there was a limit.
I then decided to add to the XML with an FWRITE after each pass. That was still a goodly amount of data ( the loop was on customers, and this included all of their vehicles and workorders / recommendations / appointments over a defined period of time ). However, that worked beautifully ... until I discovered how the data could become infinitely large with a user error. Now that can't happen anymore.
My point is that maybe there is a way to gather a sufficient amount of data between each commit that will speed up the process.
Tim |
hb_xrealloc can't reallocate memory | Tim,
[quote:16z32cyc]My point is that maybe there is a way to gather a sufficient amount of data between each commit that will speed up the process.[/quote:16z32cyc]
If you are talking about the ADORDD and the commit after each record, then I agree, and I am the one who pointed it out as an issue. But the ADO functions apparently do the commit for each update and there is only one update function. So the original author of the ADO function needs to make a change that allows an option to buffer the COMMITs. Yes, one can do the append using SQL commands, but the ADORDD is supposed to prevent you from having to do that.
For the app I wrote, I already switched to using a buffer and I haven't had any memory fragmentation issues yet. I was just thinking that maybe a buffer class that pre-allocates memory would be handy for other projects--even yours. When I have some time I'll take a crack at it. Actually, I do remember a routine I used a few years ago that had a pre-allocated memory buffer and I didn't quite understand why. Now I do. I wish I could remember where I saw that...
James |
hb_xrealloc can't reallocate memory | James,
[quote="James Bott":1pvxs1jv]
So I am thinking that in order to use a buffer and prevent memory fragmentation I could pre-allocate a blank string of 400 line by 80 characters as my buffer. Then just keep replacing the spaces in the string with text until it is full, then write to disk.
[/quote:1pvxs1jv]
+1, access to the filesystems is always sth to be avoided.
Take into account that the memory problem comes from a growing string, there is no problem handling lots of smaller, 80 char strings, so may be you can use an Array(400) to store 80 char strings. It will be easier to implement, and "memory friendly": No big strings, no problematic reallocs. aAdd may produce more or less the same problem as strings, so preallocating the array(400), less problems too.
What about to create a TBufferedWrite class? Initialized with the File Handle and the minimun size of buffered input, a Write( cString ) method, and an End() that writes the remaining not written bytes. |
hb_xrealloc can't reallocate memory | James,
[quote="James Bott":2tg1gcw6]Enrico,
[quote:2tg1gcw6]I think that you must have the problematic code in your hands, then try a possible solution.[/quote:2tg1gcw6]
I'm not sure what you mean--that the problem was in my code?[/quote:2tg1gcw6]
I dont' know, but I know that you should not make "premature optimization". We don't need a general tool for buffered write. We need to clear understand if and where the problem is.
EMG |
hb_xrealloc can't reallocate memory | Hi Enrico,
[quote="Enrico Maria Giordano":138i3eih]We need to clear understand if and where the problem is.
[/quote:138i3eih]
IMHO the "where" is clear: buffering in a string built of small pieces in a intense computing program could lead in reallocation problems due to Harbour's memory management lack of garbage collection. It is a known problem. Please check xHarbour's online documentation about aSizeAlloc() and aLenAlloc(), that addresses the same problem with arrays growing with aAdds.
The "if" is up to the programmer: known the conditions under a program is running ( like Tim's xml generation or, in my case, a text file ) a programmer should consider if the problem's known conditions are met, and in that case which solution should be taken: unbuffered write to disk, insert in the program's code some forced calls to Harbour's GC with unpredictable results, or an smart buffer to moderate the IO.
I've solved the problems, and so Tim and James did, so it doesn't look like 'premature optimization', better call it 'reengineering' <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
I see immediate uses of this solution for me: logging to files, html/xml generation, etc. In case of logging, the problem is not the memory one but the high I/O, so buffering seems to apply. |
hb_xrealloc can't reallocate memory | All,
I put together a quick buffer class and I did some simple testing and it seems to be working. Give it a try.
James
[code=fw:34xg15k1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br />Purpose : Write buffer class<br />Author : James Bott, <!-- e --><a href="mailto:jbott@compuserve.com">jbott@compuserve.com</a><!-- e --><br />Date : 9/3/2015 9:04:36 AM<br />Company : Intellitech<br />Copyright: Copyright © 2015 Intellitech<br />Language : Fivewin/xHarbour<br />Updated : <br />Notes : Use to prevent memory fragmentation that is a known issue with xHarbour<br /><br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> oBuffer<br /> oBuffer:= TBuffer<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">500</span><span style="color: #000000;">)</span><br /> oBuffer:<span style="color: #000000;">add</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"The cow jumped over the moon."</span> + CRLF<span style="color: #000000;">)</span><br /> oBuffer:<span style="color: #000000;">add</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Mary had a little lamb."</span>+CRLF<span style="color: #000000;">)</span><br /> <br /> <span style="color: #B900B9;">// Final buffered string</span><br /> <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">(</span> oBuffer:<span style="color: #0000ff;">get</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #ff0000;">"oBuffer:get()"</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> TBuffer<br /> Hidden: <br /> <span style="color: #00C800;">Data</span> cBuffer <br /> <span style="color: #00C800;">Data</span> nSize<br /> <span style="color: #00C800;">Data</span> nLocation<br /> Export: <br /> <span style="color: #00C800;">Method</span> <span style="color: #00C800;">new</span><span style="color: #000000;">(</span>nSize<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Method</span> <span style="color: #0000ff;">size</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// pre-allocated buffer size</span><br /> <span style="color: #00C800;">Method</span> add<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// add string to buffer</span><br /> <span style="color: #00C800;">Method</span> <span style="color: #0000ff;">get</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// get buffer (trimed)</span><br /><span style="color: #00C800;">endclass</span><br /><br /><span style="color: #00C800;">Method</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span>nSize<span style="color: #000000;">)</span> <span style="color: #00C800;">Class</span> TBuffer<br /> <span style="color: #00C800;">default</span> nSize:= <span style="color: #000000;">5000</span><br /> ::<span style="color: #000000;">nSize</span>:=nSize<br /> ::<span style="color: #000000;">nLocation</span>:=<span style="color: #000000;">1</span><br /> ::<span style="color: #000000;">cBuffer</span>:= space<span style="color: #000000;">(</span>nSize<span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">self</span><br /><br /><span style="color: #B900B9;">// STUFF(<cString>, <nStart>,</span><br /><span style="color: #B900B9;">// <nDelete>, <cInsert>) --> cNewString</span><br /><br /><span style="color: #00C800;">Method</span> Add<span style="color: #000000;">(</span>cString<span style="color: #000000;">)</span> <span style="color: #00C800;">Class</span> TBuffer<br /> <span style="color: #00C800;">Local</span> nLength:= len<span style="color: #000000;">(</span>cString<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> lSuccess:= .f.<br /> <span style="color: #00C800;">if</span> len<span style="color: #000000;">(</span>::<span style="color: #000000;">cBuffer</span><span style="color: #000000;">)</span> - ::<span style="color: #000000;">nLocation</span> > len<span style="color: #000000;">(</span>cString<span style="color: #000000;">)</span> <br /> ::<span style="color: #000000;">cBuffer</span>:= stuff<span style="color: #000000;">(</span>::<span style="color: #000000;">cBuffer</span>,::<span style="color: #000000;">nLocation</span>,nLength,cString<span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">nLocation</span>:= ::<span style="color: #000000;">nLocation</span> + nLength <br /> lSuccess:=.t.<br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> lSuccess<br /><br /><span style="color: #00C800;">Method</span> <span style="color: #0000ff;">Get</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">Class</span> TBuffer<br /><span style="color: #00C800;">Return</span> rtrim<span style="color: #000000;">(</span>::<span style="color: #000000;">cBuffer</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Method</span> <span style="color: #0000ff;">Size</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">Class</span> TBuffer<br /><span style="color: #00C800;">Return</span> ::<span style="color: #000000;">nSize</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #B900B9;">// EOF </span></div>[/code:34xg15k1] |
hb_xrealloc no puede reubicar la memoria | Saludos
Al enlazar mi app y ejecutarla me envia este error.
Sugerencias? |
hb_xrealloc no puede reubicar la memoria | Error recursivo que desborda la pila o la memoria. |
hb_xrealloc no puede reubicar la memoria | Suponia ese detalle...
Pero que podré hacer para solucionarlo? |
hb_xrealloc no puede reubicar la memoria | Porfa, reproducir el error en un ejemplo pequeño. Saludos. |
hb_xrealloc no puede reubicar la memoria | Saludos.
No marca error de alguna función o sintaxis, solo no ejecuta la app y lo unico que muestra es un mensaje con este error. |
hb_xrealloc no puede reubicar la memoria | Windows de 64 Bits con 4 Gbs de RAM?
Hay algo en tu código que está explotando la memoria. Sin ver su código, es difícil ayudarlo.
Proporcione más información.
Regards, saludos. |
hb_xrealloc no puede reubicar la memoria | Tal parece que el problema que tengo esta con la actualizacion de los DLL necesarios, por ejemplo ACE32.DLL para las versiones de FWH 20.06, xHarbour para BCC 7.4 y BCC 7.4
Donde podre descargarlas.... |
hb_xrealloc no puede reubicar la memoria | Mis app son para 32 bits. |
hb_xrealloc no puede reubicar la memoria | Mis app son para 32 bits. |
hb_xrealloc no puede reubicar la memoria | C:\FWH..\SAMPLES\ACE32.DLL
xHarbour y BCC74
[url:2l7q1lhv]http://forums.fivetechsupport.com/viewtopic.php?f=16&t=33542[/url:2l7q1lhv]
Saludos. |
hb_xrealloc no puede reubicar la memoria | [quote="noe aburto":1oaugu75]Tal parece que el problema que tengo esta con la actualizacion de los DLL necesarios, por ejemplo ACE32.DLL para las versiones de FWH 20.06, xHarbour para BCC 7.4 y BCC 7.4
Donde podre descargarlas....[/quote:1oaugu75]
[url:1oaugu75]https://devzone.advantagedatabase.com/dz/content.aspx?key=20&Release=19&Product=25&Platform=12[/url:1oaugu75] |
hb_zip difference between harbour and xharbour | Good morning
I have an ennoying difference with the zip file generated with Harbour
Supposing the working directory is Test
zipping the test directory with Xharbour will show Test as main directory , with harbour it will show C as main directory then test below
the code used is the following
lZipDone := HB_ZIPFILE( cZip , aFiles , 9, {|cFile,nPos| UPDMETER(CFILE,OMETER,NPOS,@nctr,NLEN,ODLG,@DLGFILE,OBJFILE)}, .T.,, lZipWithPath, .F. )
Does anyone know how to deal with this ?
thanks for the help
PS : this is my housekeeping program, the only one i still use xharbour for....
Richard |
hb_zip difference between harbour and xharbour | Richard,
I recently changed from xHarbour Builder to the latest Harbour version. I only had to add som libraries,but all my hb_zip functions are working just fine without changing one single character in my code. |
hb_zip difference between harbour and xharbour | Michel
I did not change a single line of code neither, this is not the point
The point is that we do not get the same results and it is very ennoying for backwards compatibility
In other words a file saved with xharbour will not be restored properly with harbour and vice versa because harbour will always place the root drive on top.
I had planned to get rid of hb_zip , il will replace with 7z command line , much easier
Richard |
hb_zip difference between harbour and xharbour | Hi Michel,
In order compile HB_ZIPFILE in xHarbour commercial, what libraries should i add?
Thanks.
add : I have forgetten the say my program is console application. |
hb_zipfile Comprimir Carpetas/Subcarpetas | Muy buenas foro, alguien tendría un ejemplo con la funcion hb_zipfile, para indicar como puedo comprimir una carpeta y todo la que contenga esta (subcarpetas, subsubcarpetas, ... etc.))
Un Saludo y Mil Gracias. |
hb_zipfile Comprimir Carpetas/Subcarpetas | softruf
Ingresa en [url:7u1ny2o1]http://forums.fivetechsupport.com/search.php[/url:7u1ny2o1] "hb_zipfile" y vas a tener varios post que responden tu consulta
Saludos |
hb_zipfile Comprimir Carpetas/Subcarpetas | Tema Interesante ...
Crear ZIP incluyendo carpeta y subcarpeta(s) ...
utilizando hb_zipfile ...
Suponga que tiene un Directorio D:\DEV\CONT\BUILD
lo que intentaria comprimir en ZIP esta en el directorio CONT y en el subdirectorio BUILD
pruebe algo asi:
[code=fw:ze69eegn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> Backup<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> pathback,pathdata<br /> ** creamos un directorio JECBack para guardar alli el ZIP<br /> pathback=CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> pathback+=<span style="color: #ff0000;">':<span style="color: #000000;">\J</span>ECBack'</span><br /> <span style="color: #00C800;">IF</span> .NOT. lIsDir<span style="color: #000000;">(</span>pathback<span style="color: #000000;">)</span><br /> lMkDir<span style="color: #000000;">(</span>pathback<span style="color: #000000;">)</span><br /> ENDI<br /> ** ahora asignamos el path a comprimir, en una variable<br /> pathdata=CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> pathdata+=<span style="color: #ff0000;">':<span style="color: #000000;">\D</span>EV<span style="color: #000000;">\C</span>ONT'</span><br /> ** vamos a usar un nombre para el comprimido con iniciales BK+AAAAMMDD.ZIP<br /> ** ejecutamos primero la compresion del subdirectorio BUILD<br /> hb_ZipFile<span style="color: #000000;">(</span> pathback+<span style="color: #ff0000;">'<span style="color: #000000;">\B</span>K'</span>+DTOS<span style="color: #000000;">(</span>DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, pathdata+<span style="color: #ff0000;">'<span style="color: #000000;">\B</span>UILD<span style="color: #000000;">\*</span>.*'</span>,,,,,.T.,.T.,, <span style="color: #000000;">)</span><br /> ** ahora ejecutamos la compresion del directorio CONT<br /> hb_ZipFile<span style="color: #000000;">(</span> pathback+<span style="color: #ff0000;">'<span style="color: #000000;">\B</span>K'</span>+DTOS<span style="color: #000000;">(</span>DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, pathdata+<span style="color: #ff0000;">'<span style="color: #000000;">\*</span>.*'</span>,,,.F.,,.T.,.T.,, <span style="color: #000000;">)</span><br /> ENDI<br /> ** HAZ CREADO UN ZIP INCLUYENDO SUBCARPETAS<br />RETU <span style="color: #00C800;">nil</span><br /> </div>[/code:ze69eegn]
Saludos
Julio César Gómez Cortéz
LIMA-PERU |
hb_zipfile Comprimir Carpetas/Subcarpetas | [code=fw:2epcagek]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH...\SAMPLES\MBACKUP.PRG</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oBar<br /><br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /> SET DATE BRITISH<br /> SET TIME FORMAT <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"HH:MM:SS"</span><br /> SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">YEAR</span><span style="color: #000000;">(</span> DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">30</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"3D mBackup"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar _3D <span style="color: #0000ff;">OF</span> oWnd<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">ACTION</span> mBackup<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Maggiro.</span><br /><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"3D mBackup"</span> NOINSET CLOCK DATE KEYBOARD<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> mBackup<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Maggiro.</span><br /><br /> <span style="color: #00C800;">LOCAL</span> pathback, pathdata<br /><br /> ** creamos un directorio JECBack para guardar alli el ZIP<br /> pathback := CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> pathback += <span style="color: #ff0000;">':<span style="color: #000000;">\J</span>ECBack'</span> <span style="color: #B900B9;">// Carpeta de destino del Backup</span><br /><br /> <span style="color: #00C800;">IF</span> .NOT. lIsDir<span style="color: #000000;">(</span>pathback<span style="color: #000000;">)</span><br /> lMkDir<span style="color: #000000;">(</span>pathback<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> ** ahora asignamos el path a comprimir, en una variable<br /> pathdata := CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// pathdata+=':\DEV\CONT'</span><br /> pathdata += <span style="color: #ff0000;">':<span style="color: #000000;">\A</span>lianca'</span> <span style="color: #B900B9;">// Carpeta de Origen C:\ALIANCA</span><br /><br /> ** vamos a usar un nombre para el comprimido con iniciales BK+AAAAMMDD.ZIP<br /><br /> ** ejecutamos primero la compresion del subdirectorio BUILD<br /> hb_ZipFile<span style="color: #000000;">(</span> pathback+<span style="color: #ff0000;">'<span style="color: #000000;">\B</span>K'</span>+DTOS<span style="color: #000000;">(</span>DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, pathdata+<span style="color: #ff0000;">'<span style="color: #000000;">\B</span>UILD<span style="color: #000000;">\*</span>.*'</span>,,,,,.T.,.T.,, <span style="color: #000000;">)</span><br /><br /> ** ahora ejecutamos la compresion del directorio CONT<br /> hb_ZipFile<span style="color: #000000;">(</span> pathback+<span style="color: #ff0000;">'<span style="color: #000000;">\B</span>K'</span>+DTOS<span style="color: #000000;">(</span>DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, pathdata+<span style="color: #ff0000;">'<span style="color: #000000;">\*</span>.*'</span>,,,.F.,,.T.,.T.,, <span style="color: #000000;">)</span><br /><br /> ** HAZ CREADO UN ZIP INCLUYENDO SUBCARPETAS<br /><br /> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN</span><br /> </div>[/code:2epcagek]
Regards, saludos. |
hb_zipfile Comprimir Carpetas/Subcarpetas | Joao: Sample Perfecto ... un abrazo!
Julio César Gómez Cortéz
Jultzem - Lima Perú |
hb_zipfile corrupcion en ZIP grandes | Estimados amigos del foro, hace tiempo utilizo HB_ZIPFILE funcion incluida en XHARBOUR y que funciona correctamente hasta ahora que empezamos a crear archivos ZIP de mas de 2GB, he ahí el problema si el archivo zip resultante de la compresión supera los 2GB este se termina en el tamaño final correctamente se puede abrir ver todo su contenido pero si queremos extraer algunos estos estan corruptos y no pueden extraerse, tambien la respuesta de esta funcion al terminar es 0 o sea informa error de backup, el mensaje al tatar de extraer un archivo es CRC in Headers zip, a alguien le ha pasado esto ??, esta funcion es muy utilizada en nuestras aplicaciones y no sabemos como solucionarlo, alguna pista ??, Gracias y saludos a todos, |
hb_zipfile corrupcion en ZIP grandes | Hola a todos.
Me acaba de pasar lo mismo.
GUSPRE, ¿ has encontrado una solución ?
Un saludo y muchas gracias. |
hb_zipfile corrupcion en ZIP grandes | Hola,
Lamento informarles que esa es un restricción del formato zip utilizado. Yo tuve que solucionarlo llamando al programa 7zip, lo pueden encontrar en sourceforge.net, tiene un programa de consola y una interfaz grafica.
Saludos,
Lautaro Moreira |
hb_zipfile corrupcion en ZIP grandes | [quote="Lautaro":2hubee8n]Hola,
Lamento informarles que esa es un restricción del formato zip utilizado. Yo tuve que solucionarlo llamando al programa 7zip, lo pueden encontrar en sourceforge.net, tiene un programa de consola y una interfaz grafica.
Saludos,
Lautaro Moreira[/quote:2hubee8n]
Lo probaré, muchas gracias.
Un saludo |
hbclas error 2012 que hice mal? SOLUCIONADO | DISCULPEN.
Estaba mal la confifuracion de la ruta include
Perdon.
Gracias.
Hola amigos.
Compilando con 2008 no tengo problemas pero con 2012 si.
Error Fwh2012\include\Objects.ch (5) Error F0009 Can't open #include file hbclas.ch
Gracias
Saludos |
hbclas error 2012 que hice mal? SOLUCIONADO | hbclas.ch??
[code=fw:2w4370nz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> hbclass.ch<br /> </div>[/code:2w4370nz]
Saludos. |
hbclas error 2012 que hice mal? SOLUCIONADO | Si, disculpen el error que me da es hbclass.ch
El problema esta en los include de FWH 2012?
Gracias |
hbclas error 2012 que hice mal? SOLUCIONADO | [quote="D.Fernandez":1ghz92zq]Si, disculpen el error que me da es hbclass.ch
El problema esta en los include de FWH 2012?
Gracias[/quote:1ghz92zq]
No comprendo. Hbclass.ch és de Harbour.
[code=fw:1ghz92zq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />C:\HARBOUR\include<br /><br /><span style="color: #000000;">17</span>/<span style="color: #000000;">07</span>/<span style="color: #000000;">2011</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">57</span> <span style="color: #000000;">5.521</span> hbcairo.ch<br /><span style="color: #000000;">14</span>/<span style="color: #000000;">02</span>/<span style="color: #000000;">2011</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">48</span> <span style="color: #000000;">37.929</span> hbclass.ch<br /><span style="color: #000000;">28</span>/<span style="color: #000000;">09</span>/<span style="color: #000000;">2010</span> <span style="color: #000000;">12</span>:<span style="color: #000000;">47</span> <span style="color: #000000;">5.918</span> hbcom.ch<br /><span style="color: #000000;">17</span>/<span style="color: #000000;">07</span>/<span style="color: #000000;">2011</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">49</span> <span style="color: #000000;">31.158</span> hbcompat.ch<br /><span style="color: #000000;">17</span>/<span style="color: #000000;">07</span>/<span style="color: #000000;">2011</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">56</span> <span style="color: #000000;">31.651</span> hbcurl.ch<br /> </div>[/code:1ghz92zq]
Saludos. |
hbclas error 2012 what wrong with me? SOLUCIONADO | MY ERROR, THE INCLUDE DIR WAS WRONG. SORRY
Hi friends.
Compiing with 2008 It's OK, but with 2012, no.
Error Fwh2012\include\Objects.ch (5) Error F0009 Can't open #include file hbclas.ch
So I'm compiling with fwh212, but the include files are 2008.
Any idea.
Thank you. |
hbclas error 2012 what wrong with me? SOLUCIONADO | The include filename is wrong. The correct name is
[code=fw:9nshcsn8]<div class="fw" id="{CB}" style="font-family: monospace;">hbclass.ch</div>[/code:9nshcsn8]
EMG |
hbclas error 2012 what wrong with me? SOLUCIONADO | Enrico the error is [b:10vxnwpg]hbclass[/b:10vxnwpg].ch I writte it wrong. With include FWH2012, doesn't happend.
Somethig I'm doing wrong?
I work with xMate, I rename the 2008 to 2012.
Thank you. |
hbcomm - xharbour 1.1.0 | hbcomm.lib do xharbour 1.1.0
Alguem me envia por email:
<!-- e --><a href="mailto:ubiratan@sgsistemas.com.br">ubiratan@sgsistemas.com.br</a><!-- e -->
Obrigado |
hbcomm - xharbour 1.1.0 | Conforme o Mestre Antonio Linares, sua versão não necessita mais desta biblioteca.
Podes usar comandos FIVEWIN diretamente para controlar suas portas seriais.
Veja no \samples\TESTCOMM.PRG e PHONE.PRG. |
hbcomm - xharbour 1.1.0 | heheh, tem razão!
Obrigado |
hbcomm Adnormal Termination Program | Hola:
Tengo la siguiente rutina para consultar los Kilos de un visor de báscula me aparece el error "Adnormal Termination Program" cuando ejecuta la instrucción:
Init_Port("COM1",9600,0,8,1,1024)
Utilizo Harbour Compiler Alpha build 45.0 (Flex), FWH 2.7 y enlazo elHBCOMM.LIB y HBCOMM.C
¿Qué hago mal?
Saludos.
Ricardo Patón
<!-- e --><a href="mailto:rpaton@teleline.es">rpaton@teleline.es</a><!-- e -->
FUNCTION VisorEPEL() // Visor EPEL Rojo
LOCAL cOld:=select()
LOCAL cInput:=space(visor->buff_size)
IF ! Init_Port("COM1",9600,0,8,1,1024)
MsgStop(OemToAnsi("No se ha podido establecer comunicaci¢n con el Visor"))
RETURN 0
ENDIF
OutBufClr()
OutChr("$")
SysWait(visor->timeout)
SysRefresh()
InChr(visor->buff_size)
cInput := substr(cInput, visor->byteini, visor->bytefin)
UnInt_Port()
dbSelectArea(cOld)
RETURN val(cInput) |
hbcomm Adnormal Termination Program | Ricardo,
> Utilizo Harbour Compiler Alpha build 45.0 (Flex), FWH 2.7 y enlazo el HBCOMM.LIB
La versión de HBCOMM.lib que usas está compilada con esa misma versión de Harbour ? |
hbcomm Adnormal Termination Program | [quote="Antonio Linares":1tylpe3s]Ricardo,
> Utilizo Harbour Compiler Alpha build 45.0 (Flex), FWH 2.7 y enlazo el HBCOMM.LIB
La versión de HBCOMM.lib que usas está compilada con esa misma versión de Harbour ?[/quote:1tylpe3s]
Hola:
La HBCOMM.LIB que utilizo es la que está en este forum en el apartado UTILIDADES.
Los ficheros que tengo son estos:
19/05/2002 10:54 21.422 comm.cpp
19/05/2002 10:54 4.527 comm.h
26/05/2002 10:02 946 hbcomm.c
25/05/2002 13:47 573 hbcomm.h
27/05/2002 12:43 26.112 hbcomm.lib
26/05/2002 10:47 1.963 hblcomm.cpp
26/05/2002 10:50 5.580 Porta.prg
Saludos.
Ricardo Patón |
hbcomm Adnormal Termination Program | Ricardo,
Deberías reconstruir la librería con la versión de Harbour que estés usando para asegurarte de que no haya incompatibilidades |
hbcomm Adnormal Termination Program | [quote="Antonio Linares":1m82k353]Ricardo,
Deberías reconstruir la librería con la versión de Harbour que estés usando para asegurarte de que no haya incompatibilidades[/quote:1m82k353]
Hola:
Finalmente el problema estaba en el orden de los parámetros pasados. Yo enviaba: Init_Port("COM1",9600,0,8,1,1024)
y debería enviar Init_Port("COM1",9600,8,0,1,1024), es decir, intercambié la Paridad con los Bits de Datos.
Gracias por la atención.
Saludos.
Ricardo Patón |
hbcomm actualizada | Colegas,
Necesito HBLIB Actualizada
Init_Port( cCom, nBaudios , nBits , cParidad , nStops , 1024 ) devuelve .T. o .F.
Los ejemplos dicen que envian valores numéricos.
En este sitio no está : <!-- w --><a class="postlink" href="http://www.fivetechsoft.com/files/hbcomm.zip">www.fivetechsoft.com/files/hbcomm.zip</a><!-- w --> |
hbcomm actualizada | Juan,
Lo idóneo es que la pidas en news.xharbour.org y a ver si así descubrimos donde está alojada y cómo conseguir la versión más reciente. Por lo que se ve, no está en el CVS de xharbour en la sección de contribuciones. |
hbcomm actualizada | Antonio
Muchas gracias,
necesito cualquiera más reciente, la que poseo tiene como cuatro años y no la he actualizado. |
hbcomm xharbour 1.1.0 alguem tem? | Amigos preciso da hbcomm para xharbour 1.1.0Alguem poderia me enviar?Ou onde consigo ela?<!-- e --><a href="mailto:playoff111@hotmail.com">playoff111@hotmail.com</a><!-- e --> |
hbcomm xharbour 1.1.0 alguem tem? | Tentou solicitar ao Luiz Culik ? talvez ele possa disponibilizar para você. Outra opção seria pegar os fontes da hbcomm da CVS da Minigui e compilar com sua versão do xharbour. |
hbcomm xharbour 1.1.0 alguem tem? | sygecom, poderia me informar o EMAIL dele?Obrigado |
hbcomm xharbour 1.1.0 alguem tem? | [quote="SGS":2ion6zim]Amigos preciso da hbcomm para xharbour 1.1.0
Alguem poderia me enviar?
Ou onde consigo ela?
<!-- e --><a href="mailto:playoff111@hotmail.com">playoff111@hotmail.com</a><!-- e -->[/quote:2ion6zim]La puedes bajar aquí:<!-- m --><a class="postlink" href="http://www.box.net/shared/9ci0y0xz5u">http://www.box.net/shared/9ci0y0xz5u</a><!-- m --> |
hbcomm xharbour 1.1.0 alguem tem? | Muito obrigado José! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
hbcomm xharbour 1.1.0 alguem tem? | Se não me engano o Luiz Culik tem uma versão mais atualizada que essa que o colega postou.E-mail: luiz<at>xharbourpontocompontobr ! entendeu. ! |
hbcomm xharbour 1.1.0 alguem tem? | Obrigado! |
hbcomm.lib | <!-- m --><a class="postlink" href="http://hyperupload.com/download/02e2d2c498/hbcomm.zip.html">http://hyperupload.com/download/02e2d2c ... m.zip.html</a><!-- m --> |
hbcomm.lib - xharbour - fwh1111 | hbcomm.lib para xharbour e fwh1111
donde puedo encontrar?
muchas gracias |
hbcomm.lib - xharbour - fwh1111 | resolvido
no link com a hbcomm.lib do link :
<!-- m --><a class="postlink" href="http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=20198">http://www.fivewin.com.br/forum/topic.a ... C_ID=20198</a><!-- m -->
link da lib:
<!-- m --><a class="postlink" href="http://www.salc.com.br/atual/hbcomm.lib">http://www.salc.com.br/atual/hbcomm.lib</a><!-- m -->
a funcao usada:
[code=fw:1b6jpqbn]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />*--------------------------------------<br /><span style="color: #00C800;">Function</span> fLeitura<span style="color: #000000;">(</span>nTara, oQtd, cPorta<span style="color: #000000;">)</span><br />*--------------------------------------<br /><span style="color: #00C800;">Local</span> cDados, nPeso<br /><br /> <span style="color: #00C800;">Default</span> nTara:=<span style="color: #000000;">0</span><br /> <span style="color: #00C800;">Default</span> cPorta:=<span style="color: #ff0000;">"COM1"</span><br /><br /> nHandle:=Init_Port<span style="color: #000000;">(</span>cPorta,<span style="color: #000000;">2400</span>,<span style="color: #000000;">8</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">4000</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">If</span> nHandle <= <span style="color: #000000;">0</span><br /> MsgStop<span style="color: #000000;">(</span><span style="color: #ff0000;">"Erro ao abrir a porta: "</span> + cPorta + CRLF+<span style="color: #ff0000;">"Verifique se a mesma não está sendo usada por outro programa."</span>, <span style="color: #ff0000;">"Alerta!"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">Endif</span><br /><br /> OutBufClr<span style="color: #000000;">(</span>nHandle<span style="color: #000000;">)</span> <span style="color: #B900B9;">// Limpa o Buffer de Saida</span><br /> OutChr<span style="color: #000000;">(</span>nHandle,CHR<span style="color: #000000;">(</span><span style="color: #000000;">5</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> SysWait<span style="color: #000000;">(</span><span style="color: #000000;">0.3</span><span style="color: #000000;">)</span><br /> Bytes := InbufSize<span style="color: #000000;">(</span>nHandle<span style="color: #000000;">)</span><br /> cDados=Space<span style="color: #000000;">(</span><span style="color: #000000;">20</span><span style="color: #000000;">)</span><br /> Buffer := InChr<span style="color: #000000;">(</span> nHandle, Bytes, @cDados<span style="color: #000000;">)</span> <span style="color: #B900B9;">//LER BUFFER DE ENTRADA DA BALANCA</span><br /> UnInt_Port<span style="color: #000000;">(</span>nHandle<span style="color: #000000;">)</span><br /> nPeso=<span style="color: #000000;">(</span>val<span style="color: #000000;">(</span><span style="color: #0000ff;">substr</span><span style="color: #000000;">(</span>cDados,<span style="color: #000000;">2</span>,<span style="color: #000000;">5</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>/<span style="color: #000000;">1000</span><span style="color: #000000;">)</span>-nTara<br /><br /> oQtd:<span style="color: #000000;">Varput</span><span style="color: #000000;">(</span> nPeso <span style="color: #000000;">)</span><br /> oQtd:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oQtd:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1b6jpqbn]
obrigado |
hbcplr.lib xharbour equivalent | Someone knows if xharbour have a hbcplr.lib equivalent?
Thanks in advance. |
hbcplr.lib xharbour equivalent | I am afraid there is no an equivalent for it
and thats the main reason to use Harbour instead of xHarbour |
hbcplr.lib xharbour equivalent | [quote="Antonio Linares":2ywwxv7g]I am afraid there is no an equivalent for it
and thats the main reason to use Harbour instead of xHarbour[/quote:2ywwxv7g]
Thank you Antonio! |
hbcrypt | I'm working on building my application with UE Studio, Borland BCC 582, and xHarbour / FWH ... fun
For those of you familiar with this type of build, I'm getting an error "Unresolved External '_adler32' referenced from RTL.LIB\hbcrypt
Anyone have a fix for this ?
Thanks. |
hbcrypt | You have to link zlib.lib.
EMG |
hbcrypt | Tim
I have published in the link below a sample of my application file for uestudio, all needed libraries are in there
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=19867">viewtopic.php?f=3&t=19867</a><!-- l -->
Hth
Richard |
hbcurl how is it used? | I am just now diving into Mod_Harbour so please excuse my lack of knowledge. I see hbcurl referenced in many of the examples.
When I attempt to call curl_easy_init() I get:
Error: Unknown or unregistered symbol
operation: CURL_EASY_INIT
Is this built into mod_harbour, or do I need to reference it somehow?
Thanks, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.