ID:1704068
 
Keywords: compile, compiler
BYOND Version:506
Operating System:Windows 7 Pro
Web Browser:Chrome 39.0.2171.13
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
So me and another person (byond version and OS unknown) can't compile the current version of the /vg/ SS13 code as of 22 Oct 2014.
Compilation fails with some abnormal output.

Numbered Steps to Reproduce Problem:
1. Attempt to compile the latest version of the /vg/ SS13 code, found here:
https://github.com/d3athrow/vgstation13/tree/Bleeding-Edge
Note bleeding-edge branch.

Expected Results:
Normal compilation, zero errors.

Actual Results:
loading baystation12.dme
loading interface\skin.dmf
code\modules\client\client procs.dm:42:error: 20: duplicate definition
code\modules\client\client procs.dm:42:error: 30: duplicate definition
code\modules\client\client procs.dm:42:error: to: instruction not allowed here
code\modules\client\client procs.dm:44:error: "priv_msg": value not allowed here

code\modules\client\client procs.dm:44:error: href_list: value not allowed here
code\modules\client\client procs.dm:44:error: : duplicate definition
code\modules\client\client procs.dm:53:error: config: duplicate definition
code\modules\client\client procs.dm:53:error: config.log_hrefs: duplicate definition
code\modules\client\client procs.dm:53:error: href_logfile: duplicate definition

code\modules\client\client procs.dm:53:error: &&: instruction not allowed here
code\modules\client\client procs.dm:53:error: : duplicate definition
code\modules\client\client procs.dm:45:error: href_list: undefined var
code\modules\client\client procs.dm:45:error: =: expected a constant expression
code\modules\client\client procs.dm:46:error: C: value not allowed here
code\modules\client\client procs.dm:46:error: : empty type name (indentation error?)
code\modules\client\client procs.dm:47:error: C: invalid variable
code\modules\client\client procs.dm:47:error: =: expected a constant expression
BUG: Unexpected condition in IsForwardReference(.651.1.2/=.0)
BUG: Unexpected condition in IsForwardReference(.651.1.2/=.1)
code\modules\client\client procs.dm:47:error: : empty type name (indentation error?)
code\modules\client\client procs.dm:49:error: cmd_admin_pm: undefined proc
code\modules\client\client procs.dm:50:error: return: instruction not allowed here
code\modules\client\client procs.dm:45:error: : duplicate definition
code\modules\client\client procs.dm:54:error: href_logfile: duplicate definition

code\modules\client\client procs.dm:54:error: world.timeofday: duplicate definition
code\modules\client\client procs.dm:54:error: "hh:mm": duplicate definition
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:54:error: src: value not allowed here
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:54:error: usr: value not allowed here
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:54:error: hsrc: duplicate definition
code\modules\client\client procs.dm:54:error: hsrc: value not allowed here
code\modules\client\client procs.dm:54:error: : empty type name (indentation error?)
code\modules\client\client procs.dm:54:error: text"[] ": value not allowed here
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:54:error: "": duplicate definition
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:54:error: href: value not allowed here
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:54:error: text"<small>[] [] (usr:[])</small> || [][]<br>": value not allowed here
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:54:error: <<: instruction not allowed here
code\modules\client\client procs.dm:54:error: : duplicate definition
code\modules\client\client procs.dm:56:error: "_src_": value not allowed here
code\modules\client\client procs.dm:56:error: href_list: value not allowed here
code\modules\client\client procs.dm:56:error: : empty type name (indentation error?)
code\modules\client\client procs.dm:57:error: "holder": duplicate definition
code\modules\client\client procs.dm:58:error: "usr": duplicate definition
code\modules\client\client procs.dm:59:error: "prefs": duplicate definition
code\modules\client\client procs.dm:60:error: "vars": duplicate definition
code\modules\client\client procs.dm:57:error: hsrc: undefined var
code\modules\client\client procs.dm:57:error: holder: undefined var
code\modules\client\client procs.dm:57:error: : duplicate definition
code\modules\client\client procs.dm:58:error: hsrc: undefined var
code\modules\client\client procs.dm:58:error: mob: undefined var
code\modules\client\client procs.dm:58:error: : duplicate definition
code\modules\client\client procs.dm:59:error: usr: duplicate definition
code\modules\client\client procs.dm:59:error: href_list: duplicate definition
code\modules\client\client procs.dm:59:error: prefs.process_link: instruction not allowed here
code\modules\client\client procs.dm:59:error: return: instruction not allowed here
code\modules\client\client procs.dm:59:error: : duplicate definition
code\modules\client\client procs.dm:60:error: href: duplicate definition
code\modules\client\client procs.dm:60:error: href_list: duplicate definition
code\modules\client\client procs.dm:60:error: hsrc: duplicate definition
code\modules\client\client procs.dm:60:error: view_var_Topic: instruction not allowed here
code\modules\client\client procs.dm:60:error: return: instruction not allowed here
code\modules\client\client procs.dm:60:error: : duplicate definition
code\modules\client\client procs.dm:57:error: : duplicate definition
code\modules\client\client procs.dm:44:error: : empty type name (indentation error?)
baystation12.dmb - 68 errors, 0 warnings


