Same Source Code Won't Work In Different Pc's

We have a few Corona installations - four PC’s and one Mac. All have the same Corona SDK (2012.971). I use exactly the same source codes in all computers.

  1. In one PC the Corona projects works fine.
  2. In one PC, I can’t even run the application. I get an error message (it about the few files in documents directory).
  3. In Mac, the app runs in simulator, but I can’t click anything. No error messages in debugger though.
  4. In two PCs, the project runs, but one sprite sheet is changed to black (or white) rectangle.

Any ideas?

What does the Console say on the Mac. (find it via Spotlight).

Maybe its a path problem. You either need to post some code or comment out blocks of code till you found the cause. 

Thanks Jack! I’ll check the mac later.

But…

I noticed that in one Windows 7 (Home premium), I get an error when code tries to access to documents directory. I tried also with FileDemo-sample project. I get an error message:

Creating file... Runtime error ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: attempt to index local 'file' (a nil value) stack traceback: [C]: ? ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: in main chunk Runtime error: ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: attempt to index local 'file' (a nil value) stack traceback: [C]: ? ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: in main chunk

Tried to re-install Corona, but it wasn’t the answer. Other sample projects work fine.
 

What is line 74 of main.lua?

The project is one of the sample projects (FileDemo). Code on line 74 is:     file:write( “Feed me data!\n” )

But I think, it’s not the code. It’s something else. My first problem was, that the project that worked fine in another (Windows 7) Corona, wasn’t working in one Windows. The error message was about files in documents directory, but 'cause everything worked fine in different installation, I really didn’t know what to do. So I tried to run FileDemo-sample project and see if it would have worked fine. But it also crashed. I think it must be something to do with Corona SDK and Windows.

You can see error message of FileDemo-project in my previous message. Here is the error message of my project: 

Runtime error e:\temp\sammakkopeli\_toimiva\map.lua:39: attempt to index local 'file' (a nil value) stack traceback: [C]: ? e:\temp\sammakkopeli\_toimiva\map.lua:39: in function \<e:\temp\sammakkopeli\_toimiva\map.lua:18\> ?: in function 'dispatchEvent' ?Runtime error: e:\temp\sammakkopeli\_toimiva\map.lua:39: attempt to index local 'file' (a nil value) stack traceback: [C]: ? e:\temp\sammakkopeli\_toimiva\map.lua:39: in function \<e:\temp\sammakkopeli\_toimiva\map.lua:18\> ?: in function 'dispatchEvent' ?: in function '

I finally found the answer. I had a new pre-installed Windows 7 and the user name was “käyttäjä”. Obviously Corona can’t handle scandinavian letters. So simple mistake, but quite hard to find, 'cause all you do, is stare at the code and SDK :wink: Hopefully this helps someone else.

Still I haven’t figured out, why project doesn’t work in Mac…

What does the Console say on the Mac. (find it via Spotlight).

Maybe its a path problem. You either need to post some code or comment out blocks of code till you found the cause. 

Thanks Jack! I’ll check the mac later.

But…

I noticed that in one Windows 7 (Home premium), I get an error when code tries to access to documents directory. I tried also with FileDemo-sample project. I get an error message:

Creating file... Runtime error ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: attempt to index local 'file' (a nil value) stack traceback: [C]: ? ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: in main chunk Runtime error: ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: attempt to index local 'file' (a nil value) stack traceback: [C]: ? ...abs\corona sdk\sample code\storage\filedemo\main.lua:74: in main chunk

Tried to re-install Corona, but it wasn’t the answer. Other sample projects work fine.
 

What is line 74 of main.lua?

The project is one of the sample projects (FileDemo). Code on line 74 is:     file:write( “Feed me data!\n” )

But I think, it’s not the code. It’s something else. My first problem was, that the project that worked fine in another (Windows 7) Corona, wasn’t working in one Windows. The error message was about files in documents directory, but 'cause everything worked fine in different installation, I really didn’t know what to do. So I tried to run FileDemo-sample project and see if it would have worked fine. But it also crashed. I think it must be something to do with Corona SDK and Windows.

You can see error message of FileDemo-project in my previous message. Here is the error message of my project: 

Runtime error e:\temp\sammakkopeli\_toimiva\map.lua:39: attempt to index local 'file' (a nil value) stack traceback: [C]: ? e:\temp\sammakkopeli\_toimiva\map.lua:39: in function \<e:\temp\sammakkopeli\_toimiva\map.lua:18\> ?: in function 'dispatchEvent' ?Runtime error: e:\temp\sammakkopeli\_toimiva\map.lua:39: attempt to index local 'file' (a nil value) stack traceback: [C]: ? e:\temp\sammakkopeli\_toimiva\map.lua:39: in function \<e:\temp\sammakkopeli\_toimiva\map.lua:18\> ?: in function 'dispatchEvent' ?: in function '

I finally found the answer. I had a new pre-installed Windows 7 and the user name was “käyttäjä”. Obviously Corona can’t handle scandinavian letters. So simple mistake, but quite hard to find, 'cause all you do, is stare at the code and SDK :wink: Hopefully this helps someone else.

Still I haven’t figured out, why project doesn’t work in Mac…