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.

DarkBASIC Professional Discussion / Cannot Create EXE???

Author
Message
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 30th Jul 2015 16:10
Okay, so my program has now started saying "Cannot Create EXE" for some reason... Believe it or not, the code which is making this error come up is empty IF blocks! Can anyone see an issue with the below code? The program compiles without it there, and doesn't compile with it there!





Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2015 17:17
Does it compile on its own or with minimal wrapping?

Actually, I doubt it's anything to do with the code. Have you tried closing the project and checking its folder? If there are any unusual compiler output files there (I forget the extenders concerned, .pcx or something?) just delete them and try again.

If that fails, try rebooting.



Powered by Free Banners
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 30th Jul 2015 17:41
It does compile on it's own, yeah. That's why it's so odd. This is a SUPER large project, though. I'm terrified that I've hit some sort of "maximum number of lines of code" in DBP or something like that.

I've actually been trying to resolve this for 3 days now. The error is consistently happening when I add that code above. There are no hidden characters in it, either, as I have even tried manually re-typing it into the project to see if that makes a difference.

I doubt it's extraneous compiler output files, since if I remove that code the program compiles just fine!

It's utterly bizarre...

btw... HI GREEN GANDALF!!!


Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 30th Jul 2015 19:01
Well, leave that code out and add a few lines subroutine that does nothing or that you don't call.
You'll get to know if it is a problem of maximum number of lines.
To me it appears as a problem of missing or conflicting globals.
Also, how come that two of the ELSEs have no code following?
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 30th Jul 2015 19:03
Hi Scorpyo.

There was code inside of them, but when this error started three days ago I started stripping out more and more code to see where the problem was. Eventually I got it down to just the nested IF blocks and nothing else and it was still happening. It makes no sense to me. If I take that code above out of the project it works fine. If I put it back in again it won't compile...


Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 30th Jul 2015 19:31
I would anyway check what suggested above.
or even better create a small different program containing that code and compile it to see what you get.
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 30th Jul 2015 19:38
Quote: "It does compile on it's own, yeah. That's why it's so odd. "


Already tried that and it works. Also tried just putting heaps of print statements in the place of the code above to see if it's a max number of lines thing and it compiles fine. For some reason it doesn't like that particular structure of IF blocks.

