B4J Question Java heap space

Discussion in 'B4J Questions' started by Tayfur, Dec 7, 2018.

  1. Tayfur

    Tayfur Well-Known Member Licensed User

    Hello;
    My app loading in mylist all pictures.
    I trying big sized pictures from lan. (1-2mb). When I loaded 3 pcs , I read some error like under below.
    How can fix it.

    it s broken line on "initialize."
    Code:
    Dim bmp As Image
    bmp.Initialize2(
    File.OpenInput(xDir,xName))
    I've tried uploading a lot of pictures. (size 300Kb) but it s not broken.
    I've tried uploading 2 PNG pictures. (size 1640Kb) After app broked when I added 3. PNG picture.
    all png pictures are same file.

     
    Last edited: Dec 7, 2018
  2. stevel05

    stevel05 Expert Licensed User

  3. Tayfur

    Tayfur Well-Known Member Licensed User

  4. stevel05

    stevel05 Expert Licensed User

    That is the command line option, within the ide you just need :
    Code:
    #VirtualMachineArgs: -Xmx2048m
     
  5. Tayfur

    Tayfur Well-Known Member Licensed User

    I tried it. And results is very very interesting. Java burning...

    I tested with 30pcs.

    upload_2018-12-7_17-23-31.png


    Some time disk usage rate 100% :)
    CPU rate 75%
    after broken code.


     
  6. stevel05

    stevel05 Expert Licensed User

    If you are loading multiple images, you will have to try managing them. one option would be to download one at a time, save it to disk the loadbitmapSample to display a smaller view of each.
     
  7. Tayfur

    Tayfur Well-Known Member Licensed User


    I added sample project ; with out image.

    image size : 9933x7016

    upload_2018-12-7_17-44-9.png


    But i need to learn real image size. Therefore "bmp.Initialize2(File.OpenInput(xDir,xName))"
     

    Attached Files:

  8. stevel05

    stevel05 Expert Licensed User

    Tayfur likes this.
  9. Tayfur

    Tayfur Well-Known Member Licensed User

  10. Erel

    Erel Administrator Staff Member Licensed User

    Moved to the questions forum.
     
  11. Tayfur

    Tayfur Well-Known Member Licensed User

    sorry its my faulty
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice