Oh man. So this is gonna be a nightmare. Take a deep breath, and we'll be fine.


Alright! So I work on Dungeon Deities, which is a (relatively) big project. It got lots of panels, bitmaps, and view entities, among them this one!

Code:
ENTITY* orblock = {
	pan = -90;
	x = 100;
	z = 10;
	scale_x = 2;
	scale_y = 2;
	scale_z = 2;
	flags = NOFILTER;
	type = "Models\\lock.mdl";
	layer = 10000;
}



Including that makes acknex crash during compilation. Like so:



... but only sometimes.
If it crashes, the message is always the same:

Quote:

Problem signature:
Problem Event Name: APPCRASH
Application Name: acknex.exe
Application Version: 0.0.0.0
Application Timestamp: 4c1231af
Fault Module Name: GDI32.dll
Fault Module Version: 6.1.7601.18275
Fault Module Timestamp: 524ccfcc
Exception Code: c0000090
Exception Offset: 00017f4a
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789


Which, wise men tell me, means there's a FLT_INVALID_OPERATION, perhaps a division by zero.
The acklog:

Quote:
DI Microsoft PC-joystick driver 5 axes 10 buttons initialized
Mouse found
Joystick found
Speakers (High Definition Audio Device) opened
AMD Radeon HD 5700 Series pure T&L device 1ff9 detected
D3D device AMD Radeon HD 5700 Series 1ff9 selected.
GSCrypt.dll opened
GSHTTP.dll opened
Compiling MAIN.C - [Esc] to abort.......
PATH E:\Gstudio8\code\.............................................................................................................
debugline: function not found
isActiveOrb: function not found...............................................................................................................
PATH Models\


(and it ends there)
Yeah, I directly give the path to the file in the filename... But it was never a problem before.

Anyway, if it WORKS, the acklog looks like this:

Quote:

DI Microsoft PC-joystick driver 5 axes 10 buttons initialized
Mouse found
Joystick found
Speakers (High Definition Audio Device) opened
AMD Radeon HD 5700 Series pure T&L device 1ff9 detected
D3D device AMD Radeon HD 5700 Series 1ff9 selected.
GSCrypt.dll opened
GSHTTP.dll opened
Compiling MAIN.C - [Esc] to abort.......
PATH E:\Gstudio8\code\.............................................................................................................
debugline: function not found
isActiveOrb: function not found...............................................................................................................
PATH Models\
PATH Models\
PATH Sprites\.. 8.953 sec
Running MAIN.C.
112 objects
Main started at 10.056
pause_game_at_alt_tab_startup started
normalkeyassignment_startup started
D3D_Init Window: 720x480 -> Window: 1x720x480x32
Video memory found: 2806 MB
Main loop at 10.141....
1st frame with 2806 MB at 10.143
D3D_Resize Window: 800x600 -> Window: 1x800x600x32
LevelInit at 10.248 0 lmaps 0 textures...ok
LevelReady at 10.249
Normal exit at 11.685
Close level,DLL,objects
Free input,funcs,panels,defs,syns,views,strings,vars..ok
Free sounds,bmaps,fonts,hash,defs1,script..ok
Close dx,multimedia,D3D,engine,nexus..ok
A8 Engine - Commercial Edition V8.40.1 - Aug 7 2012
(c) Conitec - www.3dgamestudio.com
Registered to: Johannes Martin
Close window at 11.733



Sometimes it works fine. Compiles, and the game runs as it should.
But not always! Sometimes, it crashes. Inbetween those, no changes were made.

Since it only happens sporadically, this is difficult to test, so keep that in mind with the following.

Anyway, I've also tried publishing the whole thing. The resulting exe also crashes - sometimes. It used to crash pretty much everytime, but now I can't get it to crash (and on a different computer, it never crashed, but in fairness, I've only tried about three or four times). The error for that told me this:

Quote:

Problem signature:
Problem Event Name: APPCRASH
Application Name: main.exe
Application Version: 0.0.0.0
Application Timestamp: 4c1231af
Fault Module Name: acknex.dll
Fault Module Version: 8.3.0.5
Fault Module Timestamp: 5020deb6
Exception Code: c0000090
Exception Offset: 000eda99
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789


which, as you will notice, has the same Exception Code (c0000090), and the same entries for "Additional information".

AS you can see from the screenshot, the whole thing crashed before the "xx seconds" message, before the amount of objects are stated, and before my actual script is started. So maybe it's the pre-processor. So I removed that ENTITY*-definition, and replaced it with a corresponding ent_createlayer-call.
If I run that, it crashes (when it crashes) AFTER compilation (there IS a "xx seconds" message, then a black window for a split second, then a crash).
I've now put "waits" in my panel/bitmap/view-entity initializations, and SO FAR it hasn't crashed. But I sure don't feel particulary happy and safe with THAT arrangement.


So maybe it's the model, right? Maybe it's corrupt. I've tried replacing it, and it seems that with some models - used in other view entity definitions that worked fine so far - there are no crashes. But with others (not used in a view definition) that work fine as level entities (and have for a long time before), it crashes again.
Anyway, I have uploaded the model for your consideration here.



I humbly ask for your assistance, because quite frankly, I'm lost.
I unfortunately couldn't create a simple program that also crashes (I mean, I can't even get the main game to reliably crash). I suspect it may have something to do with the amount of objects listed for the pre-processor, but this is really just a wild guess.


Help me, jcl.

Help. : (



Oh, yeah, before I forget. 8.45 also crashes.



I'm using two external, old DLLs from A6 times that I do not wish to replace, as they're quite central to the project. Unless you're pretty certain they're at fault -- and they have been working fine for years in this project (yes, even in A8) -- I'd rather not replace them.


Last edited by Error014; 03/09/14 00:27. Reason: 8.45 extra info

Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!