Csound Csound-dev Csound-tekno Search About

[Csnd] Re: 5.08 java and setLocale

Date2008-03-18 15:21
FromJean-Pierre Lemoine
Subject[Csnd] Re: 5.08 java and setLocale
Yes I am on Windows. I have done further testing and I think the situation is
bad for me. 

A simple java code compiles my reference csd file without errors. When I add
code for initializing OpenGL (using the LWGJL library), I have the error,
the csound api is not able to compile the csd file. 

Thus, the problem seems to be related to the coexsistence of two libraries
(using both native code by the way). This was not a problem with 5.07. I
don't know what is wrong, what can explain this. Here is the java code for
testing this issue http://www.nabble.com/file/p16118832/PlayCsound.java
PlayCsound.java  , and the csd file 
http://www.nabble.com/file/p16118832/rt.csd rt.csd 

I have also tried with another OpenGL java bindings, jogl, and this is the
same behaviour.

jp


Victor Lazzarini wrote:
> 
> Also: another thing comes to mind. Are you on Windows?
> If so, Michael has been working on a new build system, updating his
> tools etc. I am wondering if this has been caused by this?
> AFAIK there is nothing new on Csound5.08 that could be
> causing the problems you are describing.
> 
> Victor
> 
> ----- Original Message ----- 
> From: "victor" 
> To: 
> Sent: Tuesday, March 18, 2008 9:08 AM
> Subject: [Csnd] Re: Re: Re: 5.08 java and setLocale
> 
> 
>>I really don't know.  As I said I don't think it is a
>> locale problem. Could you try the same CSD with a minimal Java program,
>> that just compiles and performs the code (like the command-line C one)?
>> Then you could let us know; if the problem is there we can try to use
>> your program to find it.
>> As we have not seen this bug anywhere else, we will have to try and
>> trace it like that.
>>
>> Victor
>>
>> ----- Original Message ----- 
>> From: "Jean-Pierre Lemoine" 
>> To: 
>> Sent: Monday, March 17, 2008 11:20 PM
>> Subject: [Csnd] Re: Re: 5.08 java and setLocale
>>
>>
>>> Thanks Victor for helping.
>>> I have tried this in Java    Locale.setDefault( new Locale( "LC_ALL", 
>>> "C" ) );
>>> No effect.
>>> This is a nasty regression from 5.07.
>>> The csd file generated by the Java program is working fine when using 
>>> csound from a command prompt, but not when using the csound api.
>>> Why this "behaviour" in 5.08?
>>>
>>> jp
>>>
>>> victor a écrit :
>>>> That is C. I am not sure what the equivalent is in Java. In Python,
>>>> this problem occurs only when using GTK and the solution is
>>>> similar to the C one.
>>>>
>>>> Victor
>>>> ----- Original Message ----- From: "Jean-Pierre Lemoine" 
>>>> 
>>>> To: 
>>>> Sent: Monday, March 17, 2008 9:26 PM
>>>> Subject: [Csnd] 5.08 java and setLocale
>>>>
>>>>
>>>>> The following error
>>>>> error:  illegal character ., line 309:
>>>>> asiglo clip asigl, 2, 31622.764
>>>>>                           ^
>>>>> was suggested to be corrected by using
>>>>>
>>>>> setlocale(LC_ALL, "C");
>>>>> before the call to Compile()
>>>>>
>>>>> I have no idea on how to set this from a java host using the csound 
>>>>> api. I have tried  " Locale.setDefault( Locale.ENGLISH );"  without
>>>>> any 
>>>>> success.
>>>>> Thanks for any help, and why is this now required? new parser?
>>>>>
>>>>> jp
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body 
>>>>> "unsubscribe csound"
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe 
>>>> csound"
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>> csound" 
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
> 
> 

-- 
View this message in context: http://www.nabble.com/5.08-java-and-setLocale-tp16108855p16118832.html
Sent from the Csound - General mailing list archive at Nabble.com.



Date2008-03-18 16:28
From"Steven Yi"
Subject[Csnd] Re: Re: 5.08 java and setLocale
AttachmentsNone  

Date2008-03-18 16:50
FromJean-Pierre Lemoine
Subject[Csnd] Re: Re: Re: 5.08 java and setLocale
Hi Steven,
Thanks for joining the board to help on this issue

I think the pb is not with locale, as the error message happens on a 
specific opcode. I have tried with small csd file containing only the 
clip opcode. I had also a pb with pinkish opcode too. What is the 
rational here? Why locale is an issue now? it was ok with 5.07.
LWJGL is linked first then csound. I have tried to load csound first, 
and this is the same pb. I don't know when the locale settings happens, 
either csound or lwgl. Is it when compile is call?

Back with 5.07, I had to remove fluidOpcodes from the plugin64 
directory, otherwise I had random bug in my application. Thus I think 
that the dll structure/organisation/code is maybe the problem.

As the same pb occurs with jogl, maybe there is some OpenGL conflict?

jp

