Page 1 of 2
Beginner
Posted: Tue Jan 24, 2006 12:56 pm
by Becky Rose
Hello, i've just downloaded the PB demo and I am having an inconsistent crash. I've created a little bit of code which should, if it works, get stuck in an infinite loop and require force quitting (ok it would display a dialogue, but I havnt got that far yet).
The problem i'm having and what I do not understand is that sometimes it bails completely, and sometimes it creates the TCP server as expected. As far as I can tell commenting out the select/endselect code resolves this.
Is the select/endselect statement bugged in the Macintosh demo under OSX 10.4.4 or is something else awry?
Thank you.
Code: Select all
;Becky Rose's attempt at making a file sharing program operate as a web server.
Structure client
activeTask.l
EndStructure
NewList user.client()
Procedure initTCP()
;Initialise TCP/IP Stack
tcpipStack=InitNetwork()
If tcpipStack
Else
userClick = MessageRequester("TCP/IP","E1: No Networking stack available for program execution",#PB_MessageRequester_Ok)
End
EndIf
EndProcedure
Procedure startServer()
;Create server (HTTP on port 80)
server = CreateNetworkServer(8000)
If server
Else
userClick = MessageRequester("TCP/IP","E2: Port 80 in use. Cannot initialise web server",#PB_MessageRequester_Ok)
End
EndIf
EndProcedure
Procedure activeServer()
Repeat
serverEvent=NetworkServerEvent()
Select serverEvent
Case 1
AddElement(user())
user()\activeTask=1
Case 2
Case 3
Default
EndSelect
Until quit
EndProcedure
initTCP()
startServer()
activeServer()
Posted: Tue Jan 24, 2006 1:21 pm
by Becky Rose
My bad, I forgot to fix permissions after installing PB - doing it now seems to have fixed it ... touch wood.
Posted: Tue Jan 24, 2006 1:47 pm
by Fred
Hello and welcome ! What do you mean exactly by 'fixing' permission ? The provided bundle isn't correct ?
Posted: Tue Jan 24, 2006 1:55 pm
by Becky Rose
Hello to you too

.
I think that is easiest explained as a how to for anyone else who has issues on their Mac after installing stuff - here's my simpleton understanding based upon tech support docs on the Apple web site combined with my own satanic interpretation:
Apple recommend fixing drive permissions after installing software or running the Apple update utility, the process can fix many problems not the least of which is erratic peculiarities in system stability. To make the process of fixing permissions easier not only did Apple not automate the process, but they made sure the button to do it was well and truly hidden inside a program with which you can do a great deal of damage to your software installation.
In 10.3 and 10.4 goto the applications folder, then into utilities, where you will find DiskUtility. Run the DiskUtility program and highlight your boot disk from the list on the left (if you have just 1 hard disk it's already highlighted) and then click "Repair Disk Permissions" near the bottom of the window.
It is not possible to distribute software with already fixed permissions as the permissions are on a per-user basis. If you want someone to blame, find the mug who invented Unix, and the bigger mug who built an Apple operating system around it.
Posted: Tue Jan 24, 2006 2:07 pm
by Fred
Scaring. How 'regular' application are handling this ? I never got such a problem when installing other apps (like firefox, etc.)
Posted: Tue Jan 24, 2006 2:21 pm
by Becky Rose
Actually the problem still persists in other applications, if your machines hasn't been effected you've technically done what is called "lucking out".
Mostly, I base this on observation and unneducated guess work: The programs which are most likely to fail seem to be those which modify the library in some way, or install fonts.
Bearing in mind that I frequently mess around with my Mac in quite a technical way to recreate user issues, my problem may not have been caused by the Pure Basic installation itself but simply manifested itself in Pure Basic because that's what I was tinkering with.
I would say though that anyone who finds their Mac, or their Pure Basic install, performing in an erratic manner or "not as documented" should fix drive permissions before reporting a bug.

Posted: Tue Jan 24, 2006 3:24 pm
by Kale
I had alsorts of issues with our xserver here at work, i had to fix the permissions there too.

Posted: Tue Jan 24, 2006 3:28 pm
by Becky Rose
It's the price we pay for no malware...
Posted: Tue Jan 24, 2006 7:29 pm
by garretthylltun
Greetings Becky,
By chance, would this cause the IDE to crash irradically?, or just affect
programs you're coding?
Thanks,
-Garrett
Posted: Wed Jan 25, 2006 4:50 pm
by Becky Rose
I've not had much chance to play about with PB yet, but from what I can tell on my machine the IDE is hopelessly unstable on the Mac. It seems to start bailing out the moment I get a failed compile, i'll know more when I try it on my Mac at home and have had more of a play.
Posted: Wed Jan 25, 2006 6:42 pm
by SEO
Unstable IDE
Hi, I have a lot of crashes in the beginning when I started using PB.. But with the last version there is no problems for me. I have fixed the permissions 3 or 4 times... Perhaps there is some problems with just one or more commands?? Using some code that PB Mac not supported yet?? Long filenames (paths) ?? Filenames with unsuported file names (characters)??
Regards,
SEO
Posted: Wed Jan 25, 2006 7:12 pm
by garretthylltun
No, it has to be something else, I think.... I posted previously that when
it crashes on me, I can just be looking at it, not even touching the mouse
or keyboard, just looking at it and it gets scared or something and craps
itself. It's just too random for me to pin point it down to anything specific.
Hmmm... Well that's a rare one now, isn't it?! An IDE that craps itself.

Fred.... Clean up on aisle 10!
-Garrett
Posted: Wed Jan 25, 2006 7:20 pm
by SEO
Unstable IDE
Ok, if you know, please let us know...
Posted: Wed Jan 25, 2006 7:54 pm
by Becky Rose
Do any of you find that your text cursor does not always show in the same position that text appears? After highlighting a block of text (which can occur from a failed compile too I think, but seems erratic) the cursor is drawn in one place but is "active" a few characters away. On one ocassion it appeared on the wrong line.
I'm actually finding the IDE problems too problematical for me to deal with whilst at work, but I am just using the demo for the time being as i'd like to be able to complete a simple program before buying the product, and at the moment that's proving very difficult because of stability problems within the development environment

.
Posted: Wed Jan 25, 2006 11:25 pm
by garretthylltun
Yes, I've encountered this also. I simply click on a line or two above
or below the line, and then click the cursor back where I want it.
Being that this is the first version of PureBasic for OSX, I'm not going to
be too harsh on it. I'm sure that 4.0 will address many of the issues
we've noticed.
If you can hang in there until version 4 is released.
-Garrett