Bug? 8.8 problem with *.bal file

Discussion in 'Bugs & wishlist' started by jatko, Jan 3, 2019.

  1. jatko

    jatko Member Licensed User

    I must install previous version, because of a big problem.

    In my code there is a line:
    Activity.LoadLayout("main_act")

    in that step there is a bug listed below.
    "main_act" is a normal "window" created in Designer. In previous version in works

    Error occurred on line: 658 (Main)
    java.io.FileNotFoundException: main_act.bal
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:207)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
    at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262)
    at Sprzedaz.Mobilna.main._mainokno(main.java:1648)
    at Sprzedaz.Mobilna.main._activity_create(main.java:1226)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at Sprzedaz.Mobilna.main.afterFirstLayout(main.java:104)
    at Sprzedaz.Mobilna.main.access$000(main.java:17)
    at Sprzedaz.Mobilna.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Try to uninstall the existing app from the device, clean the project (Ctrl + P) and run again.
     
  3. jatko

    jatko Member Licensed User

    There is another problem after Your advice:

    ** Activity (main) Create, isFirst = true **
    Serial1.Initialize()
    main_activity_create (java line: 707)
    java.lang.RuntimeException: java.io.FileNotFoundException: icudt46l.zip
    at net.sqlcipher.database.SQLiteDatabase.loadICUData(SQLiteDatabase.java:150)
    at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:182)
    at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:169)
    at anyhwheresoftware.b4a.objects.sqlcipher.SQLCipher.Initialize(SQLCipher.java:50)
    at Sprzedaz.Mobilna.main._activity_create(main.java:707)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at Sprzedaz.Mobilna.main.afterFirstLayout(main.java:104)
    at Sprzedaz.Mobilna.main.access$000(main.java:17)
    at Sprzedaz.Mobilna.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
    Caused by: java.io.FileNotFoundException: icudt46l.zip
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at net.sqlcipher.database.SQLiteDatabase.loadICUData(SQLiteDatabase.java:135)
    ... 18 more
    java.lang.RuntimeException: java.io.FileNotFoundException: icudt46l.zip
     
  4. Erel

    Erel Administrator Staff Member Licensed User

  5. jatko

    jatko Member Licensed User

    You're right, there was the old version of the library.
    But when I change the version of the library the app can't open the old database file as database. I need to create the new one. After that I can lost some data. It rise big problem for my users.
    I believe to solve that.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread in the questions forum for further discussion.
     
  7. jatko

    jatko Member Licensed User

    I must return to the first question. The problem is unsolved. I have done Your first advice, off course.
    I prepared the new catalog for the PC software for the new libraries. After that I have the same problem:

    ** Activity (main) Create, isFirst = true **
    main_mainokno (java line: 6599)
    java.io.FileNotFoundException: main_act.bal
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:207)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at Sprzedaz.Mobilna.main._mainokno(main.java:6599)
    at Sprzedaz.Mobilna.main._activity_create(main.java:1027)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
    at Sprzedaz.Mobilna.main.afterFirstLayout(main.java:104)
    at Sprzedaz.Mobilna.main.access$000(main.java:17)
    at Sprzedaz.Mobilna.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
    java.io.FileNotFoundException: main_act.bal
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload the project?
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Also go to the Files tab and click on the Sync button. Maybe the file name case is incorrect.
     
  10. jatko

    jatko Member Licensed User

    The project I meant is too large. I send another, where problem seems to be the same.
     

    Attached Files:

    • sms.zip
      File size:
      23.6 KB
      Views:
      55
  11. jatko

    jatko Member Licensed User

    The same :(
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Works fine here (though you need to fix many things in this project). Can you post the full error message? Where is the project saved?
     
  13. jatko

    jatko Member Licensed User

    Logger połączony z: 52034065ec1c9400
    --------- beginning of system
    --------- beginning of main
    *** Service (starter) Create ***
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = true **
    *** Service (starter) Create ***
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    main_activity_create (java line: 345)
    java.io.FileNotFoundException: main.bal
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:207)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at sms.paczka.main._activity_create(main.java:345)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
    at sms.paczka.main.afterFirstLayout(main.java:104)
    at sms.paczka.main.access$000(main.java:17)
    at sms.paczka.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
    *** Service (starter) Create ***
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    main_activity_create (java line: 345)
    java.io.FileNotFoundException: main.bal
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:207)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at sms.paczka.main._activity_create(main.java:345)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
    at sms.paczka.main.afterFirstLayout(main.java:104)
    at sms.paczka.main.access$000(main.java:17)
    at sms.paczka.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
    *** Service (starter) Create ***
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    main_activity_create (java line: 345)
    java.io.FileNotFoundException: main.bal
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:207)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at sms.paczka.main._activity_create(main.java:345)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
    at sms.paczka.main.afterFirstLayout(main.java:104)
    at sms.paczka.main.access$000(main.java:17)
    at sms.paczka.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    Where is the project saved?
     
  15. jatko

    jatko Member Licensed User

    What do You mean? Only on my HDD. The path is important?
     
  16. Erel

    Erel Administrator Staff Member Licensed User

    Might be.
    Please post it if possible.

    What is the output of this code in release mode:
    Code:
    For Each f As String In File.ListFiles (File.DirAssets)
     
    Log(f)
    Next
    ?
     
  17. jatko

    jatko Member Licensed User

    When I want to use Your code there is the message:

    B4A line: 34
    Log(f)
    javac 1.8.0_191
    src\sms\paczka\main.java:354: error: cannot find symbol
    anywheresoftware.b4a.keywords.Common.LogImpl("0131075",_f,0);
    ^
    symbol: method LogImpl(String,String,int)
    location: class Common

    I have must remove every "log" from project. That's another strange thing.

    I used MsgBox(f)

    result:
    AutoRunTargetPermission.xml
    images
    pskc_schema.xsd
    sound
    webkit
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    This means that B4A was not installed properly. You are still using old versions of some of the libraries. Delete all the internal libraries and reinstall the latest version.
     
  19. jatko

    jatko Member Licensed User

    Thanks! I'll work on it.
     
  20. jatko

    jatko Member Licensed User

    I removed every files from "library" catalog and after that I install 8.8 version b4a program. I discovered that when I run (F5) in debug mode, it works.

    From code:

    For Each f As String In File.ListFiles (File.DirAssets)
    Log(f)
    Next

    I recieved:

    inwentaryzacja (2).png
    inwentaryzacja (3).png
    logo3.jpg
    main.bal
    _assets_map

    In Release mode it doesn't work

    I recieved file list:

    AutoRunTargetPermission.xml
    images
    pskc_schema.xsd
    sounds
    webkit

    And log:

    main_activity_create (java line: 358)
    java.io.FileNotFoundException: main.bal
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:207)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at sms.paczka.main._activity_create(main.java:358)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at sms.paczka.main.afterFirstLayout(main.java:104)
    at sms.paczka.main.access$000(main.java:17)
    at sms.paczka.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
     
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