I've created a new project and am copying over all of the code files into it to see if it compiles. It may be a corrupt project file?


Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 30th Jul 2015 19:45
I was about to suggest that. Occurred to me many times. ( It's what I call the Clone Project Fix ).
Let's keep fingers crossed.
Cheers
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2015 19:45
Have you tried doing it slightly differently? For example, try adding the cases one at a time - or in a different order.

This sort of error is annoying and troubling. I can only sympathise.



Powered by Free Banners
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 30th Jul 2015 20:00
Just finished trying the code re-add. No dice broken in the new file, too. This is really troubling.

I tried adding the cases one at a time and they still break on the second one.

This is driving me mental. Three days I've been looking at this.


Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2015 20:08
Reboot? A long shot I know.



Powered by Free Banners
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 31st Jul 2015 04:46
I've been trying to fix this for 3 days In that time I've rebooted maybe 5 times


CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 31st Jul 2015 09:43
Update on the problem... It's happening with any new function that I add.

Though, strangely, not to empty functions. I tried adding just some basic:

FUNCTION TestFunction()
RetVal = 0

ENDFUNCTION RetVal

And that compiles just fine. But if I go in and put code in there, it won't make the EXE anymore.


Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 31st Jul 2015 15:42
Be sure to keep track of the number of functions/subroutines you have defined; these appear to multiply the complexity of the 'compile process' and can lead to no EXE being created whatsoever. See my bug report here.

One premiss for the conclusion of this argument is that you may have too many functions/subroutines. You can find out whether this is a sound argument in your case by attempting to compile a test program with 2,000 or 3,000 functions; which on any machine I have used, will fail to compile... The link above tells you the story.

If this guess proves to be the cause of the problem, then the work around will be a design decision; placing more functionality into scripting languages and data files or databases; placing some interactivity inside of DLLs, plugins, backend apps or an additional EXE.

A magical bug fix is currently unavailable and unless TGC can reproduce the error and solve it at their end; will not be available for some time.

Hopefully I am wrong.

CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 31st Jul 2015 23:48
It definitely gives me a starting point, Chris.

Very troubling for me to hit this so close to release, but like you said, with a bit of cleverness I should be able to re-write things to sort it out.


Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st Jul 2015 23:54
Let's hope Chris is right. Knowing the nature of the problem is more than half the battle.



Powered by Free Banners
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 1st Aug 2015 14:10
Seems to have made a difference to follow this theory. I trawled through hundreds of pages of code to find any redundant functions. Found a handful, removed them and the project compiled. Freeing up functions made room for new functions!

Interesting fact, though... My project wouldn't have more than a couple of hundred functions total.


Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 2nd Aug 2015 00:59
That's good, you got it compiled.

How are things? Is this for a new update for Malevolence TSOA?

CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 2nd Aug 2015 07:48
It is! The new procedural magic system. One of the most complex pieces of code I've ever written!


CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 2nd Aug 2015 07:48
So you can imagine my horror when it wouldn't compile hahahha


Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Aug 2015 13:56
Quote: "It is! The new procedural magic system. One of the most complex pieces of code I've ever written!"


Sounds great. I'm glad Chris got that sorted for you.

@Chris Tate

Do you know whether the problem is number of functions or nesting level of functions or some awkward combination of the two?



Powered by Free Banners
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 2nd Aug 2015 15:17 Edited at: 2nd Aug 2015 15:21
Edited;

Quote: "Do you know whether the problem is number of functions or nesting level of functions or some awkward combination of the two?"


Unfortunately I cannot say... The compiler problem error occurs at different function counts and complexities. The danger arises even with no code in each function; but that does not mean that packing more code into less functions makes much difference, because the error will still occur but with a more constrained limit. In one project the error occured with approximately 2,000 functions, and in another project with more complex functions, the limit was approximately 1,800.

The problem takes place just after the compile process finishes, during the linking phase completes; that may be a good clue for anyone familiar with the compiler source code.

Quote: "The new procedural magic system. One of the most complex pieces of code I've ever written!"


Sounds like a nice game mechanic; I'll keep posted to see how it works in the game.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Aug 2015 16:04
Thanks for the explanation.

Fortunately none of my projects are anywhere near that level of complexity so I haven't encountered it. But I'll try to bear this issue in mind when the time comes.



Powered by Free Banners
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 3rd Aug 2015 03:45
Yeah I've learned my lesson haha no more insanely complex projects!


Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 3rd Aug 2015 13:56
Well, on a positive note; every tool has its limitation, as wierd as this limitation is, the benefits still outway the limits in terms of fast DirectX 9 application development.

Something useful for learners and perhaps some experienced office programmers entering into game development is how useful database management systems (MySQL, MsSQL, MsAccess, etc) are at handling the majority of your game's persistent data.

Anything related to 'saving something and storing it somewhere' has the potential to be handled by the DMS; reducing the complexity of the DBP/AGK backend or client program and speeding up any development related to saving game sessions or content. So if you have lots of player session files or storyline entities being managed by the DBP/AGK client for example; that is a good place to start making use of a database which can manage such things far more easily.

Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 3rd Aug 2015 19:20
agreed. Duffer's sqlite3 plug in is really fantastic for this as well. it has become an integral part of my dbpro workflow.

Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 5th Aug 2015 22:20
Thanks for the advice, I will play around with SQLite3 sometime soon after a number of weeks organizing a number of processes.

SamKM
14
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 24th Sep 2015 05:07
Sorry to bring this old thread back, and apologies for the blatant self-promotion, but I spent some time working on a system for precompiling DBPro functions, which I posted over here: http://forum.thegamecreators.com/?m=forum_view&t=215476&b=6&p=0
This should get around the weird DBPro function cap problem, as well as massively speeding up compile times - hope it's useful

The code never bothered me anyway...
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 7th Oct 2015 17:10
Oh man, SamKM, I'm gonna give this a try, and if it works, I will find you, and I will personally kiss you right on the freaking mouth.

5 years into this project and I'm hitting this compiler limitation... I've had a kickstarter happen for it, I've built a fan-base, and now I can't finish the project? Holy hell have I been panicking... I'll try this out tomorrow (it's 2am here and I'm literally losing sleep over this) and I'll let you know how it goes!

Login to post a reply

Server time is: 2024-03-29 10:34:57
Your offset time is: 2024-03-29 10:34:57