ilan Expert Licensed User Longtime User Jul 17, 2019 #1 this happens after working a about 1-2 hours on b4a. if i close b4a and open again everything works fine for about 1 to 2 hour then it happens again. the ide also starts to react very slow until everything freezes. restarting b4a fix the issue but it happens again. i need to mention that its a big project but i am not sure its because of that.
this happens after working a about 1-2 hours on b4a. if i close b4a and open again everything works fine for about 1 to 2 hour then it happens again. the ide also starts to react very slow until everything freezes. restarting b4a fix the issue but it happens again. i need to mention that its a big project but i am not sure its because of that.
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2019 #2 Why are you building the layout like this? It is wrong. Split it into several layout files. This will allow you to use anchors and other features. It will also make the program more responsive. There is no reason to load all the views when the program starts. Upvote 0
Why are you building the layout like this? It is wrong. Split it into several layout files. This will allow you to use anchors and other features. It will also make the program more responsive. There is no reason to load all the views when the program starts.
ilan Expert Licensed User Longtime User Jul 18, 2019 #3 Erel said: Why are you building the layout like this? It is wrong. Split it into several layout files. This will allow you to use anchors and other features. It will also make the program more responsive. There is no reason to load all the views when the program starts. Click to expand... I have about 8 layout files. Each layout files is a window in my app. There is the settings window, the main window,... I cannot load a part of the views since i need them when entering that section in my app. It is a very complex and big app. I dont like to use anchors they dont always react as expected. Upvote 0
Erel said: Why are you building the layout like this? It is wrong. Split it into several layout files. This will allow you to use anchors and other features. It will also make the program more responsive. There is no reason to load all the views when the program starts. Click to expand... I have about 8 layout files. Each layout files is a window in my app. There is the settings window, the main window,... I cannot load a part of the views since i need them when entering that section in my app. It is a very complex and big app. I dont like to use anchors they dont always react as expected.
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2019 #4 ilan said: I dont like to use anchors they dont always react as expected. Click to expand... Never seen such a case. If you encounter one then you should report it. ilan said: I cannot load a part of the views since i need them when entering that section in my app. It is a very complex and big app. Click to expand... The more complex the layout the more it makes sense to split it into several files. You can load them one after another if you like. Upvote 0
ilan said: I dont like to use anchors they dont always react as expected. Click to expand... Never seen such a case. If you encounter one then you should report it. ilan said: I cannot load a part of the views since i need them when entering that section in my app. It is a very complex and big app. Click to expand... The more complex the layout the more it makes sense to split it into several files. You can load them one after another if you like.
ilan Expert Licensed User Longtime User Jul 18, 2019 #5 Erel said: You can load them one after another if you like. Click to expand... Ok i understand, so you think its because the layout file is huge? Upvote 0
Erel said: You can load them one after another if you like. Click to expand... Ok i understand, so you think its because the layout file is huge?
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2019 #6 I never encountered such issue so hard to say based on the video. I do assume that if you split the layout it will not happen and if it will happen it will be easier to say what causes it. Upvote 0
I never encountered such issue so hard to say based on the video. I do assume that if you split the layout it will not happen and if it will happen it will be easier to say what causes it.
techknight Well-Known Member Licensed User Longtime User Jul 18, 2019 #7 Its almost certainly a classic sign of a memory leak. Since your project is so huge, your probably running into it whereas normally it wouldnt happen. Upvote 0
Its almost certainly a classic sign of a memory leak. Since your project is so huge, your probably running into it whereas normally it wouldnt happen.
kisoft Well-Known Member Licensed User Longtime User Jul 19, 2019 #8 You can try to increase the allocated memory on the system stack. Code: Copy SetApplicationAttribute(android:largeHeap, "true") However, there are some reservations about this solution. https://www.b4x.com/android/forum/t...tribute-android-largeheap-true.46121/#content Upvote 0
You can try to increase the allocated memory on the system stack. Code: Copy SetApplicationAttribute(android:largeHeap, "true") However, there are some reservations about this solution. https://www.b4x.com/android/forum/t...tribute-android-largeheap-true.46121/#content
ilan Expert Licensed User Longtime User Jul 19, 2019 #9 kisoft said: You can try to increase the allocated memory on the system stack. Code: Copy SetApplicationAttribute(android:largeHeap, "true") However, there are some reservations about this solution. https://www.b4x.com/android/forum/t...tribute-android-largeheap-true.46121/#content Click to expand... the issue is on my pc not on my phone. Upvote 0
kisoft said: You can try to increase the allocated memory on the system stack. Code: Copy SetApplicationAttribute(android:largeHeap, "true") However, there are some reservations about this solution. https://www.b4x.com/android/forum/t...tribute-android-largeheap-true.46121/#content Click to expand... the issue is on my pc not on my phone.
kisoft Well-Known Member Licensed User Longtime User Jul 19, 2019 #10 I'm sorry I misunderstood Upvote 0
Kwame Twum Active Member Licensed User Longtime User Jul 21, 2019 #11 Erel said: Never seen such a case. If you encounter one then you should report it. Click to expand... When you use anchors on views in a panel, they work fine. But when you load this panel in a scrollview at runtime, the anchors don't work. At least not for me. Usually, I put the scrollview and then panel in the same layout file. Then at runtime, I use: Code: Copy panel.RemoveView scrollview.Panel.AddView(panel, ...) After this, the panel's views lose their anchor properties. I'm guessing the RemoveView resets the anchors... maybe I'm wrong. Upvote 0
Erel said: Never seen such a case. If you encounter one then you should report it. Click to expand... When you use anchors on views in a panel, they work fine. But when you load this panel in a scrollview at runtime, the anchors don't work. At least not for me. Usually, I put the scrollview and then panel in the same layout file. Then at runtime, I use: Code: Copy panel.RemoveView scrollview.Panel.AddView(panel, ...) After this, the panel's views lose their anchor properties. I'm guessing the RemoveView resets the anchors... maybe I'm wrong.
kisoft Well-Known Member Licensed User Longtime User Jul 21, 2019 #12 You better listen to Erel's advice and divide it into several smaller layout files. You can display the selected view at any time. . This will be a much safer solution for your application...This my previous advice about the stack may also be helpful for you. Especially when you stay with your old solution. Upvote 0
You better listen to Erel's advice and divide it into several smaller layout files. You can display the selected view at any time. . This will be a much safer solution for your application...This my previous advice about the stack may also be helpful for you. Especially when you stay with your old solution.
Kwame Twum Active Member Licensed User Longtime User Jul 21, 2019 #13 kisoft said: You better listen to Erel's advice and divide it into several smaller layout files. You can display the selected view at any time. . This will be a much safer solution for your application...This my previous advice about the stack may also be helpful for you. Especially when you stay with your old solution. Click to expand... Erel's advice is well taken... I was just giving a scenario where anchors will fail Upvote 0
kisoft said: You better listen to Erel's advice and divide it into several smaller layout files. You can display the selected view at any time. . This will be a much safer solution for your application...This my previous advice about the stack may also be helpful for you. Especially when you stay with your old solution. Click to expand... Erel's advice is well taken... I was just giving a scenario where anchors will fail
Erel B4X founder Staff member Licensed User Longtime User Jul 22, 2019 #14 Kwame Twum said: When you use anchors on views in a panel, they work fine. But when you load this panel in a scrollview at runtime, the anchors don't work. At least not for me. Usually, I put the scrollview and then panel in the same layout file. Click to expand... 1. You should probably use xCustomListView instead of ScrollView. 2. Anchors are only applied once when the layout is loaded. If you later resize the view then they will not have any effect. Upvote 0
Kwame Twum said: When you use anchors on views in a panel, they work fine. But when you load this panel in a scrollview at runtime, the anchors don't work. At least not for me. Usually, I put the scrollview and then panel in the same layout file. Click to expand... 1. You should probably use xCustomListView instead of ScrollView. 2. Anchors are only applied once when the layout is loaded. If you later resize the view then they will not have any effect.
ilan Expert Licensed User Longtime User Jul 31, 2019 #15 Erel said: I never encountered such issue so hard to say based on the video. I do assume that if you split the layout it will not happen and if it will happen it will be easier to say what causes it. Click to expand... i dont know why it happens but after a while working on b4a (about 1h) the issue is still happening even on very small layout files (maybe 20 views) the ide also start running slow. what i mean is that i type a code and it is writing after few seconds i have finished typing. so a delay of about 2-3 seconds. the problem is that it happens often lately. i need to mention that i have a very strong (and new) notebook! i accounter those issue since the last update (v9.3) ps b4a is using about 2,2gb ram and when it compiles about 100% of processor is this normal? i also see that b4a is 32 bit. is there a 64 bit? will it perform better on windows 10 (a 64 bit version)? is there something i can do to run b4a smooth again? thanx, ilan EDIT: after restarting b4a it even happens after few minutes now Last edited: Jul 31, 2019 Upvote 0
Erel said: I never encountered such issue so hard to say based on the video. I do assume that if you split the layout it will not happen and if it will happen it will be easier to say what causes it. Click to expand... i dont know why it happens but after a while working on b4a (about 1h) the issue is still happening even on very small layout files (maybe 20 views) the ide also start running slow. what i mean is that i type a code and it is writing after few seconds i have finished typing. so a delay of about 2-3 seconds. the problem is that it happens often lately. i need to mention that i have a very strong (and new) notebook! i accounter those issue since the last update (v9.3) ps b4a is using about 2,2gb ram and when it compiles about 100% of processor is this normal? i also see that b4a is 32 bit. is there a 64 bit? will it perform better on windows 10 (a 64 bit version)? is there something i can do to run b4a smooth again? thanx, ilan EDIT: after restarting b4a it even happens after few minutes now
Erel B4X founder Staff member Licensed User Longtime User Aug 1, 2019 #16 There is currently no 64 bit version of B4A, it won't make a significant difference. Try to find what causes it. Does it happen when the external device (WYSIWYG device) is not connected to the designer? Upvote 0
There is currently no 64 bit version of B4A, it won't make a significant difference. Try to find what causes it. Does it happen when the external device (WYSIWYG device) is not connected to the designer?
ilan Expert Licensed User Longtime User Aug 1, 2019 #17 Erel said: There is currently no 64 bit version of B4A, it won't make a significant difference. Try to find what causes it. Does it happen when the external device (WYSIWYG device) is not connected to the designer? Click to expand... acctually it happens when the external device (WYSIWYG device) is connected. if i work with simulator i dont ancounter this. at least as i remember it happen if i use an external device that is connected via usb. btw. i dont have such issue with b4j and b4i so i dont think it is a problem with my pc. Upvote 0
Erel said: There is currently no 64 bit version of B4A, it won't make a significant difference. Try to find what causes it. Does it happen when the external device (WYSIWYG device) is not connected to the designer? Click to expand... acctually it happens when the external device (WYSIWYG device) is connected. if i work with simulator i dont ancounter this. at least as i remember it happen if i use an external device that is connected via usb. btw. i dont have such issue with b4j and b4i so i dont think it is a problem with my pc.
Erel B4X founder Staff member Licensed User Longtime User Aug 1, 2019 #18 ilan said: acctually it happens when the external device (WYSIWYG device) is connected Click to expand... This is what I thought. For some reason you encounter a race condition between the device state and the IDE state. Disconnect the device when it happens (Shift + F2) and see whether it solves it. Upvote 0
ilan said: acctually it happens when the external device (WYSIWYG device) is connected Click to expand... This is what I thought. For some reason you encounter a race condition between the device state and the IDE state. Disconnect the device when it happens (Shift + F2) and see whether it solves it.
ilan Expert Licensed User Longtime User Aug 1, 2019 #19 Ok thank you i will try it next time and tell you if it helped me. Upvote 0