Physics Problem

I have a problem with physics module. Can somebody help me, please?

Here is the Trace:

>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: main.lua:1: module ‘physics’ not found:
no field package.preload[‘physics’]
no file ‘.\physics.lua’
no file ‘D:\PF\Lua\5.1\lua\physics.lua’
no file ‘D:\PF\Lua\5.1\lua\physics\init.lua’
no file ‘D:\PF\Lua\5.1\physics.lua’
no file ‘D:\PF\Lua\5.1\physics\init.lua’
no file ‘D:\PF\Lua\5.1\lua\physics.luac’
no file ‘.\physics.dll’
no file ‘.\physics51.dll’
no file ‘D:\PF\Lua\5.1\physics.dll’
no file ‘D:\PF\Lua\5.1\physics51.dll’
no file ‘D:\PF\Lua\5.1\clibs\physics.dll’
no file ‘D:\PF\Lua\5.1\clibs\physics51.dll’
no file ‘D:\PF\Lua\5.1\loadall.dll’
no file ‘D:\PF\Lua\5.1\clibs\loadall.dll’
stack traceback:
[C]: in function ‘require’
main.lua:1: in main chunk
[C]: ?
>Exit code: 1
>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: error loading module ‘physics’ from file ‘D:\PF\Lua\5.1\physics.dll’:
%1 não é um aplicativo Win32 válido.
stack traceback:
[C]: ?
[C]: in function ‘require’
main.lua:1: in main chunk
[C]: ?
>Exit code: 1
>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: error loading module ‘physics’ from file ‘D:\PF\Lua\5.1\physics.dll’:
%1 não é um aplicativo Win32 válido.
stack traceback:
[C]: ?
[C]: in function ‘require’
main.lua:1: in main chunk
[C]: ?
>Exit code: 1
>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: error loading module ‘physics’ from file ‘D:\PF\Lua\5.1\physics.dll’:
%1 não é um aplicativo Win32 válido.
stack traceback:
[C]: ?
[C]: in function ‘require’
main.lua:1: in main chunk
[C]: ?
>Exit code: 1
[import]uid: 180674 topic_id: 36231 reply_id: 336231[/import]

Did you
“local physics = require (“physics”)” at the top? [import]uid: 75779 topic_id: 36231 reply_id: 143903[/import]

I’ve moved this to the developer forum since it’s not UI based and removed the duplicate post. [import]uid: 199310 topic_id: 36231 reply_id: 143908[/import]

Yes.
[import]uid: 180674 topic_id: 36231 reply_id: 143981[/import]

Hello,
Is there any conflicting file or folder named “physics” in your project directory, or another variable named “physics” in your main.lua? Did you arrange subdirectories or anything?

Which version of Corona are you running, and which version of Windows?

Brent [import]uid: 200026 topic_id: 36231 reply_id: 143997[/import]

Hi @guitrompa1,
Does the same crash occur if you use the correct library name “physics” instead of substituting “fisica”? [import]uid: 200026 topic_id: 36231 reply_id: 144148[/import]

Yes. I’ve written my lua codes like this:

local physics = require("physics");  
  
physics.start();  
...  

About the software versions:

  • Windows 7 Ultimate, 32-bits, Intel Pentium 5 x86 Processor (saddly, it’s not a iMac)

  • Corona SDK (simulator.version(12.0.971.0))

  • JDK 7, ('Cause this, I can’t build apps for Android, to do this, you need to install JDK 6, I don’t know why!)

Now, knowin’ this, I code this way:

local fisica = require("physics")  
fisica.start()  
...  

And now the trace has changed:

>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: main.lua:3: attempt to index local ‘fisica’ (a boolean value)
stack traceback:
main.lua:3: in main chunk
[C]: ?
>Exit code: 1
[import]uid: 180674 topic_id: 36231 reply_id: 144029[/import]

Yeah, as I wrote before:

"And now the trace has changed:

>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: main.lua:3: attempt to index local ‘fisica’ (a boolean value)
stack traceback:
main.lua:3: in main chunk
[C]: ?
>Exit code: 1"

Take a look in post #5. [import]uid: 180674 topic_id: 36231 reply_id: 144167[/import]

If you are still using “fisica” in any place, please change it to the correct library name in every case: “physics”. Also, make sure that you do not use “physics” as the name of any other variable or function -except- for the physics library. If you still get the error, please try to re-install Corona and report if the issue remains after.

Finally, you must use JDK6, as JDK7 is not supported… this should not be causing the issue with the physics library call, but it’s important that you don’t use JDK7.

Thanks,
Brent [import]uid: 200026 topic_id: 36231 reply_id: 144181[/import]

Did you
“local physics = require (“physics”)” at the top? [import]uid: 75779 topic_id: 36231 reply_id: 143903[/import]

I’ve moved this to the developer forum since it’s not UI based and removed the duplicate post. [import]uid: 199310 topic_id: 36231 reply_id: 143908[/import]

Yes.
[import]uid: 180674 topic_id: 36231 reply_id: 143981[/import]

Hello,
Is there any conflicting file or folder named “physics” in your project directory, or another variable named “physics” in your main.lua? Did you arrange subdirectories or anything?

Which version of Corona are you running, and which version of Windows?

Brent [import]uid: 200026 topic_id: 36231 reply_id: 143997[/import]

Hi @guitrompa1,
Does the same crash occur if you use the correct library name “physics” instead of substituting “fisica”? [import]uid: 200026 topic_id: 36231 reply_id: 144148[/import]

Yes. I’ve written my lua codes like this:

local physics = require("physics");  
  
physics.start();  
...  

About the software versions:

  • Windows 7 Ultimate, 32-bits, Intel Pentium 5 x86 Processor (saddly, it’s not a iMac)

  • Corona SDK (simulator.version(12.0.971.0))

  • JDK 7, ('Cause this, I can’t build apps for Android, to do this, you need to install JDK 6, I don’t know why!)

Now, knowin’ this, I code this way:

local fisica = require("physics")  
fisica.start()  
...  

And now the trace has changed:

>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: main.lua:3: attempt to index local ‘fisica’ (a boolean value)
stack traceback:
main.lua:3: in main chunk
[C]: ?
>Exit code: 1
[import]uid: 180674 topic_id: 36231 reply_id: 144029[/import]

Yeah, as I wrote before:

"And now the trace has changed:

>lua -e “io.stdout:setvbuf ‘no’” “main.lua”
lua: main.lua:3: attempt to index local ‘fisica’ (a boolean value)
stack traceback:
main.lua:3: in main chunk
[C]: ?
>Exit code: 1"

Take a look in post #5. [import]uid: 180674 topic_id: 36231 reply_id: 144167[/import]

If you are still using “fisica” in any place, please change it to the correct library name in every case: “physics”. Also, make sure that you do not use “physics” as the name of any other variable or function -except- for the physics library. If you still get the error, please try to re-install Corona and report if the issue remains after.

Finally, you must use JDK6, as JDK7 is not supported… this should not be causing the issue with the physics library call, but it’s important that you don’t use JDK7.

Thanks,
Brent [import]uid: 200026 topic_id: 36231 reply_id: 144181[/import]

Did you
“local physics = require (“physics”)” at the top? [import]uid: 75779 topic_id: 36231 reply_id: 143903[/import]

I’ve moved this to the developer forum since it’s not UI based and removed the duplicate post. [import]uid: 199310 topic_id: 36231 reply_id: 143908[/import]

Yes.
[import]uid: 180674 topic_id: 36231 reply_id: 143981[/import]