Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I have made a script. And I this script I call ccbEndProgram() when ESC key is pressed. But after the window is closed, there would be a Error messagebox shown as the EXE has stopped with error. Do I foget to release any resource here? How can I use ccbEndProgram() correctly? Thanks.
|
||||
|
I never tried that command, when I will be on my desktop, I will try it and will provide and answer to you. |
||||
|
I also never used it and didn't receive any errors related to not completed requests ever. Tbh, I'm not sure how js communicates with the core engine, but to my experience it doesn't happen on every frame. So I believe, the issue might be that ccbEndProgram is actually called multiple times. Try to also unregister keyPressedDown event if it's called. I.e. the function would be: function keyPressedDown(keyCode) |
||||
|
@labz, I just tried the code that you provides, and it din't throw any error to me and work just fine. Also I don't understand why you are using the code at first place, I don't think that you need to unregisterFramEvents and Callbacks and all before closing your app, they are not going to work in the background or won't get stored in the memory. So they won't be doing anything, all you need is just close the app. ccbEndProgram(), does close the app, also there is an action to close the application as well, you can use that too if you want. There is no need to unregisterOnFrameEvent, and callback events, they will get destroyed too as soon as your apps get closed. |
||||
|
Hi, Thanks for your reply. I have tried your code, But this issue still happen. wrote:
I also never used it and didn't receive any errors related to not completed requests ever. Tbh, I'm not sure how js communicates with the core engine, but to my experience it doesn't happen on every frame. So I believe, the issue might be that ccbEndProgram is actually called multiple times. Try to also unregister keyPressedDown event if it's called. I.e. the function would be: function keyPressedDown(keyCode) |
||||
|
Hi, Yes, you can't see this issue without my device. I use ESP32 to build a simple http server. And the data shows on it. And every frame CCB could get data from it. I have tried to remove ccbUnregisterOnFrameEvent() in my code. But that issue still happens. Next step, I think I should written a simple http server to help you see my issue . wrote:
@labz, I just tried the code that you provides, and it din't throw any error to me and work just fine. Also I don't understand why you are using the code at first place, I don't think that you need to unregisterFramEvents and Callbacks and all before closing your app, they are not going to work in the background or won't get stored in the memory. So they won't be doing anything, all you need is just close the app. ccbEndProgram(), does close the app, also there is an action to close the application as well, you can use that too if you want. There is no need to unregisterOnFrameEvent, and callback events, they will get destroyed too as soon as your apps get closed. |
||||
|
I have confirmed this issue only happens on Windows 7. I write a simple http server which can create a server on local Windows. And this issue only happens with Windows 7. I have tried on 2 Windows 7 systems. One is my i7 4790s destop. And the other is in a virtual machine(VirtualBox). Both of them have same issue. https://www.lab-z.com/wp-content... If CCB is only support Windows above Windows7 I think this issue can be ignored. |
|