{"action":"opened","issue":{"url":"https://api.github.com/repos/symengine/SymEngine.jl/issues/143","repository_url":"https://api.github.com/repos/symengine/SymEngine.jl","labels_url":"https://api.github.com/repos/symengine/SymEngine.jl/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/symengine/SymEngine.jl/issues/143/comments","events_url":"https://api.github.com/repos/symengine/SymEngine.jl/issues/143/events","html_url":"https://github.com/symengine/SymEngine.jl/issues/143","id":360642145,"node_id":"MDU6SXNzdWUzNjA2NDIxNDU=","number":143,"title":"Error when using SymEngine in a module and using this module","user":{"login":"SabbahMohammed","id":43266434,"node_id":"MDQ6VXNlcjQzMjY2NDM0","avatar_url":"https://avatars3.githubusercontent.com/u/43266434?v=4","gravatar_id":"","url":"https://api.github.com/users/SabbahMohammed","html_url":"https://github.com/SabbahMohammed","followers_url":"https://api.github.com/users/SabbahMohammed/followers","following_url":"https://api.github.com/users/SabbahMohammed/following{/other_user}","gists_url":"https://api.github.com/users/SabbahMohammed/gists{/gist_id}","starred_url":"https://api.github.com/users/SabbahMohammed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SabbahMohammed/subscriptions","organizations_url":"https://api.github.com/users/SabbahMohammed/orgs","repos_url":"https://api.github.com/users/SabbahMohammed/repos","events_url":"https://api.github.com/users/SabbahMohammed/events{/privacy}","received_events_url":"https://api.github.com/users/SabbahMohammed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-16T13:59:37Z","updated_at":"2018-09-16T13:59:37Z","closed_at":null,"author_association":"NONE","body":"`module MyDispersion\r\n\r\nexport lbeta2, wbeta2, beta0\r\n\r\nusing SymEngine\r\n\r\nc = 3e8\r\n# constants for N2\r\nb_1 = 39209.95*10^-8.0\r\nb_2 = 18806.48*10^-8.0\r\nc_1 = 1146.24*10^-6.0*10^-12.0/(4*pi^2*c^2)\r\nc_2 = 13.476*10^-3.0*10^-12.0/(4*pi^2*c^2)\r\n#\r\np_0 = 1\r\nTk_0 = 273\r\nu = 2.40482555769577 #http://wwwal.kuicr.kyoto-u.ac.jp/www/accelerator/a4/besselroot.html\r\n\r\nx = symbols(:x)\r\n# x is ω\r\nfunction beta0(x::Basic, p::Float64, Tk::Float64, a::Float64)\r\n    return x/c + 0.5*x*p*Tk_0*(b_1/(1-c_1*x^2) + b_2/(1-c_2*x^2))/(c*p_0*Tk) - .5*u^2*c/(a^2*x)\r\nend\r\n\r\nfunction beta1(x::Basic, p::Float64, Tk::Float64, a::Float64)\r\n    return diff(beta0(x, p, Tk, a), x)\r\nend\r\n\r\nfunction beta2(x::Basic, p::Float64, Tk::Float64, a::Float64)\r\n    return diff(beta1(x, p, Tk, a), x)\r\nend\r\n\r\nfunction wbeta2(ω::Float64, p::Float64, Tk::Float64, a::Float64)\r\n    y = beta2(x, p, Tk, a)\r\n    return Float64(subs(y, x=>ω))\r\nend\r\n\r\nfunction lbeta2(λ::Float64, p::Float64, Tk::Float64, a::Float64)\r\n    ω = (2pi*c)/λ\r\n    y = beta2(x, p, Tk, a)\r\n    return Float64(subs(y, (x,ω)))\r\nend\r\nend\r\n`\r\nwhen I use the same code outside any module it works without issues, but when I use MyDispersion module I got the following error:\r\n\r\n`Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.\r\nException: EXCEPTION_ACCESS_VIOLATION at 0x2f1ae6eb -- _ZN9SymEngine3mulERKNS_3RCPIKNS_5BasicEEES5_ at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\SymEngine\\sh7Yz\\deps\\symengine-0.3\\bin\\libsymengine.dll (unknown line)\r\nin expression starting at no file:0\r\nPlease submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.\r\nException: EXCEPTION_ACCESS_VIOLATION at 0x2f1ae6eb -- _ZN9SymEngine3mulERKNS_3RCPIKNS_5BasicEEES5_ at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\SymEngine\\sh7Yz\\deps\\symengine-0.3\\bin\\libsymengine.dll (unknown line)\r\nin expression starting at no file:0\r\n_ZN9SymEngine3mulERKNS_3RCPIKNS_5BasicEEES5_ at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\SymEngine\\sh7Yz\\deps\\symengine-0.3\\bin\\libsymengine.dll (unknown line)\r\n_ZN9SymEngine3divERKNS_3RCPIKNS_5BasicEEES5_ at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\SymEngine\\sh7Yz\\deps\\symengine-0.3\\bin\\libsymengine.dll (unknown line)\r\nbasic_div at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\SymEngine\\sh7Yz\\deps\\symengine-0.3\\bin\\libsymengine.dll (unknown line)\r\n/ at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\SymEngine\\sh7Yz\\src\\mathops.jl:16\r\n/ at .\\promotion.jl:316\r\nunknown function (ip: 00000000155FD50F)\r\njl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:1829\r\njl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:2182\r\nbeta0 at C:\\Users\\Mohammed Sabbah\\OneDrive - Heriot-Watt University\\programming\\julia\\MyDispersion\\MyDispersion.jl:51\r\nbeta1 at C:\\Users\\Mohammed Sabbah\\OneDrive - Heriot-Watt University\\programming\\julia\\MyDispersion\\MyDispersion.jl:55\r\nbeta2 at C:\\Users\\Mohammed Sabbah\\OneDrive - Heriot-Watt University\\programming\\julia\\MyDispersion\\MyDispersion.jl:59\r\nwbeta2 at C:\\Users\\Mohammed Sabbah\\OneDrive - Heriot-Watt University\\programming\\julia\\MyDispersion\\MyDispersion.jl:63\r\nxx at C:\\Users\\Mohammed Sabbah\\OneDrive - Heriot-Watt University\\programming\\julia\\test.jl:57\r\nunknown function (ip: 00000000155FBE7B)\r\njl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:1829\r\njl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:2182\r\ndo_call at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:324\r\neval_value at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:428\r\neval_stmt_value at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:363 [inlined]\r\neval_body at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:682\r\njl_interpret_toplevel_thunk_callback at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:799\r\nunknown function (ip: FFFFFFFFFFFFFFFE)\r\nunknown function (ip: 000000000EF6658F)\r\nunknown function (ip: FFFFFFFFFFFFFFFF)\r\njl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\\toplevel.c:787\r\njl_toplevel_eval_in at /home/Administrator/buildbot/worker/package_win64/build/src\\builtins.c:622\r\neval at .\\boot.jl:319 [inlined]\r\nrepleval at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\Atom\\WSz3k\\src\\repl.jl:130\r\njl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:1829\r\njl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:2182\r\n#160 at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\Atom\\WSz3k\\src\\repl.jl:149\r\nwith_logstate at .\\logging.jl:397\r\nwith_logger at .\\logging.jl:493 [inlined]\r\nevalrepl at C:\\Users\\Mohammed Sabbah\\.julia\\packages\\Atom\\WSz3k\\src\\repl.jl:140\r\njl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:1829\r\njl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:2182\r\ndo_call at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:324\r\neval_value at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:428\r\neval_stmt_value at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:363 [inlined]\r\neval_body at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:682\r\njl_interpret_toplevel_thunk_callback at /home/Administrator/buildbot/worker/package_win64/build/src\\interpreter.c:799\r\nunknown function (ip: FFFFFFFFFFFFFFFE)\r\nunknown function (ip: 000000000F2090EF)\r\nunknown function (ip: FFFFFFFFFFFFFFFF)\r\njl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\\toplevel.c:787\r\njl_toplevel_eval_in at /home/Administrator/buildbot/worker/package_win64/build/src\\builtins.c:622\r\neval at .\\boot.jl:319\r\njl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:2182\r\neval_user_input at C:\\cygwin\\home\\Administrator\\buildbot\\worker\\package_win64\\build\\usr\\share\\julia\\stdlib\\v1.0\\REPL\\src\\REPL.jl:85\r\nmacro expansion at C:\\cygwin\\home\\Administrator\\buildbot\\worker\\package_win64\\build\\usr\\share\\julia\\stdlib\\v1.0\\REPL\\src\\REPL.jl:117 [inlined]\r\n#28 at .\\task.jl:259\r\njl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:1829\r\njl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\\gf.c:2182\r\njl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\\julia.h:1536 [inlined]\r\nstart_task at /home/Administrator/buildbot/worker/package_win64/build/src\\task.c:268\r\nAllocations: 40912887 (Pool: 40906834; Big: 6053); GC: 89\r\n`"}}
{"actor":{"display_login":"SabbahMohammed"}}