Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Fevent crash

Fevent crash

A PocketC native palm library offering native forms and assorted utilities

Postby awschwab on Sat Feb 16, 2002 5:02 am

I think I've tracked down another one. Fevent() sometimes causes a crash if Fctl(BINDX,&x) and BINDY have been called. I'm pretty sure now that the problem is that calling malloct() after Fctl(BINDX,... causes the binding to be corrupted. Calling Fctl(BINDX,... again after malloct() provides a workaround.

One of two error messages appear on crashing. It's either that the program is trying to write to an unallocated region or memory, or that it's writing to unlocked memory.

Error messages are from my own memory, which is a bit volatile. If specifics of error messages are important, or you need a demo program, let me know.


I've observed this in POSE with OS 3.1.h3 and OS 3.5.



Edited by - awschwab on 02/15/2002 23:07:10
awschwab
 
Posts: 270
Joined: Tue Feb 06, 2001 2:33 pm
Location: USA

Postby jstadolnik on Sat Feb 16, 2002 9:43 pm

I can't seem to replicate the problem. Provided that your x and y variables are globals or are declared in the main routine I'm at a loss for explaining the error.

If you have forms in your app, it may be the PrvFixupPointers bug is trampling memory in some strange way, but that's just a guess.

This may also be a memory handling bug in PocketC.

In the mean time, I suspect that as long as you do the BINDX and BINDY commands at the very start of your program, things should work fine.

Can you provide a test case showing this?

Thanks,

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby awschwab on Sun Feb 17, 2002 1:08 pm

Joe:

Congratulations on your new family addition. I am amazed at the speed you respond even if you didn't have a newborn around. Here is a program that causes the problem for me with OS 3.5 and 3.1.h3. Since I have found a workaround, it's not so pressing to have it fixed (and it might be in PocketC, not PToolbox anyway, or I might have done something stupid).
<pre id=code><font face=courier size=2 id=code>
//FeventTest.pc
// Check of whether calling malloct() corrupts Fctl(BINDX,&xPos)
// Comment out #define REBIND to cause error.
#define REBIND
library "PToolboxLib"
#include "Fctl.h"

int xPos, yPos;

main()
{
int num;
string sEntry;
pointer pData;

// graph_on(); // irrelevant
Fctl(BINDX,&xPos);
Fctl(BINDY,&yPos);
pData = malloct(1,"i");
#ifdef REBIND
Fctl(BINDX,&xPos);
Fctl(BINDY,&yPos);
#endif

while(Fevent(1))
{
num = gets("How many integers should I allocate?");
if (num > 0)
{
free (pData);
pData = malloct(num,"i");
#ifdef REBIND
Fctl(BINDX,&xPos);
Fctl(BINDY,&yPos);
#endif
}
else
return;
}
}

Alan
</font id=code></pre id=code>
awschwab
 
Posts: 270
Joined: Tue Feb 06, 2001 2:33 pm
Location: USA

Postby jstadolnik on Sun Feb 17, 2002 5:51 pm

Thank you. I'm just hanging around the house doing stuff with my two year old. Play-dough is sure fun, but after 2.5 hours, well, I tend to sneak little breaks...

Oddly enough I still can't replicate the problem. I ran with PT v7.1.6, PocketC v4.2.0, and with OS3.1/3.5 debugger roms. What version of PocketC are you running with?

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby awschwab on Mon Feb 18, 2002 2:04 am

I've been using PToolbox 7.1.6 and PocketC 4.1.1 and 4.2.0. As written, it should work fine. Are you saying that it still works when you comment out the #define REBIND?
awschwab
 
Posts: 270
Joined: Tue Feb 06, 2001 2:33 pm
Location: USA

Postby jstadolnik on Mon Feb 18, 2002 3:54 am

Doh! For some reason I thought I saw the REBIND macro commented out.

Anyhow, I was able to replicate the bug and fix it... man, that one was a pain in the keister.

Thanks once again.

Joe

BTW, I almost had the v7.1.7 release completed until I saw your post...


The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby awschwab on Mon Feb 18, 2002 1:57 pm

You have fixed everything I know of.
Thank you!
awschwab
 
Posts: 270
Joined: Tue Feb 06, 2001 2:33 pm
Location: USA


Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest

cron