Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.samskivert.mustache.MustacheException$Context: No method or field with name 'env' on line 1 #509

Open
selimanac opened this issue Oct 12, 2024 · 3 comments

Comments

@selimanac
Copy link

selimanac commented Oct 12, 2024

Using devbranch.

I have modified macos.env for latest SDKs and removed old SDK definitions(I don't have them, I don't want to keep them):

IOS_18_VERSION=18.0
SWIFT_6_0_VERSION=6.0
IOS_VERSION_MIN=11.0
MACOS_VERSION_MIN=10.13
XCODE_16_VERSION=16.0
XCODE_16_CLANG_VERSION=16.0.0
MACOS_15_VERSION=15.0
IOS_18_VERSION=18.0

Also modified setup-standalone-env.sh to fit the macos.env.

   PACKAGES=(  
        iPhoneOS${IOS_18_VERSION}.sdk
        iPhoneSimulator${IOS_18_VERSION}.sdk
        MacOSX${MACOS_15_VERSION}.sdk
        XcodeDefault${XCODE_16_VERSION}.xctoolchain.darwin
    )

When I build from Editor:

env.XCODE_15_VERSION hard coded somewhere and I can't find/change it:

2024-10-12 09:47:22.984 -ERROR 4245 --- [-job4973590761860375510] com.defold.extender.TemplateExecutor     : Failed to substitute string '{{env.PLATFORMSDK_DIR}}/XcodeDefault{{env.XCODE_15_VERSION}}.xctoolchain/usr/bin:{{env.PATH}}'

Result:

2024-10-12 09:27:55.999 -ERROR 4245 --- [job10165703415348125728] com.defold.extender.AsyncBuilder         : Exception while building or sending response - SDK: 26a67f784dcb76ab21f9059f9d144d4b548decd6

com.samskivert.mustache.MustacheException$Context: No method or field with name 'env' on line 1
	at com.samskivert.mustache.Template.checkForMissing(Template.java:370)
	at com.samskivert.mustache.Template.getValue(Template.java:273)
	at com.samskivert.mustache.Template.getCompoundValue(Template.java:286)
	at com.samskivert.mustache.Template.getValue(Template.java:270)
	at com.samskivert.mustache.Template.getValueOrDefault(Template.java:318)
	at com.samskivert.mustache.Mustache$VariableSegment.execute(Mustache.java:1313)
	at com.samskivert.mustache.Template.executeSegs(Template.java:196)
	at com.samskivert.mustache.Template.execute(Template.java:139)
	at com.samskivert.mustache.Template.execute(Template.java:130)
	at com.defold.extender.TemplateExecutor.execute(TemplateExecutor.java:18)
	at com.defold.extender.Extender.<init>(Extender.java:268)
	at com.defold.extender.Extender.<init>(Extender.java:297)
	at com.defold.extender.AsyncBuilder.asyncBuildEngine(AsyncBuilder.java:102)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:355)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:113)
	at io.micrometer.context.ContextSnapshot.lambda$wrap$1(ContextSnapshot.java:106)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
	

I'm not sure if I did something wrong or not, but it used to be a relatively easy process to use the latest SDKs on local environment for testing. Those hardcoded version definitions seem problematic to me.

Log:
stdout.log.zip

@selimanac
Copy link
Author

selimanac commented Oct 12, 2024

When I keep the definitions same at macos.env

SWIFT_5_5_VERSION=6.0
IOS_VERSION_MIN=11.0
MACOS_VERSION_MIN=10.13
XCODE_15_VERSION=16.0
XCODE_15_CLANG_VERSION=16.0.0
MACOS_14_VERSION=15.0
IOS_17_VERSION=18.0

I got crash:

Thread 0 Crashed:: engine_main Dispatch queue: com.apple.main-thread
0   dmengine                      	       0x1005518b8 lj_tab_getinth + 40
1   dmengine                      	       0x10054b5bc lj_ff_ipairs_aux + 108
2   dmengine                      	       0x100562790 lua_pcall + 148
3   dmengine                      	       0x100527668 dmRender::RunScript(dmRender::RenderScriptInstance*, dmRender::RenderScriptFunction, void*) + 452 (render_script.cpp:3386)
4   dmengine                      	       0x10042eb74 dmEngine::Init(dmEngine::Engine*, int, char**) + 7648 (engine.cpp:1353)
5   dmengine                      	       0x10042fcc4 dmEngineCreate(int, char**) + 172 (engine.cpp:2243)
6   dmengine                      	       0x10043091c dmEngine::RunLoop(dmEngine::RunLoopParams const*) + 84 (engine_loop.cpp:68)
7   dmengine                      	       0x1004307ec EngineMain(int, char**) + 80 (engine_main.cpp:55) [inlined]
8   dmengine                      	       0x1004307ec engine_main(int, char**) + 104 (engine_main.cpp:151)
9   dyld                          	       0x193a0f154 start + 2476

extender log:
stdout.log.zip

Engine:

_crash.zip

This might be related to Xcode 16, and I know it's not yet supported. I'm just sharing this for further investigation if necessary(You'll eventually move to version 16.).

@selimanac
Copy link
Author

selimanac commented Oct 12, 2024

This might be related to Xcode 16, and I know it's not yet supported. I'm just sharing this for further investigation if necessary(You'll eventually move to version 16.).

Builds without a problem using 15.4.

SWIFT_5_5_VERSION=5.5
IOS_VERSION_MIN=11.0
MACOS_VERSION_MIN=10.13
XCODE_15_VERSION=15.4
XCODE_15_CLANG_VERSION=15.0.0
MACOS_14_VERSION=14.5
IOS_17_VERSION=17.5

@JCash
Copy link
Contributor

JCash commented Oct 12, 2024

The build_input.yml in our engine uses specific version numbers, as that's what they're tested with.
To change that you have to update defold, and build the engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants