Hi all!
Are there any general principles to think about when coding apps for winxp vs winme?
I can't really post my app, since it's too big. The program has a few tabs. It opens files. Reads some information. Calculates a new file name and then renames the file. It also supports drag and drop.
The problem is this: The program works just fine in winxp / win2k but users report crashes on winme. I have no idea what is causing this.
Does anything come to mind? Yeah I know, how could you tell from this description, but anyways...
/Gantry
Program crashes in WinME and not in WinXP
Program crashes in WinME and not in WinXP
*** In the end we will remember not the words of our enemies, but the silence of our friends. (Martin Luther King Jr.) ***
Re: Program crashes in WinME and not in WinXP
>I can't really post my app, since it's too big. The program has a few tabs. It
>opens files. Reads some information. Calculates a new file name and then
>renames the file. It also supports drag and drop.
>
>The problem is this: The program works just fine in winxp / win2k but users
>report crashes on winme. I have no idea what is causing this.
Oh, i know this. I had almost the same problem with PB-Editor-GPI-MOD 4 and above. It crashed under WinXP/2000, but works fine with Win9x...
I started then jaPBe, because it was easier to rewrite the complete editor...
But, what i have changed:
* NEVER USE STRINGS AS BUFFER
(something like this: String.s=space(1000): adr=@string ....)
This can crash your code on some systems, on other not.
(And yes, i use in japbe strings as buffers, but not as much as in my mods)
* When you allocate memory, every procedure should get his own memory-block.
Don't share them, you can get in conflict with it. When you don't need them anymore, give them free.
* On CallBacks (Window,Richedit,etc), threads, etc, don't use AllocateMemory, use AllocGlobal_ (API).
Why? Windows is a MultiTasking-System, so it could happen, that the same procedure runs at the same time twice..., so you can get problems. Same for all procedures, which are called by a callback, etc.
GPI
>opens files. Reads some information. Calculates a new file name and then
>renames the file. It also supports drag and drop.
>
>The problem is this: The program works just fine in winxp / win2k but users
>report crashes on winme. I have no idea what is causing this.
Oh, i know this. I had almost the same problem with PB-Editor-GPI-MOD 4 and above. It crashed under WinXP/2000, but works fine with Win9x...
I started then jaPBe, because it was easier to rewrite the complete editor...
But, what i have changed:
* NEVER USE STRINGS AS BUFFER
(something like this: String.s=space(1000): adr=@string ....)
This can crash your code on some systems, on other not.
(And yes, i use in japbe strings as buffers, but not as much as in my mods)
* When you allocate memory, every procedure should get his own memory-block.
Don't share them, you can get in conflict with it. When you don't need them anymore, give them free.
* On CallBacks (Window,Richedit,etc), threads, etc, don't use AllocateMemory, use AllocGlobal_ (API).
Why? Windows is a MultiTasking-System, so it could happen, that the same procedure runs at the same time twice..., so you can get problems. Same for all procedures, which are called by a callback, etc.
GPI
Thanks GPI!
I will try to sort things out after reading your advice.
It's sad though not being able to trust ones applications to run on ordinary windows systems. I cant really find any bugs and still it crashes on people.
I really hope it doesn't drag my project in the dirt
, since it has (including previous version in delphi/borland builder) over 3500 downloads.
C ya all!
/Gantry
I will try to sort things out after reading your advice.

It's sad though not being able to trust ones applications to run on ordinary windows systems. I cant really find any bugs and still it crashes on people.
I really hope it doesn't drag my project in the dirt

C ya all!
/Gantry
*** In the end we will remember not the words of our enemies, but the silence of our friends. (Martin Luther King Jr.) ***