Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [BUG] SetRawWritePath() causes CreateMemBlock() to fail in DEBUG mode (Tier 1) v2.0.16

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Feb 2016 21:26
Run the attached project in DEBUG and you will see;
mb1=100001 mb2=100001
Run it normally and you will see;
mb1=100001 mb2=100002

The second MemBlock allocation is failing (I think)

Sign up for NaGaCreMo!

Attachments

Login to view attachments
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Mar 2016 00:27
Tested on 2.0.17 on Windows and both running and debugging show mb1=100001 mb2=100002
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Mar 2016 01:03
ok it must be just 2.0.16. i'll download 2.0.17

Sign up for NaGaCreMo!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Mar 2016 07:12
Downloaded 2.0.17 and still get the problem.
mb1=100001 mb2=100001 in debug mode
I get the following messages in the Debug log;
Failed to load image: agk.png, agk.png in main.agc at line 10
Failed to load image: /Missing.png, /Missing.png in main.agc at line 10
Failed to create memblock 100001 from image 0, image does not exist in main.agc at line 10

when i run it normally i get;
mb1=100001 mb2=100002

Any ideas?

Sign up for NaGaCreMo!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Mar 2016 10:14
Try deleting your write folder. I had similar problems a while ago. I think debug mode uses different folders and sometimes gets confused.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Mar 2016 20:55
Unfortunately no change. This is the thing. If i don't use SetRawWritePath() it works

Sign up for NaGaCreMo!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Mar 2016 21:45
Quote: "Failed to create memblock 100001 from image 0, image does not exist in main.agc at line 10"

That's the problem, the image does not exist so the first memblock never gets created, so when you create the second memblock it is at ID 100001.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Mar 2016 00:52
But why would it not work in debug but work ok when running normally?

Sign up for NaGaCreMo!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Mar 2016 15:03
Quote: "If i don't use SetRawWritePath() it works"

The debugger acts as a separate app and communicates via the local network to the IDE instead of running the app exe directly. This is so it can use the same debug processes as mobile devices. As such the debugger receives the app files from the IDE and writes them to its write folder, whereas the local app would read them from its read folder. When you change the write folder it can no longer access the files the IDE sent it. You will have to wait to change the write folder until after you have finished loading files, or change it back temporarily to load them.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Mar 2016 20:26
Yes this works. The question i have is ;
Why did it work for you and not for me?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Mar 2016 22:03
Because I didn't change the write path in my test
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Mar 2016 22:38
ah. ok. that makes sense

Login to post a reply

Server time is: 2024-11-25 10:34:49
Your offset time is: 2024-11-25 10:34:49