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 / AGK V2 Crashing On Delete Sprite/Text

Author
Message
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 22nd Mar 2014 03:18
I haven't been able to test AppGameKit V2 with my project since it crashes when deleting sprites or text. I created a simple piece of code that replicates the problem. I attached the entire project here in a zip file. I will summit a bug report and link it back here.

It is tier 2. It is a Visual C++ 2010 project. I use 2013 IDE and have windows 8.1.

Thanks for any help.

Crashing Code:


Crash Error:

Attachments

Login to view attachments
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 23rd Mar 2014 12:36
Maybe you need to check if the objects exist, before you delete them?

I don't know about Tier2 and C++, but should not the variables be global type?

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 23rd Mar 2014 12:58
Technically, the variables you use should preferably be in template.h as either private or public members of the class.

Also as Impetus states, try a quick if sprite/text exists before deleting. However, i think that by putting the variables in the class declaration you are sure they assigned correctly in the class methods!

I think your variables are causing the issue!

www.bitmanip.com
All the juicy you could ever dream of!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Mar 2014 19:36
The code looks fine. Checking to see if the objects exist is always a good idea, but the logic in the code shown is fine.

Impetus73, the variables as defined are global in the scope of that file.

I am wondering if the issue is with IDE 2013. AppGameKit was designed to work with VS 2008 or 2010. VS 2013 may be using libraries and headers and such that are not compatible.

Parry, I don't know if VS 2010 free is still available, but can you try installing that and seeing if you still have an issue?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 23rd Mar 2014 22:35
This whole issue would go away if AppGameKit used Gnu C++ and didn't rely on the "free" versions of Visual Studio, with their frequent incompatible "updates" and "improvements."

-- Jim - When is there going to be a release?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Mar 2014 23:09
I think using Visual Studio was chosen in part because it comes with all the Windows stuff built in. And it comes with a usable IDE to do stuff (including debugging).

I think there are Gnu C++ usable libraries and such for the I/O functions, but maybe there are issues with OpenGL. Don't know.

I'm just guessing about the reasons they chose it.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Mar 2014 00:17
Quote: "I created a simple piece of code that replicates the problem"


Thanks that made it easy to track down and is now fixed.
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 27th Mar 2014 07:23
Quote: "Thanks that made it easy to track down and is now fixed."


Wow! Thank You!

Login to post a reply

Server time is: 2024-11-25 03:34:24
Your offset time is: 2024-11-25 03:34:24