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 / Mysterious error

Author
Message
blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 16th Feb 2012 03:47
Sometimes when I am testing a program the Visual Studio "Just-in-time" debugger pops up with a message similar to "An unhandled win32 exception occurred in AGKCompiler.exe[728]." The number in the braces (728 in this example) changes.

When I opened up the debugger I got the following message:
Unhandled exception at 0x00498f6c in AGKCompiler.exe: 0xC0000005: Access violation reading location 0x0161dffe with an option to break or continue.

I cannot figure out what is causing this message. The closest I have found to figuring out what is happening is when I add a few lines of extra unneeded code to the program this stops happening.

Anyone have any ideas on how I can find out what is wrong?

Jason
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Feb 2012 09:18
Can you share the code?

I haven't had the error myself but it might help if we can see it.

blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 17th Feb 2012 01:27
The code is over 1300 lines (it is getting to be a rather large game).

Let me see if I can create a smaller program that does the same thing as a demonstration.

Jason
blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 17th Feb 2012 02:03
I am back with a very quick example.



Note that the code provided above is a simple example to demonstrate the problem.

Jason
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 17th Feb 2012 09:31
OK I think this might be a bug but here is what is happening. You are calling the length of an undeclared string from a function. If you make "messageToShow$" global at the start then the code runs fine.

It seems that "Len()" does not like undeclared strings.

I will post this as a bug on the bug board but for the time being make sure you declare strings as global if you want to use them in a function (or feed it into the function in the brackets).

blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 18th Feb 2012 19:19
Thank you for reporting the error.

Jason

Login to post a reply

Server time is: 2024-11-23 04:06:52
Your offset time is: 2024-11-23 04:06:52