Steven Yi a écrit :
> Hi Jean-Pierre,
>
> I'm wondering if Csound is setting locale, then LWGJL changes the
> locale.  Have you experimented with load order, trying to get Csound
> to link and load up last?
>
> steven
>
> On Tue, Mar 18, 2008 at 8:21 AM, Jean-Pierre Lemoine
>  wrote:
>   
>>  Yes I am on Windows. I have done further testing and I think the situation is
>>  bad for me.
>>
>>  A simple java code compiles my reference csd file without errors. When I add
>>  code for initializing OpenGL (using the LWGJL library), I have the error,
>>  the csound api is not able to compile the csd file.
>>
>>  Thus, the problem seems to be related to the coexsistence of two libraries
>>  (using both native code by the way). This was not a problem with 5.07. I
>>  don't know what is wrong, what can explain this. Here is the java code for
>>  testing this issue http://www.nabble.com/file/p16118832/PlayCsound.java
>>  PlayCsound.java  , and the csd file
>>  http://www.nabble.com/file/p16118832/rt.csd rt.csd
>>
>>  I have also tried with another OpenGL java bindings, jogl, and this is the
>>  same behaviour.
>>
>>  jp
>>
>>
>>
>>
>>  Victor Lazzarini wrote:
>>  >
>>  > Also: another thing comes to mind. Are you on Windows?
>>  > If so, Michael has been working on a new build system, updating his
>>  > tools etc. I am wondering if this has been caused by this?
>>  > AFAIK there is nothing new on Csound5.08 that could be
>>  > causing the problems you are describing.
>>  >
>>  > Victor
>>  >
>>  > ----- Original Message -----
>>  > From: "victor" 
>>  > To: 
>>  > Sent: Tuesday, March 18, 2008 9:08 AM
>>  > Subject: [Csnd] Re: Re: Re: 5.08 java and setLocale
>>  >
>>  >
>>  >>I really don't know.  As I said I don't think it is a
>>  >> locale problem. Could you try the same CSD with a minimal Java program,
>>  >> that just compiles and performs the code (like the command-line C one)?
>>  >> Then you could let us know; if the problem is there we can try to use
>>  >> your program to find it.
>>  >> As we have not seen this bug anywhere else, we will have to try and
>>  >> trace it like that.
>>  >>
>>  >> Victor
>>  >>
>>  >> ----- Original Message -----
>>  >> From: "Jean-Pierre Lemoine" 
>>  >> To: 
>>  >> Sent: Monday, March 17, 2008 11:20 PM
>>  >> Subject: [Csnd] Re: Re: 5.08 java and setLocale
>>  >>
>>  >>
>>  >>> Thanks Victor for helping.
>>  >>> I have tried this in Java    Locale.setDefault( new Locale( "LC_ALL",
>>  >>> "C" ) );
>>  >>> No effect.
>>  >>> This is a nasty regression from 5.07.
>>  >>> The csd file generated by the Java program is working fine when using
>>  >>> csound from a command prompt, but not when using the csound api.
>>  >>> Why this "behaviour" in 5.08?
>>  >>>
>>  >>> jp
>>  >>>
>>  >>> victor a écrit :
>>  >>>> That is C. I am not sure what the equivalent is in Java. In Python,
>>  >>>> this problem occurs only when using GTK and the solution is
>>  >>>> similar to the C one.
>>  >>>>
>>  >>>> Victor
>>  >>>> ----- Original Message ----- From: "Jean-Pierre Lemoine"
>>  >>>> 
>>  >>>> To: 
>>  >>>> Sent: Monday, March 17, 2008 9:26 PM
>>  >>>> Subject: [Csnd] 5.08 java and setLocale
>>  >>>>
>>  >>>>
>>  >>>>> The following error
>>  >>>>> error:  illegal character ., line 309:
>>  >>>>> asiglo clip asigl, 2, 31622.764
>>  >>>>>                           ^
>>  >>>>> was suggested to be corrected by using
>>  >>>>>
>>  >>>>> setlocale(LC_ALL, "C");
>>  >>>>> before the call to Compile()
>>  >>>>>
>>  >>>>> I have no idea on how to set this from a java host using the csound
>>  >>>>> api. I have tried  " Locale.setDefault( Locale.ENGLISH );"  without
>>  >>>>> any
>>  >>>>> success.
>>  >>>>> Thanks for any help, and why is this now required? new parser?
>>  >>>>>
>>  >>>>> jp
>>  >>>>>
>>  >>>>>
>>  >>>>>
>>  >>>>>
>>  >>>>>
>>  >>>>>
>>  >>>>> Send bugs reports to this list.
>>  >>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>  >>>>> "unsubscribe csound"
>>  >>>>
>>  >>>>
>>  >>>>
>>  >>>> Send bugs reports to this list.
>>  >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>  >>>> "unsubscribe
>>  >>>> csound"
>>  >>>>
>>  >>>>
>>  >>>>
>>  >>>
>>  >>>
>>  >>>
>>  >>>
>>  >>>
>>  >>> Send bugs reports to this list.
>>  >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>  >>> csound"
>>  >>
>>  >>
>>  >>
>>  >> Send bugs reports to this list.
>>  >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>  >> csound"
>>  >
>>  >
>>  >
>>  > Send bugs reports to this list.
>>  > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>  > csound"
>>  >
>>  >
>>
>>  --
>>  View this message in context: http://www.nabble.com/5.08-java-and-setLocale-tp16108855p16118832.html
>>  Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>>
>>
>>  Send bugs reports to this list.
>>  To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>     
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>