Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lars

Pages: 1 ... 11 12 [13] 14 15 ... 51
181
I am writing a small tool (or rather, a DLL routine that integrates into the VAC workframe) to search in each archive file of a ZIP file if it contains a keyword/keystring or not.
The first approach was to unzip each archive file from the ZIP to stdout via "unzip -p" and pipe into "find" which then searches for the keyword and gives the proper return code if the keyword was found or not.
That worked but was incredibly slow (for the ZIP file size I was working on). I now decided to run "unzip -c" on the complete ZIP and pipe the output into memory. The "-c" instead of the "-p" will also add the archive names, preceding the archive content, which provides the discriminator to individually search each archive content for the keystring.
The problem is that I need to allocate enough memory for the unzipped content. I just allocated 100 MB (which is eventually freed) but that is potentially a large waste of memory.
Is there an easy and efficient way to determine the overall sum size of the UNZIPPED archive files contained in a ZIP file ?
I need something that I can integrate into an application, not a standalone solution.

182
You can set VIRTUALADDRESSLIMIT higher then your RAM. With 2GBs, I had it set to 3072, then had a DIMM die giving me 1.5 GBs of real ram. Still needed VIRTUALADDRESSLIMIT=3072 to link XUL.DLL and as long as I was careful to not have SeaMonkey running, it worked fine, if slow. I did overflow the swap file once or twice with SeaMonkey running, seems the swap file has a 2GB limit.
Virtual memory is what VIRTUALADDRESSLIMIT adjusts and with 2GBs of ram and 2GB of swap, there shouldn't be any problem besides swapping and in my experience, generally things that aren't used much gets swapped out and I found running with 1.5GBs wasn't bad.
@Pete, try doing
Code: [Select]
dir  J:\PROGRAMS\AOO4\PROGRAM\..\program\swoo.dll
to test.
Looks like the swap file has a 1 GB limit. I just specified 2 GB for initial size on SWAPPATH and it only creates a 1 GB file.
I now set it to 1 GB. Since I have 16 GB of RAM and 3 GB are visible to OS/2, it's never actually used but I have the impression that it increases system stability (before, I had set it to as low as 2 MB). I suspect that the memory management somehow tests if the in-use RAM would fit into the swap file without actually moving memory pages to the swap file or some such.

183
1) if you use JFS, make sure that you force a real chkdsk, including a proper scan of all files and directories and not just a check of the transaction log
2) I think the "candy cane" display happens because there is a video mode switch. Whatever is in video memory is "reinterpreted" for the new video mode and may lead to a funny display. I have this effect from time to time on a Ctrl-Alt-Del but it never leads to a system hang.
3) Mozilla crashes very often on my system. From what I can say from the trap info, I suspect it almost always has to do with accessing data.
4) What leads to a complete freeze on my system is to use a "hosts" file that has very many entries (like those that block unwanted sites). I am also using Injoy Firewall (which uses FXWRAP.SYS driver to filter the data stream) and maybe the combination is the problem. The effect is as if all interrupts are disabled: I can only hit the power switch. Removing the "hosts" file fixes the problem.

184
Multimedia / Re: Use of webcam
« on: July 05, 2020, 04:59:59 pm »
What I CAN say about the 2 trap screens:
they point to the very same error location.
The fact that the upper 16 bits of the 32-bit trap offset (EIP) differ is due to the address mapping. The lower 16 bits however are identical.

