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

Julia Crashed in Execution of Generated Symbolic Function. #529

Closed
MiladRoboticist opened this issue Jan 21, 2025 · 6 comments
Closed

Julia Crashed in Execution of Generated Symbolic Function. #529

MiladRoboticist opened this issue Jan 21, 2025 · 6 comments

Comments

@MiladRoboticist
Copy link

MiladRoboticist commented Jan 21, 2025

I generated this function and try to execute it:

const Kin = include("KinFuncComplete2.jl")

using Symbolics
using NaNMath
T = zeros(4,4)
TE1_diff_1 = zeros(4,4)
TE1_diff_2 = zeros(4,4)
TE1_diff_3 = zeros(4,4)
p1_int = zeros(3,)
p1_p1_transpose_int = zeros(3,3)
p1_diff_1_int = zeros(3,)
p1_diff_2_int = zeros(3,)
p1_diff_3_int = zeros(3,)
p1_p1_diff_1_t_int = zeros(3,3)
p1_p1_diff_2_t_int = zeros(3,3)
p1_p1_diff_3_t_int = zeros(3,3)

output = [T,TE1_diff_1,TE1_diff_2,TE1_diff_3,p1_int, p1_p1_transpose_int, p1_diff_1_int, p1_diff_2_int, p1_diff_3_int, p1_p1_diff_1_t_int, p1_p1_diff_2_t_int, p1_p1_diff_3_t_int]
q = [0.06,0.00,0.02]
r = 24e-3
xi = 1
L0 = 0.15
input = [q, r, xi, L0]

Kin(output, input)

println("output: ", output)
println("p1_int: ", p1_int)

I get the following error: please see the attached txt.

JuliaError.txt

@MiladRoboticist MiladRoboticist changed the title Julia Crashed Julia Crashed in Execution of Generated Symbolic Function. Jan 21, 2025
@pfitzseb
Copy link
Member

This is essentially #368.

@MiladRoboticist
Copy link
Author

Thank you for your response. I read through the posts, and I believe my issue is similar. I generated the KinFuncComplete2.jl file using Symbolics.build_function, resulting in a very large function. However, I’m unsure if this issue has been resolved or if there’s a workaround I could use to fix it. Could you please clarify?

@c42f
Copy link
Member

c42f commented Jan 23, 2025

The workaround is to ignore the message and let the old flisp parser be used which is still available as a fallback (did your code work? It should have worked regardless of this big ugly message :) )

You can also set the environment variable JULIA_USE_FLISP_PARSER=true before launching julia.

@c42f c42f closed this as completed Jan 23, 2025
@c42f
Copy link
Member

c42f commented Jan 23, 2025

For clarity - #368 is not resolved because it's quite a lot of work and I simply haven't have time. There is a proof of concept in #524 but it will very likely take several weeks of effort to make it into a full solution.

@MiladRoboticist
Copy link
Author

Thank you, Claire, for your message. After running the code and encountering the error, the REPL freezes, so I haven't been able to use the code yet.

To set the environment variable, I created a config folder in C:\Users\milad.julia\config and added a startup.jl file with the following line:
ENV["JULIA_USE_FLISP_PARSER"] = "true"
Is this the correct approach?

I am running the code with this setup, but I haven't seen any results yet.

@nsajko nsajko closed this as completed Jan 23, 2025
@nsajko
Copy link

nsajko commented Jan 23, 2025

did your code work? It should have worked regardless of this big ugly message

After running the code and encountering the error, the REPL freezes

I guess the stack overflow corrupted some state on stack.

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

4 participants