Skip to content

Executable program wont run #629

@smokingwheels

Description

@smokingwheels

Bug Report - Program Not Starting queries a yacy search engine

Describe the bug:
The program that previously functioned as expected is no longer starting. Upon execution, no output is generated, and the program appears to hang without performing any operations. The issue occurs after adding or modifying the Timer On statement and associated subroutine health.

To Reproduce:
Steps to reproduce the behavior:

Open the source code in the QB64pe environment.

Ensure the Randomize Timer, Timer On, and On Timer(1) GoSub health statements are included in the initialization.

Run the program.

Observe that the program does not proceed past the initialization or output any information.

Randomize Timer
DefInt A-Z
Timer On
On Timer(1) GoSub health

digloop:
For k = 0 To 255
If InKey$ = Chr$(27) Then End
a = k
'a = (25 * Rnd) + 97
b = (25 * Rnd) + 97
c = (25 * Rnd) + 97
d = (25 * Rnd) + 97

domain$ = "ab" + Chr$(a)
'+ Chr$(b%)     Chr$(b%) + Chr$(c%) + Chr$(d%)
index& = index& + 1
Locate 11, 1
Print domain$
'Shell "wget -P /home/nextcloud/Downloads/qb64/yacy/html/ http://192.168.1.55:8095/yacysearch.html?query=" + domain$
'    Shell "wget -P /dev/null http://58.96.112.6:8000/?query=" + domain$ + "&Enter=&auth=&verify=ifexist&contentdom=text&nav=location%2Chosts%2Cauthors%2Cnamespace%2Ctopics%2Cfiletype%2Cprotocol%2Clanguage&startRecord=0&indexof=off&meanCount=5&resource=global&prefermaskfilter=&maximumRecords=10&timezoneOffset=-480"
Shell "wget -P /dev/null http://192.168.1.60:8060/yacysearch.html?query=" + domain$
'+ "&Enter=&auth=&verify=ifexist&contentdom=text&nav=location%2Chosts%2Cauthors%2Cnamespace%2Ctopics%2Cfiletype%2Cprotocol%2Clanguage&startRecord=0&indexof=off&meanCount=5&resource=global&prefermaskfilter=&maximumRecords=10&timezoneOffset=-480"

'Shell "wget -P /dev/null http://159.223.184.82:8090/yacysearch.html?query=" + domain$ + "&Enter=&auth=&verify=ifexist&contentdom=text&nav=location%2Chosts%2Cauthors%2Cnamespace%2Ctopics%2Cfiletype%2Cprotocol%2Clanguage&startRecord=0&indexof=off&meanCount=5&resource=global&prefermaskfilter=&maximumRecords=10&timezoneOffset=-480"

' Shell "wget -P /dev/null http://192.168.1.55:8055/yacysearch.html?query=" + domain$ + "&Enter=&auth=&verify=ifexist&contentdom=text&nav=location%2Chosts%2Cauthors%2Cnamespace%2Ctopics%2Cfiletype%2Cprotocol%2Clanguage&startRecord=0&indexof=off&meanCount=5&resource=global&prefermaskfilter=&maximumRecords=10&timezoneOffset=-480"
'Shell "wget -P /dev/null http://192.168.1.55:8095/yacysearch.html?query=" + domain$ + "&Enter=&auth=&verify=ifexist&contentdom=text&nav=location%2Chosts%2Cauthors%2Cnamespace%2Ctopics%2Cfiletype%2Cprotocol%2Clanguage&startRecord=0&indexof=off&meanCount=5&resource=global&prefermaskfilter=&maximumRecords=10&timezoneOffset=-480"


'Shell "wget -P /dev/null http://cloudparty.evils.in:8095/yacysearch.html?query=" + domain$
Print k
_Delay 1.066
'  Shell "wget -P /dev/null http://192.168.1.55:8093/yacysearch.html?query=" + domain$
' _Delay 1.066



'Sleep 1
'Sleep 1
'Sleep 1
'Sleep 1

Hz = Hz + 1
Rem timed on my computer rough Hz with no sleep states.
Rem Hz 100
For i& = 1 To 1770000: Next

Rem 51 Hz
'For i& = 1 To 4000000: Next

Rem 30 Hz
'For i& = 1 To 7500000: Next

Rem 15 Hz
' For i& = 1 To 15000000: Next

Rem 8 Hz
' For i& = 1 To 30000000: Next

Rem 4 Hz
' For i& = 1 To 65000000: Next

Rem 2 Hz
'For i& = 1 To 140000000: Next

Next

GoTo digloop

health:
Locate 1, 1
Print Hz / 10, "Hz", index&, "index"
Hz = 0
Return

Expected behavior:
The program should initialize, generate randomized domain strings, and make HTTP requests to the specified URLs using wget while updating the index counter and Hz value. The timer should activate every second, triggering the health subroutine to display the current frequency and index.

Screenshots:
N/A

Desktop (please complete the following information):

OS: Ubuntu 22.04

Browser: [e.g., Not Applicable]

Version: [e.g., QB64pe v4.1.0]

Additional context:

The issue appears to stem from the Timer On statement in combination with the GoSub health subroutine. When the Timer statement is removed or commented out, the program proceeds with normal execution, suggesting a potential conflict with the timer interrupt handler. Additionally, the use of the GoSub statement within the Timer handler may be causing unintended behavior.

The Hz value is calculated and displayed but may not reset properly due to timer conflicts.

Multiple wget requests are currently commented out, but if reactivated, they may further complicate the timer functionality and introduce race conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions