About Store Forum Documentation Contact



Post Reply 
Empty application crash
Author Message
AndrewBGS Offline
Member

Post: #1
Empty application crash
I was wondering if someone could help me out with this...
For some strange reason I get a crash when running an almost empty project;
On the very first row of main's initPre I have the code < Exit("Made it so far") >
However I never get that far.

Every time I run the application it crashes instantly with the following error message:

"Attempting to create an object of zero size in Memc container. The container is not initialized or it is abstract and 'replaceClass' hasn't been called"

I was wondering if anyone can help me out with this (I guess there's always re-making the project, since this is some weird bug, but if possible I'd like to avoid re-importing all my assets again, and also learn something from this)
05-08-2014 07:40 AM
Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #2
RE: Empty application crash
I think you are calling .ptrRequire in some constructor
05-08-2014 09:15 AM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #3
RE: Empty application crash
I have no constructor at all.
I have 3 states, main, intro and game. Main sets some display and render stuff, intro displays the logo, game shows text.

I guess I'll just remake the project, this makes no sense at all.
05-08-2014 09:18 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #4
RE: Empty application crash
Can you show us some code?
05-08-2014 09:28 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Empty application crash
05-08-2014 09:31 AM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #6
RE: Empty application crash
Nope. I don't get to see anything. Everything is closed instantly. I'll just remake it I guess...
(neither opening in VS and hitting debug nor Esenthel's "debug" option works; they both start up and instantly show the error message, but nothing is in the call stack at that time, and after pressing "ok" at the error window everything gets closed.
05-08-2014 10:04 AM
Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #7
RE: Empty application crash
This error happend to me last week too. I was using Image.ptrRequire in constructor of a global object. It was being called before InitPre(). Check if you are using some cache or something that needs EE::Mem containers before engine calls InitPre.
(This post was last modified: 05-10-2014 02:34 PM by cmontiel.)
05-10-2014 02:34 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #8
RE: Empty application crash
Yes, I did have something like that in my code;

I re-made the project, and I still have that Image.ptrRequire bit of code, but now it works. :| Programming is a mysterious thing.
05-10-2014 03:06 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Empty application crash
For future reference:
when the error occurs (the message box), don't press OK, but then click on VS menu "Debug/Break" and callstack should appear.
05-10-2014 11:30 PM
Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #10
RE: Empty application crash
Call stack didn't appear for me neither (without press ok button).
05-11-2014 04:48 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #11
RE: Empty application crash
Yup, that's right. I mean my very first line of code was Exit(); and it didn't even get to that one. It must be something even before executing my code, and that's beyond my knowledge.
05-12-2014 09:35 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #12
RE: Empty application crash
You still haven't shown any code. pfft
05-12-2014 10:07 AM
Find all posts by this user Quote this message in a reply
Post Reply