185
Multimedia / Re: Use of webcam
« on: July 05, 2020, 10:23:47 am »
I am sorry but the trap happens in USBEHCD of the AN 12.x stack. Of course,that is very different from my driver (it's 32-bit driver to begin with).
Of course,I do not have access to the source code of that driver. You will need to raise a problem report with AN.
If you use my full driver set and if you also get a TRAP000E, I will be able to fix it.

186
Multimedia / Re: Use of webcam
« on: July 05, 2020, 02:12:35 am »
Hi Wim,

  I decided to give this a try with my Logitech C270, and it works! I ran:

webcam /u/x640/y360/a/h/n/s | ffplay -f mjpeg -framerate 50 -i -

 and got a window with live video. Then ran:

ffplay -f s16le -ar 48000 -ac 1 -showmode 1 -i \PIPE\Webcam\Audio

 and got another window with a live sound wave and could hear the echo of my voice... woohoo!

 When I went to shut it all down, I got a TrapE in OS2EHCI when I closed the webcam console. I am using both of Lars' USBAudio drivers. The console showed a couple of errors, so I will upload a log of it in case it is interesting. Thanks for this great software!

Regards,
If you can post a screen shot of the trap screen, I have a chance to fix the error.

187
"window compatible" is a text mode application that can run either in a command window or fullscreen.
"not window compatible" is a text mode application that can only run fullscreen.
There are only a few text mode applications that have a technical reason to run "only fullscreen" but by setting the corresponding bit (via MARKEXE.EXE or by setting the corresponding linker DEF directive) you can force the system to only allow that app to run fullscreen.

188
Applications / Re: OS/4 (non technical issues)
« on: June 19, 2020, 12:02:27 pm »
Hi Igor,

can you patch the OS/4 kernel to revision 14.x and see if then the USB AN 12.x drivers will work ?

I am aware of the fact that it is not AN's job to support a kernel they don't provide (so: as an OS/4 kernel user, you are on your own, it's all your problem, if it works, then fine, if it does not, too bad) but I still see no technical limitation to use the AN drivers with an OS/4 kernel.

Note: In my own USB drivers (namely: USBD.SYS) I had added some small piece code to do something specific for the OS/4 kernel but keeping compatibility with the OS/2 and AN kernels. As far as I know my USB drivers still work on the OS/2, AN and OS/4 kernels and in fact I normally use the OS/2 kernel but occasionally I boot into the OS/4 kernel, none of either is a problem.

189
Applications / Re: OS/4 (non technical issues)
« on: June 19, 2020, 10:38:49 am »
Interesting. I thought they had gone for the KEE version,

By the way: there was a version consistency check among USB drivers also for Versions 11.x.

There was a good technical reason back then:
Things had to be fixed in the drivers that affected the interface between drivers or where there was another other interdependency between drivers where a necessary change in one driver led to a change in another driver.

190
Applications / Re: OS/4 (non technical issues)
« on: June 19, 2020, 08:38:43 am »
I only know one thing: it is easy to prevent a driver to run on OS/4.
The driver just needs to query the KEE version ( of the kernel). If it is 0x10000 then it is an OS/2 or AN kernel. If it is > 0x10000 then it is an OS/4 kernel.

191
Multimedia / Re: Use of webcam
« on: June 17, 2020, 01:21:42 pm »
https://github.com/bitwiseworks/libusb1-os2

I don't know the details but looking at the commits, they added some fixes, maybe because they are linking to USBCALLS.

192
Applications / Re: OS/4 (non technical issues)
« on: June 17, 2020, 07:05:42 am »
Can someone explain to me why it is illegal to produce drivers that work for both: OS/2 and OS/4 ?

I don't think there is a technical reason why a driver would not work with OS/4, the programming interface for most drivers is fairly well documented and OS/4 has no intention to break a programming interface (they added a few specialities for their own drivers and they enhanced the kernel but other than that, they are backwards compatible).

If there are no reasons regarding technical issues, I assume it is a marketing twist. It's easy to write a driver that is not compatible with OS/4 if you really want that.

193
Multimedia / Re: Use of webcam
« on: June 17, 2020, 06:56:47 am »
Read Paul's answer:

1) it is stored here (Netlabs "PORTS" repo):
 http://svn.netlabs.org/repos/ports/libusb1/trunk/

2) bww have their own updated version in their github account

Another good example where things drift apart.


Lars

194
Multimedia / Re: Use of webcam
« on: June 14, 2020, 07:24:58 pm »
By the way: can I remove USBLIB from the Netlabs USB repository or is this still needed ? I'd like to remove it in order to avoid any confusion of where the latest version would be.

Regards,
Lars

195
Programming / Re: A clock in WPS - Educational Project
« on: June 04, 2020, 05:35:43 pm »
1) data segment: if you define a global variable or define with "static" keyword. Stack: a lokal variable in a routine is placed on the stack.

2) you have these 2 options: put gModule in the data seg and call the code to query it only once on class initialization (read SOM spec what class init is and when it happens) or call code whenever you need the module handle in which case you can place gModule on the stack.

Pages: 1 ... 11 12 [13] 14 15 ... 51