Note these 2 lines:
BUG: Unexpected condition in IsForwardReference(.651.1.2/=.0)
BUG: Unexpected condition in IsForwardReference(.651.1.2/=.1)


When does the problem NOT occur?
Others tested it and reported zero errors/warnings. They were all running BYOND 506.1247 and Windows 7 64.

Note that the errors reported have incorrect line numbers (mostly shifted down) and only loosely correspond to the actual client_procs.dm code, found here:
https://github.com/d3athrow/vgstation13/blob/Bleeding-Edge/ code/modules/client/client%20procs.dm
Also note that it was last changed on 4 Oct 2014, but this problem did not occur before 22 Oct 2014 (both myself and the other person compiled successfully many times in the past 2 weeks).

Workarounds:
Hopefully not "get a 64-bit OS".
A 64bit OS makes no difference, BYOND isn't 64bit.

This seems like more of a poor programming error than BYOND's issue..
I'm going to take a wild guess and say that this may be caused by text macros using #define. But I can take a look into it from github.

edit:
I compiled it just fine on my end. What may have happened is that one or more files were accidentally checked in the file tree on the left. Just a hunch.
A.T.H.K wrote:
A 64bit OS makes no difference, BYOND isn't 64bit.
This seems like more of a poor programming error than BYOND's issue..

I'm sure you have your assumptions about the skill of the average DM programmer, but please read the issue before contributing unhelpful comments in the future.

Mr_Goober wrote:
I compiled it just fine on my end. What may have happened is that one or more files were accidentally checked in the file tree on the left. Just a hunch.
The .dme is included in the repository, so this is not the issue (we're compiling with the same one).
What OS and BYOND version are you running?

I'll also go and test with 507.1262 and report back.
There's another issue someone reported not too long ago where too many procs caused something along these lines. Apparently there's still an issue with proc count limits in the compiler. I suspect that's all this is. Reducing the proc count would probably be the most helpful way to deal with this.
Updating to BYOND 507.1263 resolved the issue.
Still a bit of a mystery though, nothing in the changelog looks particularly relevant as far as I can tell.

Lummox JR wrote:
There's another issue someone reported not too long ago where too many procs caused something along these lines. Apparently there's still an issue with proc count limits in the compiler. I suspect that's all this is. Reducing the proc count would probably be the most helpful way to deal with this.
Something along these lines would explain why it showed up like this, since the affected codebase grows daily.


There are several ways to trim the proc count. Combining procs that basically do the same thing is a good one. Also, you'll want to be on the lookout for "init procs", which occur whenever you set something like a list at compile-time. Any of these constructs would initiate that:

var/items[0]
var/items = list(1,2,3)
var/items = newlist(/obj)
Looks like another person ran into this (note the compiler choked at roughly the same spot as the previous two, in the /code/modules/client folder).




And yeah the proc count can be trimmed, but it's not really necessary since the issue is fixable by updating.
Interesting to see why this is happening.