Author Topic: SimpleWindow update 22.o2.2o13  (Read 3440 times)

0 Members and 4 Guests are viewing this topic.

Peter

  • Guest
SimpleWindow update 22.o2.2o13
« on: February 21, 2013, 01:54:23 PM »
deleted
« Last Edit: April 14, 2015, 03:45:02 AM by Peter »

JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #1 on: February 22, 2013, 12:06:30 PM »
Hope is still alive.

Thank You!

JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #2 on: February 22, 2013, 12:35:13 PM »
I only have one word of advice.

BACKUP

JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #3 on: February 22, 2013, 01:01:10 PM »
Peter,

I was wondering if Simple Windows can load an animated .gif and let it do its thing without having to be maintained by the event loop?

John

NO, I'm not turning into a gamer.  ;)

JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #4 on: February 22, 2013, 04:02:24 PM »
scribaw doesn't work with DYC.

I regenerated a new version of ScriptBasic for Windows without the manifest. (scribaw2k.exe) It works with IUP applications using the ScriptBasic extension module but exception errors running SokoMouse via DYC. Just use scriba.exe from the console to run the game for now.

I attached the IUP Online Dictionary example as a .exe with both scribaw.exe (dictman.exe) and scribaw2k.exe (dictw2k.exe). Neither of these examples pop a console window when run. Charles has been playing with DYC and maybe he knows why certain API calls cause SB to fail.



X
« Last Edit: February 23, 2013, 04:00:23 PM by JRS »

JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #5 on: February 23, 2013, 04:46:21 PM »
Quote from: JRS
Hope is still alive.

Quote from: Charles
Bstring/Zstring conversions now working:
They are sent and received as long values

DLLC
Code: [Select]
mysbstring = dllzstr (mybstring)
mybstring = dllostring ( mysbstring)

I find this interesting. This is the only way I can pass a string variable to SW. I can not assign that variable anything other than a quoted string or pass it a quoted string or it exception errors.

Code: [Select]
BmpText fo, 520, 420, Nums[lev], 24, 24

Peter,

I was so wrapped up in performance that I didn't even notice the program was consuming memory at a fairly rapid rate. What do I need to free in each iteration of the event loop to stop the leaking?

« Last Edit: February 23, 2013, 09:13:32 PM by JRS »

Charles Pegge

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #6 on: February 23, 2013, 10:15:41 PM »
Hi John

When a function returns a Bstring it is the callers responsibility to dispose of it.

Using DLLC When you receive a Bstring then convert it to an SB string, the Bstring will be freed automatically.

I will also add another function to DLLC for explicitly freeing Bstrings

mybstring=dllostr("ABCDEF")

dlldelo(mybstring)


JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #7 on: February 23, 2013, 10:48:25 PM »
Quote
When a function returns a Bstring it is the callers responsibility to dispose of it.

The SokoMouse game isn't calling any Simple Windows functions that return strings. I only pass quoted strings to the library. (only during init)

Glad to hear that DLLC has good house keeping habits.

@Peter

Just to make sure SB doesn't have leaking issues, I ran this at full bore for 5 minutes (100% CPU) and the memory usage level never budged.

Code: [Select]
SUB me
  FOR x = 1 to 1000
    b = x
  NEXT
END SUB

a = 1
WHILE a
  me
WEND
« Last Edit: February 23, 2013, 11:16:28 PM by JRS »

JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #8 on: February 23, 2013, 11:41:58 PM »
Quote
Memory leaks?
Do you have an example  what shows me what you  do?

Just run the SokoMouse game in SB (maybe O2 as well) with task manager and watch the memory keep climbing.

Aurel

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #9 on: February 24, 2013, 12:47:21 AM »
I don't see any problem with memory to,only processor is on 100%

Charles Pegge

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #10 on: February 24, 2013, 05:17:27 AM »
I think its a bstring interfacing problem with DYC

JRS

  • Guest
Re: SimpleWindow update 22.o2.2o13
« Reply #11 on: February 24, 2013, 09:37:39 AM »
I would have to agree. As I removed Simple Windows functions in an effort to isolate what function might be causing the issue, the memory usage reduced as the functions ceased to be called. I thought it was only functions that passed stings back to SB would cause leaks but it seems passing strings (quoted) to SW without the underline support from O2 for cleanup is the problem. I'll give SW another look after DLLC is introduced.