We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Exportation error
Pages: 1 2 
Exportation error (Read 2593 times)
Exportation error
Jan 13th, 2010, 12:29pm
 
Hello,

I have a problem with one of my programs : it works well when I run it from Processing, but I not when I export it ( for Windows/MacOS/Linux ) : the .exe ( or else )  file does nothing, my window is empty. At the beginning, it worked fine, I added some classes and functions ... and now nothing works.
My program uses OpenGL and Minim Audio, and all my sound and picture files are in the data folder. I tried to export it from Vista 32bits, from MacOS, and from ubuntu ... same result.

Processing 1.0.9

I hope you understand me, I don't speak fluently english
Re: Exportation error
Reply #1 - Jan 13th, 2010, 2:02pm
 
Posting some code might help
A basic skeleton of the sketch, even better or the whole thing:)
If it's too large than you can zip it and upload it somewhere for us to download and test.
Re: Exportation error
Reply #2 - Jan 14th, 2010, 5:30am
 
OK, but the code is quite long, maybe "dirty", and notes and some variables are in French.

I can't upload my sketch, I need to post at least 5 messages ... so here are just the setup() and draw() :

Edit : I put the entire sketch in my next reply.



If someone finds where the problem is, please tell me.

Thanks
Re: Exportation error
Reply #3 - Jan 15th, 2010, 3:45pm
 
3rd post ...
Re: Exportation error
Reply #4 - Jan 15th, 2010, 3:46pm
 
4th post ...
Re: Exportation error
Reply #5 - Jan 15th, 2010, 3:46pm
 
5th post ...
Re: Exportation error
Reply #6 - Jan 15th, 2010, 3:52pm
 
Sorry for "cheating" with the topic, but really need help. So here is the entire sketch: -> Here
The zip password is "wolf".

If someone reaches to make it works, or find where does it go wrong, please tell me.

P.S : the music is from free of rights ( from the band of a friend of mine ).
Re: Exportation error
Reply #7 - Jan 20th, 2010, 9:30am
 
Nobody, just to try it ?
Re: Exportation error
Reply #8 - Jan 20th, 2010, 3:25pm
 
Well, you have put some obstacles... the zip with password, the comments and identifiers in French... (PS.: your English is good, don't worry about it.)

Nice interface, good music. Smiley
I noticed the problem on second run: I get an array out of bounds on the line:
lect.setSong(audio.loadFile(lect.playlist[lect.getNbPisteCourante()], 2048));
First: you should check there is at least one item in the list.
Second: it shows you write back to this file.
But when exported, the files in the data folder will be integrated in the exe or jar (IIRC), which make them hard to write back...
You should leave the list in the sketch folder, you can then access it by using:
lect.playlist = loadStrings(sketchPath("list.txt"));
(and similar on save).
Re: Exportation error
Reply #9 - Jan 21st, 2010, 11:38am
 
Thanks for the answer. I've tried everything you told me ... always the same result ...
Re: Exportation error
Reply #10 - Jan 21st, 2010, 12:39pm
 
More precisely, what have you tried?
I just exported the application, changed to use lect.playlist = loadStrings(sketchPath("list.txt")); (should do the same on save). I copied manually list.txt to application.windows, and double-clicked on Equalizer.exe. I got the music running OK.
Re: Exportation error
Reply #11 - Jan 21st, 2010, 5:54pm
 
I changed the following lines :

Equalizer.pde, line 45 :
Code:
lect.playlist = loadStrings(sketchPath("list.txt")); 



Ft_Evenements.pde, line 138 :
Code:
file = createWriter(sketchPath("list.txt")); 



Ft_Evenements.pde, line 154 :
Code:
file = createWriter(sketchPath("list.txt"));   



Then I copied list.txt to the application.windows directory ... still the same. Did I forget something ?

Is everything running for you with the .exe file ? Music and 3D ?

Thanks for your interest
Re: Exportation error
Reply #12 - Jan 22nd, 2010, 4:53am
 
Well, I just made the first step (but the others are necessary as well) on your code taken out of the zip file, exported the app, copied the file. And I got it fully running. On French Wink Windows XP Pro SP3, Java 1.6.0_17, Processing 1.0.5 (lagging a bit behind...).
Re: Exportation error
Reply #13 - Jan 22nd, 2010, 8:26am
 
I really don't understand ... could you send me the sketch with the application.windows please ? It would be great. By link or by mail :
e-mail : arkeen00[at]gmail.com ( replacing [at] by @ ).

Thanks
Re: Exportation error
Reply #14 - Jan 22nd, 2010, 1:01pm
 
Uploaded to pastebin.ca: http://filebin.ca/ryegeh/Equalizer.7z (compressed with 7-Zip).
Pages: 1 2