#9124 closed bug (invalid)

Infinite loop when printing a (finite) list with just one element

Reported by: OoS Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.8.2
Keywords: Cc: oosync@…
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: Yes
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

If I print a (finite) list with ohne element I get a "<<loop>>" from the runtime. When I remove some where clauses from "buildFrustum", the code works again flawlessly.

Attachments (1)

Bug.hs (2.1 KB) - added by OoS 11 months ago.
Test case for the bug

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 months ago by OoS

  • Cc oosync@… added

comment:2 follow-ups: Changed 11 months ago by nomeata

Could you try to minimize the example? I.e. remove code or replace it by constants and see if the problem still occurs, and then repeat until you cannot simplify it further.

comment:3 in reply to: ↑ 2 Changed 11 months ago by OoS

Replying to nomeata:

Could you try to minimize the example? I.e. remove code or replace it by constants and see if the problem still occurs, and then repeat until you cannot simplify it further.

I've tried that before, but if i remove where clauses from "buildFrustum" the error doesn't occur, so i must show all the code. I try to make a simpler test case.

Changed 11 months ago by OoS

Test case for the bug

comment:4 in reply to: ↑ 2 Changed 11 months ago by OoS

Replying to nomeata:

Could you try to minimize the example? I.e. remove code or replace it by constants and see if the problem still occurs, and then repeat until you cannot simplify it further.

I've simplified the test case as much as possible. If one removes line 61 (right = vec3Add origin $ rightScaled) the code works. (note that the where clause of right is not used at all in the whole program)

Last edited 11 months ago by OoS (previous) (diff)

comment:5 Changed 11 months ago by nomeata

  • Resolution set to invalid
  • Status changed from new to closed

Yes, it is used: In the definition of rightScaled (which is used in the definition of right). Note that you also have a parameter called right.

Passing -Wall to GHC will make the compiler help you to avoid such problems.

Note: See TracTickets for help on using tickets.