google-code-export / red5

Automatically exported from code.google.com/p/red5
0 stars 0 forks source link

r4594 broke amf encoding with typed objects #386

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. send typed value object through net Connection call using IE 10
2. Make a pass through function which resend the objects to clients. 

What is the expected output? What do you see instead?
On all other browser we receive the object correctly. On IE 10 this generate a 
"Error #2030: End of file was encountered".

What version of the product are you using? On what operating system?
r4594 or more on windows 7 or 8 using IE 10 only. 

Please provide any additional information below.

It is very strange for any other browser would not get this error but sadly 
enough, some people use IE 10.

Original issue reported on code.google.com by william....@gmail.com on 19 Apr 2013 at 3:26

GoogleCodeExporter commented 9 years ago
This may seem odd, but a Red5 server could care less about what browser or OS 
is connecting to it. I would venture to say that its not IE10 which is the 
problem, it is most likely the Flash Player being used on that IE10. Try 
different FP versions and let us know what you find out.

Original comment by mondain on 23 Apr 2013 at 1:09

GoogleCodeExporter commented 9 years ago
This is not odd at all. There are no understandable reason as far as i know for 
this bug to occur. We tried with flash 11.5 and flash 11.7.700.169. Both failed 
on the same error. We used load Testers to simulate a very high load in a 
single scope using over 80 users making various changes in per seconds and no 
other browser would create that error. 

The objects needs to be sent from the IE flash player to create this on return. 
I am out of town at the moment but we will include a sample application that 
recreate this bug as soon as i return. 

Thanks for replying.

William

Original comment by william....@gmail.com on 23 Apr 2013 at 1:48

GoogleCodeExporter commented 9 years ago
Hi, Im also having this error #2030 in the following condition:

- Red5 1.0.1
- Mac OS 10.7.5 (64-bit)
- Firefox w/ flash 11.5.500.80
- Single client connected.

 When the client request big lists from server ( about 5000 entries ).

        @PreAuthorize( "hasRole('veiculo:listar')" )
    public List<Object> getListaVeiculos() {

        List<Tblveiculo> list = logic.getVehicleList();

        List<Object> answer = new ArrayList();
        for ( Tblveiculo veic: list ) { 
            Map<String, Object> mini = Maps.newHashMap();
            mini.put( "key", veic.getId() );
            mini.put( "value", veic.getPlaca() );
            answer.add( mini );
        }

        return answer;
    }

Original comment by dan...@deltatecnologia.com on 6 May 2013 at 8:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
danilo,

Try these options, I would opt for the second one.

#1. Add / use generics

@PreAuthorize("hasRole('veiculo:listar')")
public List<Map<String, String>> getListaVeiculos() {
    List<Tblveiculo> list = logic.getVehicleList();              
    List<Map<String, String>> answer = new ArrayList<Map<String, String>>();
    for (Tblveiculo veic: list) {
        Map<String, String> mini = Maps.newHashMap();
        mini.put("key", veic.getId());
        mini.put("value", veic.getPlaca());
        answer.add(mini);
    }
    return answer;
}

#2. Create an object on the server and client that represents the record, 
instead of using a list of maps.

@PreAuthorize("hasRole('veiculo:listar')")
public List<VeiculoRecord> getListaVeiculos() {
    List<Tblveiculo> list = logic.getVehicleList();              
    List<VeiculoRecord> answer = new ArrayList<VeiculoRecord>();
    for (Tblveiculo veic: list) {
        answer.add(new VeiculoRecord(veic.getId(), veic.getPlaca()));
    }
    return answer;
}

public class VeiculoRecord {

    public String id;
    public String placa;

    public VeiculoRecord() {
    }

    public VeiculoRecord(String id, String placa) {
        this.id = id;
        this.placa = placa;
    }

}

Original comment by mondain on 7 May 2013 at 1:23

GoogleCodeExporter commented 9 years ago
Thanks Mondain, the second approach worked like a charm.
PS: Im upgrading from 0.9.1 which was working that way.

Thanks again.

Original comment by dan...@deltatecnologia.com on 7 May 2013 at 1:17

GoogleCodeExporter commented 9 years ago

Original comment by mondain on 26 Aug 2013 at 1:51